Add rtds:RTDSContactSensor to Tahoma component

HI

I just added 2 RTDS contact sensors to my tahoma env.

Can you add the sensor type rtds:RTDSContactSensor to HA tahoma component ?

Only tahoma.py and sensor/tahoma.py must be updated to add the sensor. And after that it works fine. (see my first line added in the TAHOMA_TYPE.

TAHOMA_TYPES = {
‘rtds:RTDSContactSensor’: ‘sensor’,
‘rts:RollerShutterRTSComponent’: ‘cover’,
‘rts:CurtainRTSComponent’: ‘cover’,
‘rts:BlindRTSComponent’: ‘cover’,
‘rts:VenetianBlindRTSComponent’: ‘cover’,
‘io:ExteriorVenetianBlindIOComponent’: ‘cover’,
‘io:RollerShutterUnoIOComponent’: ‘cover’,
‘io:RollerShutterWithLowSpeedManagementIOComponent’: ‘cover’,
‘io:RollerShutterVeluxIOComponent’: ‘cover’,
‘io:RollerShutterGenericIOComponent’: ‘cover’,
‘io:WindowOpenerVeluxIOComponent’: ‘cover’,
‘io:LightIOSystemSensor’: ‘sensor’,
‘rts:GarageDoor4TRTSComponent’: ‘switch’,

in the second file:
def unit_of_measurement(self):
“”“Return the unit of measurement of this entity, if any.”""
if self.tahoma_device.type == ‘Temperature Sensor’:
return None
if self.tahoma_device.type == ‘io:SomfyContactIOSystemSensor’:
return None
if self.tahoma_device.type == ‘io:LightIOSystemSensor’:
return ‘lx’
if self.tahoma_device.type == ‘Humidity Sensor’:
return ‘%’
if self.tahoma_device.type == ‘rtds:RTDSContactSensor’:
return None

def update(self):
    """Update the state."""
    self.controller.get_states([self.tahoma_device])
    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']
	if self.tahoma_device.type == 'rtds:RTDSContactSensor':
        self.current_value = self.tahoma_device.active_states[
            'core:ContactState']

I would like to keep my update on the next HA update to the next release.

I’m not a Git expert, so I prefer to let you to update the 2 files on the github. !

regards

Christophe

I add another somfy component in the wish list… I added the Motion Sensor provided with the Somfy Protexiom alarm (also compatible with Tahoma)

So, please add the component: rtds:RTDSMotionSensor (core type is core:OccupancyState) . 2 tahoma.py files to update

Don’t hesitate to send me the files for test/validation

Regards

Christophe