`verticalSwing`<sup>2)</sup> | String | Vertical swing state, one of <sup>3)</sup> `OFF`, `ON`, `UP`, `MID_UP`, `MID`, `MID_DOWN`, `DOWN`, `AUTO` | RW | `AC`
`horizontalSwing`<sup>2)</sup> | String | Horizontal swing state, one of <sup>3)</sup> `OFF`, `ON`, `LEFT`, `MID_LEFT`, `MID`, `MID_RIGHT`, `RIGHT`, `AUTO` | RW | `AC`
`batteryLowAlarm` | Switch | A control device in the Zone has a low battery | R | Any Zone
-`openWindowDetected` | Switch | An open window has been detected in the Zone | R | Any Zone
+`openWindowDetected` | Switch | An open window has been detected in the Zone | R | `HEATING`, `AC`
+`openWindowRemainingTime` | Number:Time | The remaining Open Window heating/cooling Override time in the Zone | R | `HEATING`, `AC`
`light` | Switch | State (`ON`, `OFF`) of the control panel light | RW | `AC`
You will see some of the above mentioned Channels only if your tado° device supports the respective function.
public static final String CHANNEL_ZONE_BATTERY_LOW_ALARM = "batteryLowAlarm";
// open window detected channel
public static final String CHANNEL_ZONE_OPEN_WINDOW_DETECTED = "openWindowDetected";
+ // open window heating/cooling override remaining time channel
+ public static final String CHANNEL_ZONE_OPEN_WINDOW_REMAINING_TIME = "openWindowRemainingTime";
public static final String CHANNEL_MOBILE_DEVICE_AT_HOME = "atHome";
import org.openhab.binding.tado.swagger.codegen.api.model.GenericZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.HeatingZoneSetting;
import org.openhab.binding.tado.swagger.codegen.api.model.HotWaterZoneSetting;
+import org.openhab.binding.tado.swagger.codegen.api.model.OpenWindow;
import org.openhab.binding.tado.swagger.codegen.api.model.Overlay;
import org.openhab.binding.tado.swagger.codegen.api.model.OverlayTerminationConditionType;
import org.openhab.binding.tado.swagger.codegen.api.model.PercentageDataPoint;
return OnOffType.OFF;
}
+ public State getOpenWindowRemainingTime() {
+ int seconds = 0;
+ OpenWindow openWindow = zoneState.getOpenWindow();
+ if (openWindow != null) {
+ Integer remainingSeconds = openWindow.getRemainingTimeInSeconds();
+ if (remainingSeconds != 0) {
+ seconds = remainingSeconds.intValue();
+ }
+ }
+ return new QuantityType<>(seconds, Units.SECOND);
+ }
+
public State getLight() {
if (zoneState.getSetting().getType() == TadoSystemType.AIR_CONDITIONING) {
Power result = ((CoolingZoneSetting) zoneState.getSetting()).getLight();
updateState(TadoBindingConstants.CHANNEL_ZONE_OPEN_WINDOW_DETECTED, state.getOpenWindowDetected());
+ updateState(TadoBindingConstants.CHANNEL_ZONE_OPEN_WINDOW_REMAINING_TIME,
+ state.getOpenWindowRemainingTime());
+
updateDynamicStateDescriptions(zoneState);
onSuccessfulOperation();
capabilitiesSupport.batteryLowAlarm());
removeListProcessChannel(removeList, TadoBindingConstants.CHANNEL_ZONE_OPEN_WINDOW_DETECTED,
capabilitiesSupport.openWindow());
+ removeListProcessChannel(removeList, TadoBindingConstants.CHANNEL_ZONE_OPEN_WINDOW_REMAINING_TIME,
+ capabilitiesSupport.openWindow());
removeListProcessChannel(removeList, TadoBindingConstants.CHANNEL_ZONE_LIGHT, capabilitiesSupport.light());
removeListProcessChannel(removeList, TadoBindingConstants.CHANNEL_ZONE_HORIZONTAL_SWING,
capabilitiesSupport.horizontalSwing());
channel-type.tado.light.description = State of control panel light (only if supported by AC)
channel-type.tado.openWindowDetected.label = Open Window Detected
channel-type.tado.openWindowDetected.description = Indicates if an open window has been detected
+channel-type.tado.openWindowRemainingTime.label = Override Remaining Time
+channel-type.tado.openWindowRemainingTime.description = The remaining Open Window heating/cooling Override time in the Zone
channel-type.tado.operationMode.label = Zone Operation Mode
channel-type.tado.operationMode.description = Active operation mode (schedule, manual, timer or until next change)
channel-type.tado.operationMode.state.option.SCHEDULE = Schedule
<channel typeId="overlayExpiry" id="overlayExpiry"/>
<channel typeId="timerDuration" id="timerDuration"/>
<channel typeId="openWindowDetected" id="openWindowDetected"/>
+ <channel typeId="openWindowRemainingTime" id="openWindowRemainingTime"/>
<channel typeId="system.low-battery" id="batteryLowAlarm">
<label>Battery Low Alarm</label>
<description>ON if one or more devices in the zone have a low battery</description>
<properties>
<property name="vendor">tado°</property>
- <property name="thingTypeVersion">1</property>
+ <property name="thingTypeVersion">2</property>
</properties>
<representation-property>id</representation-property>
<state readOnly="true"/>
</channel-type>
+ <channel-type id="openWindowRemainingTime">
+ <item-type>Number:Time</item-type>
+ <label>Override Remaining Time</label>
+ <description>The remaining Open Window heating/cooling Override time in the Zone</description>
+ <category>Window</category>
+ <state readOnly="true" pattern="%.0f %unit%"/>
+ </channel-type>
+
</thing:thing-descriptions>
<description>Current humidity in %</description>
</update-channel>
</instruction-set>
+
+ <instruction-set targetVersion="2">
+ <add-channel id="openWindowRemainingTime">
+ <type>tado:openWindowRemainingTime</type>
+ </add-channel>
+ </instruction-set>
+
</thing-type>
</update:update-descriptions>