Add tahoma io:AwningValanceIOComponent (#30944)

This commit is contained in:
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_COMPONENTS = ["scene", "sensor", "cover", "switch", "binary_sensor"]
TAHOMA_TYPES = { TAHOMA_TYPES = {
"io:AwningValanceIOComponent": "cover",
"io:ExteriorVenetianBlindIOComponent": "cover", "io:ExteriorVenetianBlindIOComponent": "cover",
"io:DiscreteGarageOpenerIOComponent": "cover",
"io:HorizontalAwningIOComponent": "cover", "io:HorizontalAwningIOComponent": "cover",
"io:GarageOpenerIOComponent": "cover",
"io:LightIOSystemSensor": "sensor", "io:LightIOSystemSensor": "sensor",
"io:OnOffIOComponent": "switch", "io:OnOffIOComponent": "switch",
"io:OnOffLightIOComponent": "switch", "io:OnOffLightIOComponent": "switch",
@ -49,8 +52,6 @@ TAHOMA_TYPES = {
"io:VerticalExteriorAwningIOComponent": "cover", "io:VerticalExteriorAwningIOComponent": "cover",
"io:VerticalInteriorBlindVeluxIOComponent": "cover", "io:VerticalInteriorBlindVeluxIOComponent": "cover",
"io:WindowOpenerVeluxIOComponent": "cover", "io:WindowOpenerVeluxIOComponent": "cover",
"io:GarageOpenerIOComponent": "cover",
"io:DiscreteGarageOpenerIOComponent": "cover",
"rtds:RTDSContactSensor": "sensor", "rtds:RTDSContactSensor": "sensor",
"rtds:RTDSMotionSensor": "sensor", "rtds:RTDSMotionSensor": "sensor",
"rtds:RTDSSmokeSensor": "smoke", "rtds:RTDSSmokeSensor": "smoke",

View File

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