mirror of
https://github.com/home-assistant/core.git
synced 2025-07-21 12:17:07 +00:00
Tahoma zwave light support (#36584)
This commit is contained in:
parent
e39997ca10
commit
a2e705880d
@ -68,6 +68,7 @@ TAHOMA_TYPES = {
|
|||||||
"rts:VenetianBlindRTSComponent": "cover",
|
"rts:VenetianBlindRTSComponent": "cover",
|
||||||
"somfythermostat:SomfyThermostatTemperatureSensor": "sensor",
|
"somfythermostat:SomfyThermostatTemperatureSensor": "sensor",
|
||||||
"somfythermostat:SomfyThermostatHumiditySensor": "sensor",
|
"somfythermostat:SomfyThermostatHumiditySensor": "sensor",
|
||||||
|
"zwave:OnOffLightZWaveComponent": "switch",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,10 +47,18 @@ class TahomaSwitch(TahomaDevice, SwitchEntity):
|
|||||||
else:
|
else:
|
||||||
self._state = STATE_OFF
|
self._state = STATE_OFF
|
||||||
|
|
||||||
|
if self.tahoma_device.type == "zwave:OnOffLightZWaveComponent":
|
||||||
|
if self.tahoma_device.active_states.get("core:OnOffState") == "on":
|
||||||
|
self._state = STATE_ON
|
||||||
|
else:
|
||||||
|
self._state = STATE_OFF
|
||||||
|
|
||||||
# A RTS power socket doesn't have a feedback channel,
|
# A RTS power socket doesn't have a feedback channel,
|
||||||
# so we must assume the socket is available.
|
# so we must assume the socket is available.
|
||||||
if self.tahoma_device.type == "rts:OnOffRTSComponent":
|
if self.tahoma_device.type == "rts:OnOffRTSComponent":
|
||||||
self._available = True
|
self._available = True
|
||||||
|
elif self.tahoma_device.type == "zwave:OnOffLightZWaveComponent":
|
||||||
|
self._available = True
|
||||||
else:
|
else:
|
||||||
self._available = bool(
|
self._available = bool(
|
||||||
self.tahoma_device.active_states.get("core:StatusState") == "available"
|
self.tahoma_device.active_states.get("core:StatusState") == "available"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user