From 3c80155043c0b2d333159be7aaa24587785e563f Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Sun, 17 May 2026 12:54:07 +0000 Subject: [PATCH 1/3] Fix is_closed state for DiscretePositionableGarageDoor in Overkiz The DiscretePositionableGarageDoor widget (e.g. Somfy Rollixo IO) reports core:OpenClosedUnknownState instead of core:OpenClosedState and does not support position control. Without a widget-specific override, the device falls through to the UIClass.GARAGE_DOOR default which looks for wrong states, causing the cover to always report unknown state. Fixes #170966 --- homeassistant/components/overkiz/cover.py | 11 + .../setup/cloud_somfy_tahoma_v2_europe.json | 253 +++++++++++++++++- .../overkiz/snapshots/test_button.ambr | 154 +++++++++++ .../overkiz/snapshots/test_cover.ambr | 53 ++++ tests/components/overkiz/test_cover.py | 11 + 5 files changed, 477 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/overkiz/cover.py b/homeassistant/components/overkiz/cover.py index 9a49d2c2c496f7..deb297d363c55e 100644 --- a/homeassistant/components/overkiz/cover.py +++ b/homeassistant/components/overkiz/cover.py @@ -175,6 +175,17 @@ class OverkizCoverDescription(CoverEntityDescription): stop_command=OverkizCommand.STOP, is_closed_state=OverkizState.CORE_OPEN_CLOSED_UNKNOWN, ), + # Needs override since DiscretePositionableGarageDoor reports + # core:OpenClosedUnknownState instead of core:OpenClosedState + # uiClass is GarageDoor + OverkizCoverDescription( + key=UIWidget.DISCRETE_POSITIONABLE_GARAGE_DOOR, + device_class=CoverDeviceClass.GARAGE, + open_command=OverkizCommand.OPEN, + close_command=OverkizCommand.CLOSE, + stop_command=OverkizCommand.STOP, + is_closed_state=OverkizState.CORE_OPEN_CLOSED_UNKNOWN, + ), # Needs override since PositionableGarageDoorWithPartialPosition reports # core:OpenClosedPartialState instead of core:OpenClosedState # 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 a8b4aaf4349c30..a451105af036cd 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 @@ -5330,7 +5330,7 @@ { "creationTime": 1501225111000, "lastUpdateTime": 1501225111000, - "label": "*é*é* *", + "label": "*\u00e9*\u00e9* *", "deviceURL": "rtds://1234-1234-6233/124768", "shortcut": false, "controllableName": "rtds:RTDSRemoteControllerComponent", @@ -5402,7 +5402,7 @@ { "creationTime": 1501225074000, "lastUpdateTime": 1501225074000, - "label": "*é*é* *", + "label": "*\u00e9*\u00e9* *", "deviceURL": "rtds://1234-1234-6233/169771", "shortcut": false, "controllableName": "rtds:RTDSRemoteControllerComponent", @@ -5525,7 +5525,7 @@ { "creationTime": 1501224970000, "lastUpdateTime": 1501224970000, - "label": "É*", + "label": "\u00c9*", "deviceURL": "rtds://1234-1234-6233/246258", "shortcut": false, "controllableName": "rtds:RTDSMotionSensor", @@ -5627,7 +5627,7 @@ { "creationTime": 1501224830000, "lastUpdateTime": 1501224830000, - "label": "*é*", + "label": "*\u00e9*", "deviceURL": "rtds://1234-1234-6233/394765", "shortcut": false, "controllableName": "rtds:RTDSContactSensor", @@ -5727,7 +5727,7 @@ { "creationTime": 1501225017000, "lastUpdateTime": 1501225017000, - "label": "*é* *", + "label": "*\u00e9* *", "deviceURL": "rtds://1234-1234-6233/711548", "shortcut": false, "controllableName": "rtds:RTDSSmokeSensor", @@ -7894,6 +7894,249 @@ "widget": "DynamicGate", "oid": "a8d3e9f1-4b2c-4d5e-8f6a-1234567890ab", "uiClass": "Gate" + }, + { + "creationTime": 1521964729000, + "lastUpdateTime": 1521964729000, + "label": "Garage Door Rollixo", + "deviceURL": "io://1234-1234-6233/12745774", + "shortcut": false, + "controllableName": "io:DiscreteGarageOpenerIOComponent", + "definition": { + "commands": [ + { + "commandName": "up", + "nparams": 0 + }, + { + "commandName": "close", + "nparams": 0 + }, + { + "commandName": "addLockLevel", + "nparams": 1, + "paramsSig": "p1,*p2" + }, + { + "commandName": "resetLockLevels", + "nparams": 0 + }, + { + "commandName": "removeLockLevel", + "nparams": 1, + "paramsSig": "p1" + }, + { + "commandName": "executeManufacturerProcedure", + "nparams": 1, + "paramsSig": "p1,*p2" + }, + { + "commandName": "writeManufacturerData", + "nparams": 1, + "paramsSig": "p1" + }, + { + "commandName": "readManufacturerData", + "nparams": 1, + "paramsSig": "p1" + }, + { + "commandName": "unpairAllOneWayControllers", + "nparams": 0 + }, + { + "commandName": "stopIdentify", + "nparams": 0 + }, + { + "commandName": "startIdentify", + "nparams": 0 + }, + { + "commandName": "pairOneWayController", + "nparams": 1, + "paramsSig": "p1,*p2" + }, + { + "commandName": "delayedStopIdentify", + "nparams": 1, + "paramsSig": "p1" + }, + { + "commandName": "sendIOKey", + "nparams": 0 + }, + { + "commandName": "unpairAllOneWayControllersAndDeleteNode", + "nparams": 0 + }, + { + "commandName": "wink", + "nparams": 1, + "paramsSig": "p1" + }, + { + "commandName": "setConfigState", + "nparams": 1, + "paramsSig": "p1" + }, + { + "commandName": "advancedRefresh", + "nparams": 1, + "paramsSig": "p1,*p2" + }, + { + "commandName": "setName", + "nparams": 1, + "paramsSig": "p1" + }, + { + "commandName": "unpairOneWayController", + "nparams": 1, + "paramsSig": "p1,*p2" + }, + { + "commandName": "runManufacturerSettingsCommand", + "nparams": 2, + "paramsSig": "p1,p2" + }, + { + "commandName": "getName", + "nparams": 0 + }, + { + "commandName": "stop", + "nparams": 0 + }, + { + "commandName": "open", + "nparams": 0 + }, + { + "commandName": "keepOneWayControllersAndDeleteNode", + "nparams": 0 + }, + { + "commandName": "identify", + "nparams": 0 + }, + { + "commandName": "down", + "nparams": 0 + } + ], + "states": [ + { + "qualifiedName": "core:AdditionalStatusState" + }, + { + "qualifiedName": "core:PriorityLockTimerState" + }, + { + "qualifiedName": "io:PriorityLockLevelState" + }, + { + "qualifiedName": "io:PriorityLockOriginatorState" + }, + { + "qualifiedName": "core:StatusState" + }, + { + "qualifiedName": "core:ManufacturerSettingsState" + }, + { + "qualifiedName": "core:ManufacturerDiagnosticsState" + }, + { + "qualifiedName": "core:CommandLockLevelsState" + }, + { + "qualifiedName": "core:NameState" + }, + { + "qualifiedName": "core:DiscreteRSSILevelState" + }, + { + "qualifiedName": "core:RSSILevelState" + }, + { + "qualifiedName": "core:OpenClosedUnknownState" + } + ], + "dataProperties": [ + { + "value": "500", + "qualifiedName": "core:identifyInterval" + } + ], + "widgetName": "DiscretePositionableGarageDoor", + "uiProfiles": ["StatefulOpenCloseGarageOpener", "OpenClose"], + "uiClass": "GarageDoor", + "qualifiedName": "io:DiscreteGarageOpenerIOComponent", + "type": "ACTUATOR" + }, + "states": [ + { + "name": "core:StatusState", + "type": 3, + "value": "available" + }, + { + "name": "core:CommandLockLevelsState", + "type": 11, + "value": [] + }, + { + "name": "core:DiscreteRSSILevelState", + "type": 3, + "value": "good" + }, + { + "name": "core:RSSILevelState", + "type": 1, + "value": 100 + }, + { + "name": "core:OpenClosedUnknownState", + "type": 3, + "value": "closed" + }, + { + "name": "core:NameState", + "type": 3, + "value": "Garage Door Rollixo" + }, + { + "name": "core:PriorityLockTimerState", + "type": 1, + "value": 0 + }, + { + "name": "io:PriorityLockOriginatorState", + "type": 3, + "value": "unknown" + } + ], + "attributes": [ + { + "name": "core:Manufacturer", + "type": 3, + "value": "Somfy" + }, + { + "name": "core:FirmwareRevision", + "type": 3, + "value": "5105491C15" + } + ], + "available": true, + "enabled": true, + "placeOID": "bcbb34ef-2241-43a1-9c5b-523aa0563ec3", + "widget": "DiscretePositionableGarageDoor", + "type": 1, + "oid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", + "uiClass": "GarageDoor" } ], "zones": [], diff --git a/tests/components/overkiz/snapshots/test_button.ambr b/tests/components/overkiz/snapshots/test_button.ambr index e331b720fed308..4007a0670166cc 100644 --- a/tests/components/overkiz/snapshots/test_button.ambr +++ b/tests/components/overkiz/snapshots/test_button.ambr @@ -2204,6 +2204,160 @@ 'state': 'unknown', }) # --- +# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_identify-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': , + 'entity_id': 'button.garage_door_rollixo_identify', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Identify', + 'options': dict({ + }), + 'original_device_class': , + 'original_icon': 'mdi:human-greeting-variant', + 'original_name': 'Identify', + 'platform': 'overkiz', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'io://1234-1234-6233/12745774-startIdentify', + 'unit_of_measurement': None, + }) +# --- +# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_identify-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'identify', + 'friendly_name': 'Garage Door Rollixo Identify', + 'icon': 'mdi:human-greeting-variant', + }), + 'context': , + 'entity_id': 'button.garage_door_rollixo_identify', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_start_identify-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': , + 'entity_id': 'button.garage_door_rollixo_start_identify', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Start identify', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': 'mdi:human-greeting-variant', + 'original_name': 'Start identify', + 'platform': 'overkiz', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'io://1234-1234-6233/12745774-identify', + 'unit_of_measurement': None, + }) +# --- +# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_start_identify-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Garage Door Rollixo Start identify', + 'icon': 'mdi:human-greeting-variant', + }), + 'context': , + 'entity_id': 'button.garage_door_rollixo_start_identify', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- +# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_stop_identify-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': , + 'entity_id': 'button.garage_door_rollixo_stop_identify', + 'has_entity_name': True, + 'hidden_by': None, + 'icon': None, + 'id': , + 'labels': set({ + }), + 'name': None, + 'object_id_base': 'Stop identify', + 'options': dict({ + }), + 'original_device_class': None, + 'original_icon': 'mdi:human-greeting-variant', + 'original_name': 'Stop identify', + 'platform': 'overkiz', + 'previous_unique_id': None, + 'suggested_object_id': None, + 'supported_features': 0, + 'translation_key': None, + 'unique_id': 'io://1234-1234-6233/12745774-stopIdentify', + 'unit_of_measurement': None, + }) +# --- +# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_stop_identify-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'friendly_name': 'Garage Door Rollixo Stop identify', + 'icon': 'mdi:human-greeting-variant', + }), + 'context': , + 'entity_id': 'button.garage_door_rollixo_stop_identify', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'unknown', + }) +# --- # name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_start_identify-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/overkiz/snapshots/test_cover.ambr b/tests/components/overkiz/snapshots/test_cover.ambr index 3468d39e288464..cc062de69c18bb 100644 --- a/tests/components/overkiz/snapshots/test_cover.ambr +++ b/tests/components/overkiz/snapshots/test_cover.ambr @@ -1349,6 +1349,59 @@ 'state': 'closed', }) # --- +# name: test_cover_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][cover.garage_door_rollixo-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.garage_door_rollixo', + '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': 'io://1234-1234-6233/12745774', + 'unit_of_measurement': None, + }) +# --- +# name: test_cover_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][cover.garage_door_rollixo-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'garage', + 'friendly_name': 'Garage Door Rollixo', + 'is_closed': True, + 'supported_features': , + }), + 'context': , + 'entity_id': 'cover.garage_door_rollixo', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'closed', + }) +# --- # name: test_cover_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][cover.garden_gate-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/overkiz/test_cover.py b/tests/components/overkiz/test_cover.py index ea8537e5370418..e06440ee4d84b2 100644 --- a/tests/components/overkiz/test_cover.py +++ b/tests/components/overkiz/test_cover.py @@ -114,6 +114,11 @@ "rts://1234-1234-6362/16753206", "cover.kitchen_sheer_screen", ) +DISCRETE_GARAGE_DOOR = FixtureDevice( + "setup/cloud_somfy_tahoma_v2_europe.json", + "io://1234-1234-6233/12745774", + "cover.garage_door_rollixo", +) DYNAMIC_GARAGE_DOOR = FixtureDevice( "setup/cloud_somfy_tahoma_v2_europe.json", "io://1234-1234-6233/16730050", @@ -184,6 +189,7 @@ async def test_cover_entities_snapshot( (SHUTTER, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING), (AWNING, SERVICE_OPEN_COVER, "deploy", None, CoverState.OPENING), (GARAGE, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING), + (DISCRETE_GARAGE_DOOR, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING), (DYNAMIC_GARAGE_DOOR, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING), (DYNAMIC_GARAGE_DOOR_OGP, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING), (DYNAMIC_GATE, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING), @@ -202,6 +208,7 @@ async def test_cover_entities_snapshot( (SHUTTER, SERVICE_CLOSE_COVER, "close", None, CoverState.CLOSING), (AWNING, SERVICE_CLOSE_COVER, "undeploy", None, CoverState.CLOSING), (GARAGE, SERVICE_CLOSE_COVER, "close", None, CoverState.CLOSING), + (DISCRETE_GARAGE_DOOR, SERVICE_CLOSE_COVER, "close", None, CoverState.CLOSING), (DYNAMIC_GARAGE_DOOR, SERVICE_CLOSE_COVER, "close", None, CoverState.CLOSING), ( DYNAMIC_GARAGE_DOOR_OGP, @@ -232,6 +239,7 @@ async def test_cover_entities_snapshot( (SHUTTER, SERVICE_STOP_COVER, "stop", None, CoverState.CLOSED), (AWNING, SERVICE_STOP_COVER, "stop", None, CoverState.CLOSED), (GARAGE, SERVICE_STOP_COVER, "stop", None, CoverState.CLOSED), + (DISCRETE_GARAGE_DOOR, SERVICE_STOP_COVER, "stop", None, CoverState.CLOSED), (DYNAMIC_GARAGE_DOOR, SERVICE_STOP_COVER, "stop", None, CoverState.CLOSED), (DYNAMIC_GARAGE_DOOR_OGP, SERVICE_STOP_COVER, "stop", None, CoverState.CLOSED), (DYNAMIC_GATE, SERVICE_STOP_COVER, "stop", None, CoverState.OPEN), @@ -315,6 +323,7 @@ async def test_cover_entities_snapshot( "open-roller-shutter", "open-awning", "open-garage-door", + "open-discrete-garage-door", "open-dynamic-garage-door", "open-dynamic-garage-door-ogp", "open-dynamic-gate", @@ -327,6 +336,7 @@ async def test_cover_entities_snapshot( "close-roller-shutter", "close-awning", "close-garage-door", + "close-discrete-garage-door", "close-dynamic-garage-door", "close-dynamic-garage-door-ogp", "close-dynamic-gate", @@ -339,6 +349,7 @@ async def test_cover_entities_snapshot( "stop-roller-shutter", "stop-awning", "stop-garage-door", + "stop-discrete-garage-door", "stop-dynamic-garage-door", "stop-dynamic-garage-door-ogp", "stop-dynamic-gate", From e295554eb2529928592bf1626d5f654415322dd8 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Sun, 17 May 2026 13:03:21 +0000 Subject: [PATCH 2/3] Fix unicode escapes and remove paramsSig from fixture Restore original unicode characters that were incorrectly converted to escape sequences, and remove paramsSig fields that are not present in the cloud API format. --- .../setup/cloud_somfy_tahoma_v2_europe.json | 49 +++++++------------ 1 file changed, 18 insertions(+), 31 deletions(-) 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 a451105af036cd..2aabcc00b25867 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 @@ -5330,7 +5330,7 @@ { "creationTime": 1501225111000, "lastUpdateTime": 1501225111000, - "label": "*\u00e9*\u00e9* *", + "label": "*é*é* *", "deviceURL": "rtds://1234-1234-6233/124768", "shortcut": false, "controllableName": "rtds:RTDSRemoteControllerComponent", @@ -5402,7 +5402,7 @@ { "creationTime": 1501225074000, "lastUpdateTime": 1501225074000, - "label": "*\u00e9*\u00e9* *", + "label": "*é*é* *", "deviceURL": "rtds://1234-1234-6233/169771", "shortcut": false, "controllableName": "rtds:RTDSRemoteControllerComponent", @@ -5525,7 +5525,7 @@ { "creationTime": 1501224970000, "lastUpdateTime": 1501224970000, - "label": "\u00c9*", + "label": "É*", "deviceURL": "rtds://1234-1234-6233/246258", "shortcut": false, "controllableName": "rtds:RTDSMotionSensor", @@ -5627,7 +5627,7 @@ { "creationTime": 1501224830000, "lastUpdateTime": 1501224830000, - "label": "*\u00e9*", + "label": "*é*", "deviceURL": "rtds://1234-1234-6233/394765", "shortcut": false, "controllableName": "rtds:RTDSContactSensor", @@ -5727,7 +5727,7 @@ { "creationTime": 1501225017000, "lastUpdateTime": 1501225017000, - "label": "*\u00e9* *", + "label": "*é* *", "deviceURL": "rtds://1234-1234-6233/711548", "shortcut": false, "controllableName": "rtds:RTDSSmokeSensor", @@ -7914,8 +7914,7 @@ }, { "commandName": "addLockLevel", - "nparams": 1, - "paramsSig": "p1,*p2" + "nparams": 1 }, { "commandName": "resetLockLevels", @@ -7923,23 +7922,19 @@ }, { "commandName": "removeLockLevel", - "nparams": 1, - "paramsSig": "p1" + "nparams": 1 }, { "commandName": "executeManufacturerProcedure", - "nparams": 1, - "paramsSig": "p1,*p2" + "nparams": 1 }, { "commandName": "writeManufacturerData", - "nparams": 1, - "paramsSig": "p1" + "nparams": 1 }, { "commandName": "readManufacturerData", - "nparams": 1, - "paramsSig": "p1" + "nparams": 1 }, { "commandName": "unpairAllOneWayControllers", @@ -7955,13 +7950,11 @@ }, { "commandName": "pairOneWayController", - "nparams": 1, - "paramsSig": "p1,*p2" + "nparams": 1 }, { "commandName": "delayedStopIdentify", - "nparams": 1, - "paramsSig": "p1" + "nparams": 1 }, { "commandName": "sendIOKey", @@ -7973,33 +7966,27 @@ }, { "commandName": "wink", - "nparams": 1, - "paramsSig": "p1" + "nparams": 1 }, { "commandName": "setConfigState", - "nparams": 1, - "paramsSig": "p1" + "nparams": 1 }, { "commandName": "advancedRefresh", - "nparams": 1, - "paramsSig": "p1,*p2" + "nparams": 1 }, { "commandName": "setName", - "nparams": 1, - "paramsSig": "p1" + "nparams": 1 }, { "commandName": "unpairOneWayController", - "nparams": 1, - "paramsSig": "p1,*p2" + "nparams": 1 }, { "commandName": "runManufacturerSettingsCommand", - "nparams": 2, - "paramsSig": "p1,p2" + "nparams": 2 }, { "commandName": "getName", From 1e13308cc2077120ee279dbf0d8f1b3d636770f3 Mon Sep 17 00:00:00 2001 From: Mick Vleeshouwer Date: Sun, 17 May 2026 13:08:10 +0000 Subject: [PATCH 3/3] Move fixture to local API format The diagnostics were from a local API setup, so the fixture belongs in local_somfy_tahoma_v2_europe.json with the proper local format (includes paramsSig, subsystemId, synced fields; excludes cloud-only fields). --- .../setup/cloud_somfy_tahoma_v2_europe.json | 230 ------------------ .../setup/local_somfy_tahoma_v2_europe.json | 230 ++++++++++++++++++ .../overkiz/snapshots/test_button.ambr | 154 ------------ .../overkiz/snapshots/test_cover.ambr | 106 ++++---- tests/components/overkiz/test_cover.py | 4 +- 5 files changed, 285 insertions(+), 439 deletions(-) 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 2aabcc00b25867..a8b4aaf4349c30 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 @@ -7894,236 +7894,6 @@ "widget": "DynamicGate", "oid": "a8d3e9f1-4b2c-4d5e-8f6a-1234567890ab", "uiClass": "Gate" - }, - { - "creationTime": 1521964729000, - "lastUpdateTime": 1521964729000, - "label": "Garage Door Rollixo", - "deviceURL": "io://1234-1234-6233/12745774", - "shortcut": false, - "controllableName": "io:DiscreteGarageOpenerIOComponent", - "definition": { - "commands": [ - { - "commandName": "up", - "nparams": 0 - }, - { - "commandName": "close", - "nparams": 0 - }, - { - "commandName": "addLockLevel", - "nparams": 1 - }, - { - "commandName": "resetLockLevels", - "nparams": 0 - }, - { - "commandName": "removeLockLevel", - "nparams": 1 - }, - { - "commandName": "executeManufacturerProcedure", - "nparams": 1 - }, - { - "commandName": "writeManufacturerData", - "nparams": 1 - }, - { - "commandName": "readManufacturerData", - "nparams": 1 - }, - { - "commandName": "unpairAllOneWayControllers", - "nparams": 0 - }, - { - "commandName": "stopIdentify", - "nparams": 0 - }, - { - "commandName": "startIdentify", - "nparams": 0 - }, - { - "commandName": "pairOneWayController", - "nparams": 1 - }, - { - "commandName": "delayedStopIdentify", - "nparams": 1 - }, - { - "commandName": "sendIOKey", - "nparams": 0 - }, - { - "commandName": "unpairAllOneWayControllersAndDeleteNode", - "nparams": 0 - }, - { - "commandName": "wink", - "nparams": 1 - }, - { - "commandName": "setConfigState", - "nparams": 1 - }, - { - "commandName": "advancedRefresh", - "nparams": 1 - }, - { - "commandName": "setName", - "nparams": 1 - }, - { - "commandName": "unpairOneWayController", - "nparams": 1 - }, - { - "commandName": "runManufacturerSettingsCommand", - "nparams": 2 - }, - { - "commandName": "getName", - "nparams": 0 - }, - { - "commandName": "stop", - "nparams": 0 - }, - { - "commandName": "open", - "nparams": 0 - }, - { - "commandName": "keepOneWayControllersAndDeleteNode", - "nparams": 0 - }, - { - "commandName": "identify", - "nparams": 0 - }, - { - "commandName": "down", - "nparams": 0 - } - ], - "states": [ - { - "qualifiedName": "core:AdditionalStatusState" - }, - { - "qualifiedName": "core:PriorityLockTimerState" - }, - { - "qualifiedName": "io:PriorityLockLevelState" - }, - { - "qualifiedName": "io:PriorityLockOriginatorState" - }, - { - "qualifiedName": "core:StatusState" - }, - { - "qualifiedName": "core:ManufacturerSettingsState" - }, - { - "qualifiedName": "core:ManufacturerDiagnosticsState" - }, - { - "qualifiedName": "core:CommandLockLevelsState" - }, - { - "qualifiedName": "core:NameState" - }, - { - "qualifiedName": "core:DiscreteRSSILevelState" - }, - { - "qualifiedName": "core:RSSILevelState" - }, - { - "qualifiedName": "core:OpenClosedUnknownState" - } - ], - "dataProperties": [ - { - "value": "500", - "qualifiedName": "core:identifyInterval" - } - ], - "widgetName": "DiscretePositionableGarageDoor", - "uiProfiles": ["StatefulOpenCloseGarageOpener", "OpenClose"], - "uiClass": "GarageDoor", - "qualifiedName": "io:DiscreteGarageOpenerIOComponent", - "type": "ACTUATOR" - }, - "states": [ - { - "name": "core:StatusState", - "type": 3, - "value": "available" - }, - { - "name": "core:CommandLockLevelsState", - "type": 11, - "value": [] - }, - { - "name": "core:DiscreteRSSILevelState", - "type": 3, - "value": "good" - }, - { - "name": "core:RSSILevelState", - "type": 1, - "value": 100 - }, - { - "name": "core:OpenClosedUnknownState", - "type": 3, - "value": "closed" - }, - { - "name": "core:NameState", - "type": 3, - "value": "Garage Door Rollixo" - }, - { - "name": "core:PriorityLockTimerState", - "type": 1, - "value": 0 - }, - { - "name": "io:PriorityLockOriginatorState", - "type": 3, - "value": "unknown" - } - ], - "attributes": [ - { - "name": "core:Manufacturer", - "type": 3, - "value": "Somfy" - }, - { - "name": "core:FirmwareRevision", - "type": 3, - "value": "5105491C15" - } - ], - "available": true, - "enabled": true, - "placeOID": "bcbb34ef-2241-43a1-9c5b-523aa0563ec3", - "widget": "DiscretePositionableGarageDoor", - "type": 1, - "oid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890", - "uiClass": "GarageDoor" } ], "zones": [], diff --git a/tests/components/overkiz/fixtures/setup/local_somfy_tahoma_v2_europe.json b/tests/components/overkiz/fixtures/setup/local_somfy_tahoma_v2_europe.json index e309c17526f552..61879cc1cac9d9 100644 --- a/tests/components/overkiz/fixtures/setup/local_somfy_tahoma_v2_europe.json +++ b/tests/components/overkiz/fixtures/setup/local_somfy_tahoma_v2_europe.json @@ -1674,6 +1674,236 @@ ], "uiClass": "Light" } + }, + { + "deviceURL": "io://1234-5678-3293/12745774", + "available": true, + "synced": true, + "type": 1, + "states": [ + { + "type": 3, + "name": "core:StatusState", + "value": "available" + }, + { + "type": 11, + "name": "core:CommandLockLevelsState", + "value": [] + }, + { + "type": 3, + "name": "core:DiscreteRSSILevelState", + "value": "good" + }, + { + "type": 1, + "name": "core:RSSILevelState", + "value": 100 + }, + { + "type": 3, + "name": "core:OpenClosedUnknownState", + "value": "closed" + }, + { + "type": 3, + "name": "core:NameState", + "value": "Garage Door Rollixo" + }, + { + "type": 1, + "name": "core:PriorityLockTimerState", + "value": 0 + }, + { + "type": 3, + "name": "io:PriorityLockOriginatorState", + "value": "unknown" + } + ], + "attributes": [ + { + "name": "core:Manufacturer", + "type": 3, + "value": "Somfy" + }, + { + "name": "core:FirmwareRevision", + "type": 3, + "value": "5105491C15" + } + ], + "enabled": true, + "label": "Garage Door Rollixo", + "controllableName": "io:DiscreteGarageOpenerIOComponent", + "subsystemId": 0, + "definition": { + "commands": [ + { + "nparams": 0, + "commandName": "up" + }, + { + "nparams": 0, + "commandName": "close" + }, + { + "nparams": 1, + "commandName": "addLockLevel", + "paramsSig": "p1,*p2" + }, + { + "nparams": 0, + "commandName": "resetLockLevels" + }, + { + "nparams": 1, + "commandName": "removeLockLevel", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "executeManufacturerProcedure", + "paramsSig": "p1,*p2" + }, + { + "nparams": 1, + "commandName": "writeManufacturerData", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "readManufacturerData", + "paramsSig": "p1" + }, + { + "nparams": 0, + "commandName": "unpairAllOneWayControllers" + }, + { + "nparams": 0, + "commandName": "stopIdentify" + }, + { + "nparams": 0, + "commandName": "startIdentify" + }, + { + "nparams": 1, + "commandName": "pairOneWayController", + "paramsSig": "p1,*p2" + }, + { + "nparams": 1, + "commandName": "delayedStopIdentify", + "paramsSig": "p1" + }, + { + "nparams": 0, + "commandName": "sendIOKey" + }, + { + "nparams": 0, + "commandName": "unpairAllOneWayControllersAndDeleteNode" + }, + { + "nparams": 1, + "commandName": "wink", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "setConfigState", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "advancedRefresh", + "paramsSig": "p1,*p2" + }, + { + "nparams": 1, + "commandName": "setName", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "unpairOneWayController", + "paramsSig": "p1,*p2" + }, + { + "nparams": 2, + "commandName": "runManufacturerSettingsCommand", + "paramsSig": "p1,p2" + }, + { + "nparams": 0, + "commandName": "getName" + }, + { + "nparams": 0, + "commandName": "stop" + }, + { + "nparams": 0, + "commandName": "open" + }, + { + "nparams": 0, + "commandName": "keepOneWayControllersAndDeleteNode" + }, + { + "nparams": 0, + "commandName": "identify" + }, + { + "nparams": 0, + "commandName": "down" + } + ], + "states": [ + { + "name": "core:AdditionalStatusState" + }, + { + "name": "core:PriorityLockTimerState" + }, + { + "name": "io:PriorityLockLevelState" + }, + { + "name": "io:PriorityLockOriginatorState" + }, + { + "name": "core:StatusState" + }, + { + "name": "core:ManufacturerSettingsState" + }, + { + "name": "core:ManufacturerDiagnosticsState" + }, + { + "name": "core:CommandLockLevelsState" + }, + { + "name": "core:NameState" + }, + { + "name": "core:DiscreteRSSILevelState" + }, + { + "name": "core:RSSILevelState" + }, + { + "name": "core:OpenClosedUnknownState" + } + ], + "widgetName": "DiscretePositionableGarageDoor", + "uiClass": "GarageDoor", + "type": "ACTUATOR" + } } ] } diff --git a/tests/components/overkiz/snapshots/test_button.ambr b/tests/components/overkiz/snapshots/test_button.ambr index 4007a0670166cc..e331b720fed308 100644 --- a/tests/components/overkiz/snapshots/test_button.ambr +++ b/tests/components/overkiz/snapshots/test_button.ambr @@ -2204,160 +2204,6 @@ 'state': 'unknown', }) # --- -# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_identify-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': , - 'entity_id': 'button.garage_door_rollixo_identify', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Identify', - 'options': dict({ - }), - 'original_device_class': , - 'original_icon': 'mdi:human-greeting-variant', - 'original_name': 'Identify', - 'platform': 'overkiz', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'io://1234-1234-6233/12745774-startIdentify', - 'unit_of_measurement': None, - }) -# --- -# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_identify-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'identify', - 'friendly_name': 'Garage Door Rollixo Identify', - 'icon': 'mdi:human-greeting-variant', - }), - 'context': , - 'entity_id': 'button.garage_door_rollixo_identify', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_start_identify-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': , - 'entity_id': 'button.garage_door_rollixo_start_identify', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Start identify', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': 'mdi:human-greeting-variant', - 'original_name': 'Start identify', - 'platform': 'overkiz', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'io://1234-1234-6233/12745774-identify', - 'unit_of_measurement': None, - }) -# --- -# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_start_identify-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Garage Door Rollixo Start identify', - 'icon': 'mdi:human-greeting-variant', - }), - 'context': , - 'entity_id': 'button.garage_door_rollixo_start_identify', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- -# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_stop_identify-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': , - 'entity_id': 'button.garage_door_rollixo_stop_identify', - 'has_entity_name': True, - 'hidden_by': None, - 'icon': None, - 'id': , - 'labels': set({ - }), - 'name': None, - 'object_id_base': 'Stop identify', - 'options': dict({ - }), - 'original_device_class': None, - 'original_icon': 'mdi:human-greeting-variant', - 'original_name': 'Stop identify', - 'platform': 'overkiz', - 'previous_unique_id': None, - 'suggested_object_id': None, - 'supported_features': 0, - 'translation_key': None, - 'unique_id': 'io://1234-1234-6233/12745774-stopIdentify', - 'unit_of_measurement': None, - }) -# --- -# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_rollixo_stop_identify-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'friendly_name': 'Garage Door Rollixo Stop identify', - 'icon': 'mdi:human-greeting-variant', - }), - 'context': , - 'entity_id': 'button.garage_door_rollixo_stop_identify', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'unknown', - }) -# --- # name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.garage_door_start_identify-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/overkiz/snapshots/test_cover.ambr b/tests/components/overkiz/snapshots/test_cover.ambr index cc062de69c18bb..fc3529d90e8371 100644 --- a/tests/components/overkiz/snapshots/test_cover.ambr +++ b/tests/components/overkiz/snapshots/test_cover.ambr @@ -1349,59 +1349,6 @@ 'state': 'closed', }) # --- -# name: test_cover_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][cover.garage_door_rollixo-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.garage_door_rollixo', - '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': 'io://1234-1234-6233/12745774', - 'unit_of_measurement': None, - }) -# --- -# name: test_cover_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][cover.garage_door_rollixo-state] - StateSnapshot({ - 'attributes': ReadOnlyDict({ - 'device_class': 'garage', - 'friendly_name': 'Garage Door Rollixo', - 'is_closed': True, - 'supported_features': , - }), - 'context': , - 'entity_id': 'cover.garage_door_rollixo', - 'last_changed': , - 'last_reported': , - 'last_updated': , - 'state': 'closed', - }) -# --- # name: test_cover_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][cover.garden_gate-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ @@ -3569,6 +3516,59 @@ 'state': 'open', }) # --- +# name: test_cover_entities_snapshot[local_somfy_tahoma_v2_europe.json][cover.garage_door_rollixo-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.garage_door_rollixo', + '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': 'io://1234-5678-3293/12745774', + 'unit_of_measurement': None, + }) +# --- +# name: test_cover_entities_snapshot[local_somfy_tahoma_v2_europe.json][cover.garage_door_rollixo-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + 'device_class': 'garage', + 'friendly_name': 'Garage Door Rollixo', + 'is_closed': True, + 'supported_features': , + }), + 'context': , + 'entity_id': 'cover.garage_door_rollixo', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'closed', + }) +# --- # name: test_cover_entities_snapshot[local_somfy_tahoma_v2_europe.json][cover.garden_pergola-entry] EntityRegistryEntrySnapshot({ 'aliases': list([ diff --git a/tests/components/overkiz/test_cover.py b/tests/components/overkiz/test_cover.py index e06440ee4d84b2..170cf5f6492857 100644 --- a/tests/components/overkiz/test_cover.py +++ b/tests/components/overkiz/test_cover.py @@ -115,8 +115,8 @@ "cover.kitchen_sheer_screen", ) DISCRETE_GARAGE_DOOR = FixtureDevice( - "setup/cloud_somfy_tahoma_v2_europe.json", - "io://1234-1234-6233/12745774", + "setup/local_somfy_tahoma_v2_europe.json", + "io://1234-5678-3293/12745774", "cover.garage_door_rollixo", ) DYNAMIC_GARAGE_DOOR = FixtureDevice(