2 * Copyright (c) 2010-2023 Contributors to the openHAB project
4 * See the NOTICE file(s) distributed with this work for additional
7 * This program and the accompanying materials are made available under the
8 * terms of the Eclipse Public License 2.0 which is available at
9 * http://www.eclipse.org/legal/epl-2.0
11 * SPDX-License-Identifier: EPL-2.0
13 package org.openhab.binding.nikohomecontrol.internal.protocol.nhc2;
15 import java.util.ArrayList;
17 import org.eclipse.jdt.annotation.NonNullByDefault;
19 import com.google.gson.annotations.SerializedName;
22 * {@link NhcSystemInfo2} represents Niko Home Control II system info. It is used when parsing the systeminfo response
25 * @author Mark Herwege - Initial Contribution
28 public class NhcSystemInfo2 {
29 static class NhcSwVersion {
30 String nhcVersion = "";
31 String cocoImage = "";
34 String lastConfig = "";
35 String waterTariff = "";
36 String electricityTariff = "";
37 String gasTariff = "";
41 @SerializedName(value = "SWversions")
42 ArrayList<NhcSwVersion> swVersions = new ArrayList<>();
45 * @return the NhcVersion
47 public String getNhcVersion() {
48 return swVersions.stream().map(p -> p.nhcVersion).filter(v -> !v.isEmpty()).findFirst().orElse("");
52 * @return the CocoImage version
54 public String getCocoImage() {
55 return swVersions.stream().map(p -> p.cocoImage).filter(v -> !v.isEmpty()).findFirst().orElse("");
59 * @return the lastConfig
61 public String getLastConfig() {
66 * @return the waterTariff
68 public String getWaterTariff() {
73 * @return the electricityTariff
75 public String getElectricityTariff() {
76 return electricityTariff;
80 * @return the gasTariff
82 public String getGasTariff() {
87 * @return the currency
89 public String getCurrency() {
96 public String getUnits() {
101 * @return the language
103 public String getLanguage() {