Add io:SomfyBasicContactIOSystemSensor to TaHoma component (#27234)
This commit is contained in:
parent
5c01dd483f
commit
bd92532ebb
2 changed files with 8 additions and 0 deletions
homeassistant/components/tahoma
|
@ -42,6 +42,7 @@ TAHOMA_TYPES = {
|
|||
"io:RollerShutterUnoIOComponent": "cover",
|
||||
"io:RollerShutterVeluxIOComponent": "cover",
|
||||
"io:RollerShutterWithLowSpeedManagementIOComponent": "cover",
|
||||
"io:SomfyBasicContactIOSystemSensor": "sensor",
|
||||
"io:SomfyContactIOSystemSensor": "sensor",
|
||||
"io:VerticalExteriorAwningIOComponent": "cover",
|
||||
"io:WindowOpenerVeluxIOComponent": "cover",
|
||||
|
|
|
@ -44,6 +44,8 @@ class TahomaSensor(TahomaDevice, Entity):
|
|||
return None
|
||||
if self.tahoma_device.type == "io:SomfyContactIOSystemSensor":
|
||||
return None
|
||||
if self.tahoma_device.type == "io:SomfyBasicContactIOSystemSensor":
|
||||
return None
|
||||
if self.tahoma_device.type == "io:LightIOSystemSensor":
|
||||
return "lx"
|
||||
if self.tahoma_device.type == "Humidity Sensor":
|
||||
|
@ -66,6 +68,11 @@ class TahomaSensor(TahomaDevice, Entity):
|
|||
self._available = bool(
|
||||
self.tahoma_device.active_states.get("core:StatusState") == "available"
|
||||
)
|
||||
if self.tahoma_device.type == "io:SomfyBasicContactIOSystemSensor":
|
||||
self.current_value = self.tahoma_device.active_states["core:ContactState"]
|
||||
self._available = bool(
|
||||
self.tahoma_device.active_states.get("core:StatusState") == "available"
|
||||
)
|
||||
if self.tahoma_device.type == "rtds:RTDSContactSensor":
|
||||
self.current_value = self.tahoma_device.active_states["core:ContactState"]
|
||||
self._available = True
|
||||
|
|
Loading…
Add table
Reference in a new issue