Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions homeassistant/components/overkiz/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
}
53 changes: 53 additions & 0 deletions tests/components/overkiz/snapshots/test_cover.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -3516,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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'disabled_by': None,
'domain': 'cover',
'entity_category': None,
'entity_id': 'cover.garage_door_rollixo',
'has_entity_name': True,
'hidden_by': None,
'icon': None,
'id': <ANY>,
'labels': set({
}),
'name': None,
'object_id_base': None,
'options': dict({
}),
'original_device_class': <CoverDeviceClass.GARAGE: 'garage'>,
'original_icon': None,
'original_name': None,
'platform': 'overkiz',
'previous_unique_id': None,
'suggested_object_id': None,
'supported_features': <CoverEntityFeature: 11>,
'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': <CoverEntityFeature: 11>,
}),
'context': <ANY>,
'entity_id': 'cover.garage_door_rollixo',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'closed',
})
# ---
# name: test_cover_entities_snapshot[local_somfy_tahoma_v2_europe.json][cover.garden_pergola-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
Expand Down
11 changes: 11 additions & 0 deletions tests/components/overkiz/test_cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,11 @@
"rts://1234-1234-6362/16753206",
"cover.kitchen_sheer_screen",
)
DISCRETE_GARAGE_DOOR = FixtureDevice(
"setup/local_somfy_tahoma_v2_europe.json",
"io://1234-5678-3293/12745774",
"cover.garage_door_rollixo",
)
DYNAMIC_GARAGE_DOOR = FixtureDevice(
"setup/cloud_somfy_tahoma_v2_europe.json",
"io://1234-1234-6233/16730050",
Expand Down Expand Up @@ -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),
Expand All @@ -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,
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down