Add tahoma io:AwningValanceIOComponent (#30944)

pull/31193/head
Jens 2020-01-22 01:09:59 +01:00 committed by Martin Hjelmare
parent 3b4c3e6e17
commit 15f6e28a04
2 changed files with 14 additions and 12 deletions

View File

@ -34,8 +34,11 @@ CONFIG_SCHEMA = vol.Schema(
TAHOMA_COMPONENTS = ["scene", "sensor", "cover", "switch", "binary_sensor"]
TAHOMA_TYPES = {
"io:AwningValanceIOComponent": "cover",
"io:ExteriorVenetianBlindIOComponent": "cover",
"io:DiscreteGarageOpenerIOComponent": "cover",
"io:HorizontalAwningIOComponent": "cover",
"io:GarageOpenerIOComponent": "cover",
"io:LightIOSystemSensor": "sensor",
"io:OnOffIOComponent": "switch",
"io:OnOffLightIOComponent": "switch",
@ -49,8 +52,6 @@ TAHOMA_TYPES = {
"io:VerticalExteriorAwningIOComponent": "cover",
"io:VerticalInteriorBlindVeluxIOComponent": "cover",
"io:WindowOpenerVeluxIOComponent": "cover",
"io:GarageOpenerIOComponent": "cover",
"io:DiscreteGarageOpenerIOComponent": "cover",
"rtds:RTDSContactSensor": "sensor",
"rtds:RTDSMotionSensor": "sensor",
"rtds:RTDSSmokeSensor": "smoke",

View File

@ -28,8 +28,11 @@ ATTR_LOCK_ORIG = "lock_originator"
HORIZONTAL_AWNING = "io:HorizontalAwningIOComponent"
TAHOMA_DEVICE_CLASSES = {
"io:ExteriorVenetianBlindIOComponent": DEVICE_CLASS_BLIND,
HORIZONTAL_AWNING: DEVICE_CLASS_AWNING,
"io:AwningValanceIOComponent": DEVICE_CLASS_AWNING,
"io:DiscreteGarageOpenerIOComponent": DEVICE_CLASS_GARAGE,
"io:ExteriorVenetianBlindIOComponent": DEVICE_CLASS_BLIND,
"io:GarageOpenerIOComponent": DEVICE_CLASS_GARAGE,
"io:RollerShutterGenericIOComponent": DEVICE_CLASS_SHUTTER,
"io:RollerShutterUnoIOComponent": DEVICE_CLASS_SHUTTER,
"io:RollerShutterVeluxIOComponent": DEVICE_CLASS_SHUTTER,
@ -37,8 +40,6 @@ TAHOMA_DEVICE_CLASSES = {
"io:VerticalExteriorAwningIOComponent": DEVICE_CLASS_AWNING,
"io:VerticalInteriorBlindVeluxIOComponent": DEVICE_CLASS_BLIND,
"io:WindowOpenerVeluxIOComponent": DEVICE_CLASS_WINDOW,
"io:GarageOpenerIOComponent": DEVICE_CLASS_GARAGE,
"io:DiscreteGarageOpenerIOComponent": DEVICE_CLASS_GARAGE,
"rts:BlindRTSComponent": DEVICE_CLASS_BLIND,
"rts:CurtainRTSComponent": DEVICE_CLASS_CURTAIN,
"rts:DualCurtainRTSComponent": DEVICE_CLASS_CURTAIN,
@ -228,22 +229,22 @@ class TahomaCover(TahomaDevice, CoverDevice):
== "io:RollerShutterWithLowSpeedManagementIOComponent"
):
self.apply_action("setPosition", "secured")
elif self.tahoma_device.type in (
"rts:BlindRTSComponent",
elif self.tahoma_device.type in {
"io:ExteriorVenetianBlindIOComponent",
"rts:VenetianBlindRTSComponent",
"rts:BlindRTSComponent",
"rts:DualCurtainRTSComponent",
"rts:ExteriorVenetianBlindRTSComponent",
"rts:BlindRTSComponent",
):
"rts:VenetianBlindRTSComponent",
}:
self.apply_action("my")
elif self.tahoma_device.type in (
elif self.tahoma_device.type in {
HORIZONTAL_AWNING,
"io:AwningValanceIOComponent",
"io:RollerShutterGenericIOComponent",
"io:VerticalExteriorAwningIOComponent",
"io:VerticalInteriorBlindVeluxIOComponent",
"io:WindowOpenerVeluxIOComponent",
):
}:
self.apply_action("stop")
else:
self.apply_action("stopIdentify")