Skip to content

Commit

Permalink
Add devices to Tahoma (#14075)
Browse files Browse the repository at this point in the history
  • Loading branch information
bakedraccoon authored and syssi committed Apr 25, 2018
1 parent 0a0d34d commit 558b659
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions homeassistant/components/cover/tahoma.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,7 @@ def stop_cover(self, **kwargs):
if self.tahoma_device.type == \
'io:RollerShutterWithLowSpeedManagementIOComponent':
self.apply_action('setPosition', 'secured')
elif self.tahoma_device.type == 'rts:BlindRTSComponent':
self.apply_action('my')
else:
self.apply_action('stopIdentify')
5 changes: 5 additions & 0 deletions homeassistant/components/sensor/tahoma.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ def unit_of_measurement(self):
"""Return the unit of measurement of this entity, if any."""
if self.tahoma_device.type == 'Temperature Sensor':
return None
elif self.tahoma_device.type == 'io:SomfyContactIOSystemSensor':
return None
elif self.tahoma_device.type == 'io:LightIOSystemSensor':
return 'lux'
elif self.tahoma_device.type == 'Humidity Sensor':
Expand All @@ -57,3 +59,6 @@ def update(self):
if self.tahoma_device.type == 'io:LightIOSystemSensor':
self.current_value = self.tahoma_device.active_states[
'core:LuminanceState']
if self.tahoma_device.type == 'io:SomfyContactIOSystemSensor':
self.current_value = self.tahoma_device.active_states[
'core:ContactState']
2 changes: 2 additions & 0 deletions homeassistant/components/tahoma.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
TAHOMA_TYPES = {
'rts:RollerShutterRTSComponent': 'cover',
'rts:CurtainRTSComponent': 'cover',
'rts:BlindRTSComponent': 'cover',
'rts:VenetianBlindRTSComponent': 'cover',
'io:RollerShutterWithLowSpeedManagementIOComponent': 'cover',
'io:RollerShutterVeluxIOComponent': 'cover',
'io:RollerShutterGenericIOComponent': 'cover',
Expand Down

0 comments on commit 558b659

Please sign in to comment.