diff --git a/homeassistant/components/overkiz/cover.py b/homeassistant/components/overkiz/cover.py index 518d6e520517..3c650ca559e8 100644 --- a/homeassistant/components/overkiz/cover.py +++ b/homeassistant/components/overkiz/cover.py @@ -89,6 +89,18 @@ COVER_DESCRIPTIONS: list[OverkizCoverDescription] = [ is_closed_state=OverkizState.CORE_OPEN_CLOSED, ), # Needs override to omit is_closed_state, since OpenClosedState is unreliable + # uiClass is Awning + OverkizCoverDescription( + key=UIWidget.POSITIONABLE_HORIZONTAL_AWNING_UNO, + device_class=CoverDeviceClass.AWNING, + current_position_state=OverkizState.CORE_DEPLOYMENT, + set_position_command=OverkizCommand.SET_DEPLOYMENT, + open_command=OverkizCommand.DEPLOY, + close_command=OverkizCommand.UNDEPLOY, + stop_command=OverkizCommand.STOP, + invert_position=False, + ), + # Needs override to omit is_closed_state, since OpenClosedState is unreliable # uiClass is RollerShutter OverkizCoverDescription( key=UIWidget.POSITIONABLE_ROLLER_SHUTTER_UNO, diff --git a/tests/components/overkiz/fixtures/setup/local_somfy_connexoon_europe.json b/tests/components/overkiz/fixtures/setup/local_somfy_connexoon_europe.json index f022c2071f6e..a714645cee03 100644 --- a/tests/components/overkiz/fixtures/setup/local_somfy_connexoon_europe.json +++ b/tests/components/overkiz/fixtures/setup/local_somfy_connexoon_europe.json @@ -375,6 +375,260 @@ "uiClass": "Awning" } }, + { + "deviceURL": "io://1234-1234-1234/5928358", + "available": true, + "synced": true, + "type": 1, + "states": [ + { + "type": 3, + "name": "core:StatusState", + "value": "available" + }, + { + "type": 3, + "name": "core:DiscreteRSSILevelState", + "value": "good" + }, + { + "type": 1, + "name": "core:RSSILevelState", + "value": 88 + }, + { + "type": 1, + "name": "core:DeploymentState", + "value": 0 + }, + { + "type": 11, + "name": "core:ManufacturerSettingsState", + "value": { + "currentPosition": 0 + } + }, + { + "type": 3, + "name": "core:OpenClosedState", + "value": "open" + }, + { + "type": 1, + "name": "core:TargetClosureState", + "value": 0 + }, + { + "type": 6, + "name": "core:MovingState", + "value": false + }, + { + "type": 3, + "name": "core:NameState", + "value": "Pergola Awning" + }, + { + "type": 1, + "name": "core:Memorized1PositionState", + "value": 105 + } + ], + "label": "Pergola Awning", + "subsystemId": 0, + "attributes": [ + { + "type": 3, + "name": "core:Manufacturer", + "value": "Somfy" + }, + { + "type": 3, + "name": "core:FirmwareRevision", + "value": "5071665X10\u0003" + } + ], + "enabled": true, + "controllableName": "io:HorizontalAwningIOComponent", + "definition": { + "states": [ + { + "name": "core:AdditionalStatusState" + }, + { + "name": "core:DeploymentState" + }, + { + "name": "core:DiscreteRSSILevelState" + }, + { + "name": "core:ManufacturerSettingsState" + }, + { + "name": "core:Memorized1PositionState" + }, + { + "name": "core:MovingState" + }, + { + "name": "core:NameState" + }, + { + "name": "core:OpenClosedState" + }, + { + "name": "core:RSSILevelState" + }, + { + "name": "core:SecuredPositionState" + }, + { + "name": "core:StatusState" + }, + { + "name": "core:TargetClosureState" + } + ], + "widgetName": "PositionableHorizontalAwningUno", + "type": "ACTUATOR", + "commands": [ + { + "nparams": 1, + "commandName": "advancedRefresh", + "paramsSig": "p1" + }, + { + "commandName": "close", + "nparams": 0 + }, + { + "nparams": 1, + "commandName": "delayedStopIdentify", + "paramsSig": "p1" + }, + { + "commandName": "deploy", + "nparams": 0 + }, + { + "commandName": "down", + "nparams": 0 + }, + { + "commandName": "getName", + "nparams": 0 + }, + { + "commandName": "identify", + "nparams": 0 + }, + { + "commandName": "keepOneWayControllersAndDeleteNode", + "nparams": 0 + }, + { + "commandName": "my", + "nparams": 0 + }, + { + "commandName": "open", + "nparams": 0 + }, + { + "nparams": 1, + "commandName": "pairOneWayController", + "paramsSig": "p1,*p2" + }, + { + "commandName": "refreshMemorized1Position", + "nparams": 0 + }, + { + "nparams": 2, + "commandName": "runManufacturerSettingsCommand", + "paramsSig": "p1,p2" + }, + { + "commandName": "sendIOKey", + "nparams": 0 + }, + { + "nparams": 1, + "commandName": "setClosure", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "setConfigState", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "setDeployment", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "setMemorized1Position", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "setName", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "setPosition", + "paramsSig": "p1" + }, + { + "nparams": 1, + "commandName": "setSecuredPosition", + "paramsSig": "p1" + }, + { + "commandName": "startIdentify", + "nparams": 0 + }, + { + "commandName": "stop", + "nparams": 0 + }, + { + "commandName": "stopIdentify", + "nparams": 0 + }, + { + "commandName": "undeploy", + "nparams": 0 + }, + { + "commandName": "unpairAllOneWayControllers", + "nparams": 0 + }, + { + "commandName": "unpairAllOneWayControllersAndDeleteNode", + "nparams": 0 + }, + { + "nparams": 1, + "commandName": "unpairOneWayController", + "paramsSig": "p1,*p2" + }, + { + "commandName": "up", + "nparams": 0 + }, + { + "nparams": 1, + "commandName": "wink", + "paramsSig": "p1" + } + ], + "uiClass": "Awning" + } + }, { "deviceURL": "io://1234-1234-1234/16516299", "available": true, diff --git a/tests/components/overkiz/snapshots/test_cover.ambr b/tests/components/overkiz/snapshots/test_cover.ambr index f2bf58ab2ec1..d8d51fcaf87c 100644 --- a/tests/components/overkiz/snapshots/test_cover.ambr +++ b/tests/components/overkiz/snapshots/test_cover.ambr @@ -2638,6 +2638,60 @@ 'state': 'closed', }) # --- +# name: test_cover_entities_snapshot[local_somfy_connexoon_europe.json][cover.pergola_awning-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.pergola_awning', + '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-1234/5928358', + 'unit_of_measurement': None, + }) +# --- +# name: test_cover_entities_snapshot[local_somfy_connexoon_europe.json][cover.pergola_awning-state] + StateSnapshot({ + 'attributes': ReadOnlyDict({ + : 0, + : 'awning', + : 'Pergola Awning', + : True, + : , + }), + 'context': , + 'entity_id': 'cover.pergola_awning', + 'last_changed': , + 'last_reported': , + 'last_updated': , + 'state': 'closed', + }) +# --- # name: test_cover_entities_snapshot[local_somfy_connexoon_europe.json][cover.terrace_awning-entry] EntityRegistryEntrySnapshot({ 'aliases': list([