Skip to content
This repository has been archived by the owner on Jun 12, 2020. It is now read-only.

Commit

Permalink
attempt at integrating
Browse files Browse the repository at this point in the history
  • Loading branch information
vlebourl committed Feb 18, 2020
1 parent 36b4701 commit cc7a161
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/venv/
1 change: 1 addition & 0 deletions custom_components/tahoma_extended/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
TAHOMA_COMPONENTS = ["sensor", "switch", "lock"]

TAHOMA_TYPES = {
"io:SomfySmokeIOSystemSensor": "sensor",
"io:AtlanticElectricalHeaterIOComponent": "climate",
"rts:LightRTSComponent": "switch",
"somfythermostat:SomfyThermostatTemperatureSensor": "sensor",
Expand Down
6 changes: 6 additions & 0 deletions custom_components/tahoma_extended/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ def __init__(self, tahoma_device, controller):
self.current_value = None
self._available = False
super().__init__(tahoma_device, controller)
if self.tahoma_device.type == "io:SomfySmokeIOSystemSensor":
import json
parsed = json.loads(self.tahoma_device.active_states)
_LOGGER.debug("io:SomfySmokeIOSystemSensor:\n"+json.dumps(parsed, indent=4, sort_keys=True))

@property
def state(self):
Expand All @@ -54,6 +58,8 @@ def unit_of_measurement(self):
return '%'
if self.tahoma_device.type == "Humidity Sensor":
return "%"
if self.tahoma_device.type == "io:SomfySmokeIOSystemSensor":
return None
if self.tahoma_device.type == "rtds:RTDSContactSensor":
return None
if self.tahoma_device.type == "rtds:RTDSMotionSensor":
Expand Down

0 comments on commit cc7a161

Please sign in to comment.