mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +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",
|
||||
"somfythermostat:SomfyThermostatTemperatureSensor": "sensor",
|
||||
"somfythermostat:SomfyThermostatHumiditySensor": "sensor",
|
||||
"zwave:OnOffLightZWaveComponent": "switch",
|
||||
}
|
||||
|
||||
|
||||
|
@ -47,10 +47,18 @@ class TahomaSwitch(TahomaDevice, SwitchEntity):
|
||||
else:
|
||||
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,
|
||||
# so we must assume the socket is available.
|
||||
if self.tahoma_device.type == "rts:OnOffRTSComponent":
|
||||
self._available = True
|
||||
elif self.tahoma_device.type == "zwave:OnOffLightZWaveComponent":
|
||||
self._available = True
|
||||
else:
|
||||
self._available = bool(
|
||||
self.tahoma_device.active_states.get("core:StatusState") == "available"
|
||||
|
Loading…
x
Reference in New Issue
Block a user