Fix controls for UpDownGarageDoor4T and additional 4T covers in Overkiz (#171144)

This commit is contained in:
Mick Vleeshouwer
2026-05-19 09:22:31 +02:00
committed by GitHub
parent 1982dd9085
commit 9e22711874
5 changed files with 177 additions and 0 deletions
+25
View File
@@ -237,6 +237,31 @@ COVER_DESCRIPTIONS: list[OverkizCoverDescription] = [
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
@@ -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,
@@ -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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'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': <ANY>,
'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': <ANY>,
'entity_id': 'button.rts_garage_door_4t_toggle',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_button_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][button.rts_gate_toggle-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
@@ -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': <ANY>,
'config_subentry_id': <ANY>,
'device_class': None,
'device_id': <ANY>,
'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': <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: 3>,
'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': <CoverEntityFeature: 3>,
}),
'context': <ANY>,
'entity_id': 'cover.rts_garage_door_4t',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_cover_entities_snapshot[cloud_somfy_tahoma_v2_europe.json][cover.rts_gate-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
+9
View File
@@ -139,6 +139,11 @@ RTS_GATE_4T = FixtureDevice(
"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",