Add devices to Tahoma (#14075)

This commit is contained in:
Thijs de Jong 2018-04-25 07:09:45 +02:00 committed by Sebastian Muszynski
parent 0a0d34d394
commit 558b659f7c
3 changed files with 9 additions and 0 deletions

View File

@ -79,5 +79,7 @@ class TahomaCover(TahomaDevice, CoverDevice):
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')

View File

@ -46,6 +46,8 @@ class TahomaSensor(TahomaDevice, Entity):
"""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':
@ -57,3 +59,6 @@ class TahomaSensor(TahomaDevice, Entity):
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']

View File

@ -38,6 +38,8 @@ TAHOMA_COMPONENTS = [
TAHOMA_TYPES = {
'rts:RollerShutterRTSComponent': 'cover',
'rts:CurtainRTSComponent': 'cover',
'rts:BlindRTSComponent': 'cover',
'rts:VenetianBlindRTSComponent': 'cover',
'io:RollerShutterWithLowSpeedManagementIOComponent': 'cover',
'io:RollerShutterVeluxIOComponent': 'cover',
'io:RollerShutterGenericIOComponent': 'cover',