diff --git a/homeassistant/components/overkiz/cover.py b/homeassistant/components/overkiz/cover.py index 659ab1b3525221..174d2f8188b20e 100644 --- a/homeassistant/components/overkiz/cover.py +++ b/homeassistant/components/overkiz/cover.py @@ -237,6 +237,31 @@ class OverkizCoverDescription(CoverEntityDescription): open_command=OverkizCommand.CYCLE, close_command=OverkizCommand.CYCLE, ), + # Needs override since UpDownGarageDoor4T only supports the cycle command + # (rts:GarageDoor4TRTSComponent) + # uiClass is GarageDoor + OverkizCoverDescription( + key=UIWidget.UP_DOWN_GARAGE_DOOR_4T, + device_class=CoverDeviceClass.GARAGE, + open_command=OverkizCommand.CYCLE, + close_command=OverkizCommand.CYCLE, + ), + # Needs override since OpenCloseSlidingGarageDoor4T only supports the cycle command + # uiClass is GarageDoor + OverkizCoverDescription( + key=UIWidget.OPEN_CLOSE_SLIDING_GARAGE_DOOR_4T, + device_class=CoverDeviceClass.GARAGE, + open_command=OverkizCommand.CYCLE, + close_command=OverkizCommand.CYCLE, + ), + # Needs override since OpenCloseSlidingGate4T only supports the cycle command + # uiClass is Gate + OverkizCoverDescription( + key=UIWidget.OPEN_CLOSE_SLIDING_GATE_4T, + device_class=CoverDeviceClass.GATE, + open_command=OverkizCommand.CYCLE, + close_command=OverkizCommand.CYCLE, + ), # Needs override since CyclicGarageDoor only supports the cycle command # (io:CyclicGarageOpenerIOComponent) # uiClass is GarageDoor diff --git a/tests/components/overkiz/fixtures/setup/cloud_somfy_tahoma_v2_europe.json b/tests/components/overkiz/fixtures/setup/cloud_somfy_tahoma_v2_europe.json index bd41e10d1155e7..1686db174c492c 100644 --- a/tests/components/overkiz/fixtures/setup/cloud_somfy_tahoma_v2_europe.json +++ b/tests/components/overkiz/fixtures/setup/cloud_somfy_tahoma_v2_europe.json @@ -7473,6 +7473,43 @@ "oid": "a1b2c3d4-e5f6-7890-abcd-ef1234567891", "uiClass": "Gate" }, + { + "creationTime": 1676547436000, + "lastUpdateTime": 1676547436000, + "label": "RTS Garage Door 4T", + "deviceURL": "rts://1234-1234-6233/16721270", + "shortcut": false, + "controllableName": "rts:GarageDoor4TRTSComponent", + "definition": { + "commands": [ + { + "commandName": "cycle", + "nparams": 1 + } + ], + "states": [], + "dataProperties": [ + { + "value": "0", + "qualifiedName": "core:identifyInterval" + } + ], + "widgetName": "UpDownGarageDoor4T", + "uiProfiles": ["CyclicGarageOpener", "Cyclic"], + "uiClass": "GarageDoor", + "qualifiedName": "rts:GarageDoor4TRTSComponent", + "type": "ACTUATOR" + }, + "states": [], + "attributes": [], + "available": true, + "enabled": true, + "placeOID": "bcbb34ef-2241-43a1-9c5b-523aa0563ec3", + "widget": "UpDownGarageDoor4T", + "type": 1, + "oid": "a1b2c3d4-e5f6-7890-abcd-ef1234567892", + "uiClass": "GarageDoor" + }, { "creationTime": 1654894302000, "lastUpdateTime": 1654894302000, diff --git a/tests/components/overkiz/snapshots/test_button.ambr b/tests/components/overkiz/snapshots/test_button.ambr index 07d779f0af84a4..fad65a6d2da5b5 100644 --- a/tests/components/overkiz/snapshots/test_button.ambr +++ b/tests/components/overkiz/snapshots/test_button.ambr @@ -5023,6 +5023,58 @@ 'state': 'unknown', }) # --- +# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.rts_garage_door_4t_toggle-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'button', + 'entity_category': None, + 'entity_id': 'button.rts_garage_door_4t_toggle', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Toggle', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': 'mdi:sync', + 'original_name': 'Toggle', + 'platform': 'overkiz', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'rts://1234-1234-6233/16721270-cycle', + 'unit_of_measurement': None, + }) +# --- +# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.rts_garage_door_4t_toggle-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'assumed_state': True, + 'friendly_name': 'RTS Garage Door 4T Toggle', + 'icon': 'mdi:sync', + }), + 'context': , + 'entity_id': 'button.rts_garage_door_4t_toggle', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.rts_gate_toggle-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/overkiz/snapshots/test_cover.ambr b/tests/components/overkiz/snapshots/test_cover.ambr index 44ddb454041a41..f13039d1ed4028 100644 --- a/tests/components/overkiz/snapshots/test_cover.ambr +++ b/tests/components/overkiz/snapshots/test_cover.ambr @@ -2155,6 +2155,60 @@ 'state': 'open', }) # --- +# name: test_cover_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][cover.rts_garage_door_4t-entry] + EntityRegistryEntrySnapshot({ + 'aliases': list([ + None, + ]), + 'area_id': None, + 'capabilities': None, + 'config_entry_id': , + 'config_subentry_id': , + 'device_class': None, + 'device_id': , + 'disabled_by': None, + 'domain': 'cover', + 'entity_category': None, + 'entity_id': 'cover.rts_garage_door_4t', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': None, + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': None, + 'original_name': None, + 'platform': 'overkiz', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': , + 'translation_key': None, + 'unique_id': 'rts://1234-1234-6233/16721270', + 'unit_of_measurement': None, + }) +# --- +# name: test_cover_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][cover.rts_garage_door_4t-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'assumed_state': True, + 'device_class': 'garage', + 'friendly_name': 'RTS Garage Door 4T', + 'is_closed': None, + 'supported_features': , + }), + 'context': , + 'entity_id': 'cover.rts_garage_door_4t', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_cover_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][cover.rts_gate-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/overkiz/test_cover.py b/tests/components/overkiz/test_cover.py index fefcafc21a7297..d71cdb46b22cb3 100644 --- a/tests/components/overkiz/test_cover.py +++ b/tests/components/overkiz/test_cover.py @@ -139,6 +139,11 @@ "rts://1234-1234-6233/16730717", "cover.rts_gate", ) +RTS_GARAGE_DOOR_4T = FixtureDevice( + "setup/cloud_somfy_tahoma_v2_europe.json", + "rts://1234-1234-6233/16721270", + "cover.rts_garage_door_4t", +) CYCLIC_GARAGE_DOOR = FixtureDevice( "setup/cloud_somfy_tahoma_v2_europe.json", "io://1234-1234-6233/6416929", @@ -229,6 +234,7 @@ async def test_cover_entities_snapshot( (DYNAMIC_GARAGE_DOOR_OGP, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING), (DYNAMIC_GATE, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING), (RTS_GATE_4T, SERVICE_OPEN_COVER, "cycle", [0], CoverState.OPENING), + (RTS_GARAGE_DOOR_4T, SERVICE_OPEN_COVER, "cycle", [0], CoverState.OPENING), (CYCLIC_GARAGE_DOOR, SERVICE_OPEN_COVER, "cycle", None, CoverState.OPENING), (CYCLIC_SWINGING_GATE, SERVICE_OPEN_COVER, "cycle", None, CoverState.OPENING), (SLIDING_DISCRETE_GATE, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING), @@ -274,6 +280,7 @@ async def test_cover_entities_snapshot( # Cycle command is used for both open and close; device reports OPENING # since the RTS protocol has no directional feedback. (RTS_GATE_4T, SERVICE_CLOSE_COVER, "cycle", [0], CoverState.OPENING), + (RTS_GARAGE_DOOR_4T, SERVICE_CLOSE_COVER, "cycle", [0], CoverState.OPENING), (CYCLIC_GARAGE_DOOR, SERVICE_CLOSE_COVER, "cycle", None, CoverState.OPENING), (CYCLIC_SWINGING_GATE, SERVICE_CLOSE_COVER, "cycle", None, CoverState.OPENING), (SLIDING_DISCRETE_GATE, SERVICE_CLOSE_COVER, "close", None, CoverState.CLOSING), @@ -416,6 +423,7 @@ async def test_cover_entities_snapshot( "open-dynamic-garage-door-ogp", "open-dynamic-gate", "open-rts-gate-4t", + "open-rts-garage-door-4t", "open-cyclic-garage-door", "open-cyclic-swinging-gate", "open-sliding-discrete-gate", @@ -435,6 +443,7 @@ async def test_cover_entities_snapshot( "close-dynamic-garage-door-ogp", "close-dynamic-gate", "close-rts-gate-4t", + "close-rts-garage-door-4t", "close-cyclic-garage-door", "close-cyclic-swinging-gate", "close-sliding-discrete-gate",