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.livisismarthome.internal.client.api.entity.capability;
15 import org.openhab.binding.livisismarthome.internal.client.api.entity.state.BooleanStateDTO;
16 import org.openhab.binding.livisismarthome.internal.client.api.entity.state.DateTimeStateDTO;
17 import org.openhab.binding.livisismarthome.internal.client.api.entity.state.DoubleStateDTO;
18 import org.openhab.binding.livisismarthome.internal.client.api.entity.state.IntegerStateDTO;
19 import org.openhab.binding.livisismarthome.internal.client.api.entity.state.StringStateDTO;
21 import com.google.gson.annotations.SerializedName;
24 * Holds the Capability state.
26 * @author Oliver Kuhl - Initial contribution
29 public class StateDTO {
31 @SerializedName("absoluteEnergyConsumption")
32 private DoubleStateDTO absoluteEnergyConsumptionState;
34 @SerializedName("activeChannel")
35 private StringStateDTO activeChannelState;
37 @SerializedName("dimLevel")
38 private IntegerStateDTO dimLevelState;
40 @SerializedName("energyConsumptionDayEuro")
41 private DoubleStateDTO energyConsumptionDayEuroState;
43 @SerializedName("energyConsumptionDayKWh")
44 private DoubleStateDTO energyConsumptionDayKWhState;
46 @SerializedName("energyConsumptionMonthEuro")
47 private DoubleStateDTO energyConsumptionMonthEuroState;
49 @SerializedName("energyConsumptionMonthKWh")
50 private DoubleStateDTO energyConsumptionMonthKWhState;
52 @SerializedName("energyPerDayInEuro")
53 private DoubleStateDTO energyPerDayInEuroState;
55 @SerializedName("energyPerDayInKWh")
56 private DoubleStateDTO energyPerDayInKWhState;
58 @SerializedName("energyPerMonthInEuro")
59 private DoubleStateDTO energyPerMonthInEuroState;
61 @SerializedName("energyPerMonthInKWh")
62 private DoubleStateDTO energyPerMonthInKWhState;
64 @SerializedName("frostWarning")
65 private BooleanStateDTO frostWarningState;
67 @SerializedName("humidity")
68 private DoubleStateDTO humidityState;
70 @SerializedName("isDay")
71 private BooleanStateDTO isDayState;
73 @SerializedName("isOn")
74 private BooleanStateDTO isOnState;
76 @SerializedName("isOpen")
77 private BooleanStateDTO isOpenState;
79 @SerializedName("isSmokeAlarm")
80 private BooleanStateDTO isSmokeAlarmState;
82 @SerializedName("lastKeyPressCounter")
83 private IntegerStateDTO lastKeyPressCounterState;
85 @SerializedName("lastPressedButtonIndex")
86 private IntegerStateDTO lastPressedButtonIndex;
88 private StringStateDTO lastPressedButtonIndexState;
90 @SerializedName("luminance")
91 private DoubleStateDTO luminanceState;
93 @SerializedName("moldWarning")
94 private BooleanStateDTO moldWarningState;
96 @SerializedName("motionDetectedCount")
97 private IntegerStateDTO motionDetectedCountState;
99 @SerializedName("nextSunrise")
100 private DateTimeStateDTO nextSunrise;
102 @SerializedName("nextSunset")
103 private DateTimeStateDTO nextSunsetState;
105 @SerializedName("nextTimeEvent")
106 private DateTimeStateDTO nextTimeEventState;
108 @SerializedName("onState")
109 private BooleanStateDTO onState;
111 @SerializedName("operationMode")
112 private StringStateDTO operationModeState;
114 @SerializedName("pointTemperature")
115 private DoubleStateDTO pointTemperatureState;
117 @SerializedName("powerConsumptionWatt")
118 private DoubleStateDTO powerConsumptionWattState;
120 @SerializedName("powerInWatt")
121 private DoubleStateDTO powerInWattState;
123 @SerializedName("shutterLevel")
124 private IntegerStateDTO shutterLevelState;
126 @SerializedName("supplyValueInCubicMetterPerDay")
127 private DoubleStateDTO supplyValueInCubicMetterPerDayState;
129 @SerializedName("supplyValueInCubicMetterPerMonth")
130 private DoubleStateDTO supplyValueInCubicMetterPerMonthState;
132 @SerializedName("supplyValueInCurrencyPerDay")
133 private DoubleStateDTO supplyValueInCurrencyPerDayState;
135 @SerializedName("supplyValueInCurrencyPerMonth")
136 private DoubleStateDTO supplyValueInCurrencyPerMonthState;
138 @SerializedName("supplyValueInLitrePerDay")
139 private DoubleStateDTO supplyValueInLitrePerDayState;
141 @SerializedName("supplyValueInLitrePerMonth")
142 private DoubleStateDTO supplyValueInLitrePerMonthState;
144 @SerializedName("temperature")
145 private DoubleStateDTO temperatureState;
147 @SerializedName("totalEnergy")
148 private DoubleStateDTO totalEnergyState;
150 @SerializedName("value")
151 private BooleanStateDTO valueState;
153 @SerializedName("valvePosition")
154 private BooleanStateDTO valvePositionState;
156 @SerializedName("windowReductionActive")
157 private BooleanStateDTO windowReductionActiveState;
160 absoluteEnergyConsumptionState = new DoubleStateDTO();
161 activeChannelState = new StringStateDTO();
162 dimLevelState = new IntegerStateDTO();
163 energyConsumptionDayEuroState = new DoubleStateDTO();
164 energyConsumptionDayKWhState = new DoubleStateDTO();
165 energyConsumptionMonthEuroState = new DoubleStateDTO();
166 energyConsumptionMonthKWhState = new DoubleStateDTO();
167 energyPerDayInEuroState = new DoubleStateDTO();
168 energyPerDayInKWhState = new DoubleStateDTO();
169 energyPerMonthInEuroState = new DoubleStateDTO();
170 energyPerMonthInKWhState = new DoubleStateDTO();
171 frostWarningState = new BooleanStateDTO();
172 humidityState = new DoubleStateDTO();
173 isDayState = new BooleanStateDTO();
174 isOnState = new BooleanStateDTO();
175 isOpenState = new BooleanStateDTO();
176 isSmokeAlarmState = new BooleanStateDTO();
177 lastKeyPressCounterState = new IntegerStateDTO();
178 lastPressedButtonIndex = new IntegerStateDTO();
179 lastPressedButtonIndexState = new StringStateDTO();
180 luminanceState = new DoubleStateDTO();
181 moldWarningState = new BooleanStateDTO();
182 motionDetectedCountState = new IntegerStateDTO();
183 nextSunrise = new DateTimeStateDTO();
184 nextSunsetState = new DateTimeStateDTO();
185 nextTimeEventState = new DateTimeStateDTO();
186 onState = new BooleanStateDTO();
187 operationModeState = new StringStateDTO();
188 pointTemperatureState = new DoubleStateDTO();
189 powerConsumptionWattState = new DoubleStateDTO();
190 powerInWattState = new DoubleStateDTO();
191 shutterLevelState = new IntegerStateDTO();
192 supplyValueInCubicMetterPerDayState = new DoubleStateDTO();
193 supplyValueInCubicMetterPerMonthState = new DoubleStateDTO();
194 supplyValueInCurrencyPerDayState = new DoubleStateDTO();
195 supplyValueInCurrencyPerMonthState = new DoubleStateDTO();
196 supplyValueInLitrePerDayState = new DoubleStateDTO();
197 supplyValueInLitrePerMonthState = new DoubleStateDTO();
198 temperatureState = new DoubleStateDTO();
199 totalEnergyState = new DoubleStateDTO();
200 valueState = new BooleanStateDTO();
201 valvePositionState = new BooleanStateDTO();
202 windowReductionActiveState = new BooleanStateDTO();
206 * @return the absoluteEnergyConsumptionState
208 public DoubleStateDTO getAbsoluteEnergyConsumptionState() {
209 return absoluteEnergyConsumptionState;
213 * @param state the absoluteEnergyConsumptionState to set
215 public void setAbsoluteEnergyConsumptionState(DoubleStateDTO state) {
216 this.absoluteEnergyConsumptionState = state;
220 * @return the activeChannelState
222 public StringStateDTO getActiveChannelState() {
223 return activeChannelState;
227 * @param state the activeChannelState to set
229 public void setActiveChannelState(StringStateDTO state) {
230 this.activeChannelState = state;
234 * @return the dimLevelState
236 public IntegerStateDTO getDimLevelState() {
237 return dimLevelState;
241 * @param state the dimLevelState to set
243 public void setDimLevelState(IntegerStateDTO state) {
244 this.dimLevelState = state;
248 * @return the energyConsumptionDayEuroState
250 public DoubleStateDTO getEnergyConsumptionDayEuroState() {
251 return energyConsumptionDayEuroState;
255 * @param state the energyConsumptionDayEuroState to set
257 public void setEnergyConsumptionDayEuroState(DoubleStateDTO state) {
258 this.energyConsumptionDayEuroState = state;
262 * @return the energyConsumptionDayKWhState
264 public DoubleStateDTO getEnergyConsumptionDayKWhState() {
265 return energyConsumptionDayKWhState;
269 * @param state the energyConsumptionDayKWhState to set
271 public void setEnergyConsumptionDayKWhState(DoubleStateDTO state) {
272 this.energyConsumptionDayKWhState = state;
276 * @return the energyConsumptionMonthEuroState
278 public DoubleStateDTO getEnergyConsumptionMonthEuroState() {
279 return energyConsumptionMonthEuroState;
283 * @param state the energyConsumptionMonthEuroState to set
285 public void setEnergyConsumptionMonthEuroState(DoubleStateDTO state) {
286 this.energyConsumptionMonthEuroState = state;
290 * @return the energyConsumptionMonthKWhState
292 public DoubleStateDTO getEnergyConsumptionMonthKWhState() {
293 return energyConsumptionMonthKWhState;
297 * @param state the energyConsumptionMonthKWhState to set
299 public void setEnergyConsumptionMonthKWhState(DoubleStateDTO state) {
300 this.energyConsumptionMonthKWhState = state;
304 * @return the energyPerDayInEuroState
306 public DoubleStateDTO getEnergyPerDayInEuroState() {
307 return energyPerDayInEuroState;
311 * @param state the energyPerDayInEuroState to set
313 public void setEnergyPerDayInEuroState(DoubleStateDTO state) {
314 this.energyPerDayInEuroState = state;
318 * @return the energyPerDayInKWhState
320 public DoubleStateDTO getEnergyPerDayInKWhState() {
321 return energyPerDayInKWhState;
325 * @param state the energyPerDayInKWhState to set
327 public void setEnergyPerDayInKWhState(DoubleStateDTO state) {
328 this.energyPerDayInKWhState = state;
332 * @return the energyPerMonthInEuroState
334 public DoubleStateDTO getEnergyPerMonthInEuroState() {
335 return energyPerMonthInEuroState;
339 * @param state the energyPerMonthInEuroState to set
341 public void setEnergyPerMonthInEuroState(DoubleStateDTO state) {
342 this.energyPerMonthInEuroState = state;
346 * @return the energyPerMonthInKWhState
348 public DoubleStateDTO getEnergyPerMonthInKWhState() {
349 return energyPerMonthInKWhState;
353 * @param state the energyPerMonthInKWhState to set
355 public void setEnergyPerMonthInKWhState(DoubleStateDTO state) {
356 this.energyPerMonthInKWhState = state;
360 * @return the frostWarningState
362 public BooleanStateDTO getFrostWarningState() {
363 return frostWarningState;
367 * @param state the frostWarningState to set
369 public void setFrostWarningState(BooleanStateDTO state) {
370 this.frostWarningState = state;
374 * @return the humidityState
376 public DoubleStateDTO getHumidityState() {
377 return humidityState;
381 * @param state the humidityState to set
383 public void setHumidityState(DoubleStateDTO state) {
384 this.humidityState = state;
388 * @return the isDayState
390 public BooleanStateDTO getIsDayState() {
395 * @param state the isDayState to set
397 public void setIsDayState(BooleanStateDTO state) {
398 this.isDayState = state;
402 * @return the isOnState
404 public BooleanStateDTO getIsOnState() {
409 * @param state the isOnState to set
411 public void setIsOnState(BooleanStateDTO state) {
412 this.isOnState = state;
416 * @return the isOpenState
418 public BooleanStateDTO getIsOpenState() {
423 * @param state the isOpenState to set
425 public void setIsOpenState(BooleanStateDTO state) {
426 this.isOpenState = state;
430 * @return the isSmokeAlarmState
432 public BooleanStateDTO getIsSmokeAlarmState() {
433 return isSmokeAlarmState;
437 * @param state the isSmokeAlarmState to set
439 public void setIsSmokeAlarmState(BooleanStateDTO state) {
440 this.isSmokeAlarmState = state;
444 * @return the lastKeyPressCounterState
446 public IntegerStateDTO getLastKeyPressCounterState() {
447 return lastKeyPressCounterState;
451 * @param state the lastKeyPressCounterState to set
453 public void setLastKeyPressCounterState(IntegerStateDTO state) {
454 this.lastKeyPressCounterState = state;
458 * @return the lastPressedButtonIndex
460 public IntegerStateDTO getLastPressedButtonIndex() {
461 return lastPressedButtonIndex;
465 * @param state the lastPressedButtonIndex to set
467 public void setLastPressedButtonIndex(IntegerStateDTO state) {
468 this.lastPressedButtonIndex = state;
471 public StringStateDTO getLastKeyPressType() {
472 if (lastPressedButtonIndexState == null) {
473 lastPressedButtonIndexState = new StringStateDTO();
475 return lastPressedButtonIndexState;
478 public void setLastKeyPressType(StringStateDTO lastPressedButtonIndexState) {
479 this.lastPressedButtonIndexState = lastPressedButtonIndexState;
483 * @return the luminanceState
485 public DoubleStateDTO getLuminanceState() {
486 return luminanceState;
490 * @param state the luminanceState to set
492 public void setLuminanceState(DoubleStateDTO state) {
493 this.luminanceState = state;
497 * @return the moldWarningState
499 public BooleanStateDTO getMoldWarningState() {
500 return moldWarningState;
504 * @param state the moldWarningState to set
506 public void setMoldWarningState(BooleanStateDTO state) {
507 this.moldWarningState = state;
511 * @return the motionDetectedCountState
513 public IntegerStateDTO getMotionDetectedCountState() {
514 return motionDetectedCountState;
518 * @param state the motionDetectedCountState to set
520 public void setMotionDetectedCountState(IntegerStateDTO state) {
521 this.motionDetectedCountState = state;
525 * @return the nextSunrise
527 public DateTimeStateDTO getNextSunrise() {
532 * @param state the nextSunrise to set
534 public void setNextSunrise(DateTimeStateDTO state) {
535 this.nextSunrise = state;
539 * @return the nextSunsetState
541 public DateTimeStateDTO getNextSunsetState() {
542 return nextSunsetState;
546 * @param state the nextSunsetState to set
548 public void setNextSunsetState(DateTimeStateDTO state) {
549 this.nextSunsetState = state;
553 * @return the nextTimeEventState
555 public DateTimeStateDTO getNextTimeEventState() {
556 return nextTimeEventState;
560 * @param state the nextTimeEventState to set
562 public void setNextTimeEventState(DateTimeStateDTO state) {
563 this.nextTimeEventState = state;
567 * @return the onState
569 public BooleanStateDTO getOnState() {
574 * @param state the onState to set
576 public void setOnState(BooleanStateDTO state) {
577 this.onState = state;
581 * @return the operationModeState
583 public StringStateDTO getOperationModeState() {
584 return operationModeState;
588 * @param state the operationModeState to set
590 public void setOperationModeState(StringStateDTO state) {
591 this.operationModeState = state;
595 * @return the pointTemperatureState
597 public DoubleStateDTO getPointTemperatureState() {
598 return pointTemperatureState;
602 * @param state the pointTemperatureState to set
604 public void setPointTemperatureState(DoubleStateDTO state) {
605 this.pointTemperatureState = state;
609 * @return the powerConsumptionWattState
611 public DoubleStateDTO getPowerConsumptionWattState() {
612 return powerConsumptionWattState;
616 * @param state the powerConsumptionWattState to set
618 public void setPowerConsumptionWattState(DoubleStateDTO state) {
619 this.powerConsumptionWattState = state;
623 * @return the powerInWattState
625 public DoubleStateDTO getPowerInWattState() {
626 return powerInWattState;
630 * @param state the powerInWattState to set
632 public void setPowerInWattState(DoubleStateDTO state) {
633 this.powerInWattState = state;
637 * @return the shutterLevelState
639 public IntegerStateDTO getShutterLevelState() {
640 return shutterLevelState;
644 * @param state the shutterLevelState to set
646 public void setShutterLevelState(IntegerStateDTO state) {
647 this.shutterLevelState = state;
651 * @return the supplyValueInCubicMetterPerDayState
653 public DoubleStateDTO getSupplyValueInCubicMetterPerDayState() {
654 return supplyValueInCubicMetterPerDayState;
658 * @param state the supplyValueInCubicMetterPerDayState to set
660 public void setSupplyValueInCubicMetterPerDayState(DoubleStateDTO state) {
661 this.supplyValueInCubicMetterPerDayState = state;
665 * @return the supplyValueInCubicMetterPerMonthState
667 public DoubleStateDTO getSupplyValueInCubicMetterPerMonthState() {
668 return supplyValueInCubicMetterPerMonthState;
672 * @param state the supplyValueInCubicMetterPerMonthState to set
674 public void setSupplyValueInCubicMetterPerMonthState(DoubleStateDTO state) {
675 this.supplyValueInCubicMetterPerMonthState = state;
679 * @return the supplyValueInCurrencyPerDayState
681 public DoubleStateDTO getSupplyValueInCurrencyPerDayState() {
682 return supplyValueInCurrencyPerDayState;
686 * @param state the supplyValueInCurrencyPerDayState to set
688 public void setSupplyValueInCurrencyPerDayState(DoubleStateDTO state) {
689 this.supplyValueInCurrencyPerDayState = state;
693 * @return the supplyValueInCurrencyPerMonthState
695 public DoubleStateDTO getSupplyValueInCurrencyPerMonthState() {
696 return supplyValueInCurrencyPerMonthState;
700 * @param state the supplyValueInCurrencyPerMonthState to set
702 public void setSupplyValueInCurrencyPerMonthState(DoubleStateDTO state) {
703 this.supplyValueInCurrencyPerMonthState = state;
707 * @return the supplyValueInLitrePerDayState
709 public DoubleStateDTO getSupplyValueInLitrePerDayState() {
710 return supplyValueInLitrePerDayState;
714 * @param state the supplyValueInLitrePerDayState to set
716 public void setSupplyValueInLitrePerDayState(DoubleStateDTO state) {
717 this.supplyValueInLitrePerDayState = state;
721 * @return the supplyValueInLitrePerMonthState
723 public DoubleStateDTO getSupplyValueInLitrePerMonthState() {
724 return supplyValueInLitrePerMonthState;
728 * @param state the supplyValueInLitrePerMonthState to set
730 public void setSupplyValueInLitrePerMonthState(DoubleStateDTO state) {
731 this.supplyValueInLitrePerMonthState = state;
735 * @return the temperatureState
737 public DoubleStateDTO getTemperatureState() {
738 return temperatureState;
742 * @param state the temperatureState to set
744 public void setTemperatureState(DoubleStateDTO state) {
745 this.temperatureState = state;
749 * @return the totalEnergyState
751 public DoubleStateDTO getTotalEnergyState() {
752 return totalEnergyState;
756 * @param state the totalEnergyState to set
758 public void setTotalEnergyState(DoubleStateDTO state) {
759 this.totalEnergyState = state;
763 * @return the valueState
765 public BooleanStateDTO getValueState() {
770 * @param state the valueState to set
772 public void setValueState(BooleanStateDTO state) {
773 this.valueState = state;
777 * @return the valvePositionState
779 public BooleanStateDTO getValvePositionState() {
780 return valvePositionState;
784 * @param state the valvePositionState to set
786 public void setValvePositionState(BooleanStateDTO state) {
787 this.valvePositionState = state;
791 * @return the windowReductionActiveState
793 public BooleanStateDTO getWindowReductionActiveState() {
794 return windowReductionActiveState;
798 * @param state the windowReductionActiveState to set
800 public void setWindowReductionActiveState(BooleanStateDTO state) {
801 this.windowReductionActiveState = state;