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
3 changes: 3 additions & 0 deletions homeassistant/components/overkiz/cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ class OverkizCoverDescription(CoverEntityDescription):
OverkizCoverDescription(
key=UIClass.PERGOLA,
device_class=CoverDeviceClass.AWNING,
open_command=OverkizCommand.OPEN,
close_command=OverkizCommand.CLOSE,
stop_command=OverkizCommand.STOP,
is_closed_state=OverkizState.CORE_SLATS_OPEN_CLOSED,
current_tilt_position_state=OverkizState.CORE_SLATE_ORIENTATION,
set_tilt_position_command=OverkizCommand.SET_ORIENTATION,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,71 @@
"uiClass": "Pergola"
}
},
{
"deviceURL": "rts://1234-5678-3293/16757826",
"available": true,
"synced": true,
"type": 1,
"states": [],
"label": "Kitchen Pergola",
"subsystemId": 0,
"attributes": [],
"enabled": true,
"controllableName": "rts:BioclimaticPergolaRTSComponent",
"definition": {
"states": [],
"widgetName": "UpDownBioclimaticPergola",
"type": "ACTUATOR",
"attributes": [],
"commands": [
{
"commandName": "identify",
"nparams": 0
},
{
"nparams": 2,
"commandName": "tiltPositive",
"paramsSig": "p1,p2"
},
{
"nparams": 0,
"commandName": "my",
"paramsSig": "*p1"
},
{
"nparams": 0,
"commandName": "stop",
"paramsSig": "*p1"
},
{
"nparams": 2,
"commandName": "tiltNegative",
"paramsSig": "p1,p2"
},
{
"nparams": 0,
"commandName": "close",
"paramsSig": "*p1"
},
{
"nparams": 0,
"commandName": "down",
"paramsSig": "*p1"
},
{
"nparams": 0,
"commandName": "open",
"paramsSig": "*p1"
},
{
"nparams": 0,
"commandName": "up",
"paramsSig": "*p1"
}
],
"uiClass": "Pergola"
}
},
{
"creationTime": 1686173907452,
"deviceURL": "rts://1234-5678-3293/16757362",
Expand Down
54 changes: 54 additions & 0 deletions tests/components/overkiz/snapshots/test_cover.ambr
Original file line number Diff line number Diff line change
Expand Up @@ -3303,6 +3303,60 @@
'state': 'closed',
})
# ---
# name: test_cover_entities_snapshot[local_somfy_tahoma_v2_europe.json][cover.kitchen_pergola-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.kitchen_pergola',
'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.AWNING: 'awning'>,
'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': 'rts://1234-5678-3293/16757826',
'unit_of_measurement': None,
})
# ---
# name: test_cover_entities_snapshot[local_somfy_tahoma_v2_europe.json][cover.kitchen_pergola-state]
StateSnapshot({
'attributes': ReadOnlyDict({
'assumed_state': True,
'device_class': 'awning',
'friendly_name': 'Kitchen Pergola',
'is_closed': None,
'supported_features': <CoverEntityFeature: 11>,
}),
'context': <ANY>,
'entity_id': 'cover.kitchen_pergola',
'last_changed': <ANY>,
'last_reported': <ANY>,
'last_updated': <ANY>,
'state': 'unknown',
})
# ---
# name: test_cover_entities_snapshot[local_somfy_tahoma_v2_europe.json][cover.living_room_curtain-entry]
EntityRegistryEntrySnapshot({
'aliases': list([
Expand Down
29 changes: 29 additions & 0 deletions tests/components/overkiz/test_cover.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
"io://1234-5678-3293/7614902",
"cover.garden_pergola",
)
UP_DOWN_BIOCLIMATIC_PERGOLA = FixtureDevice(
"setup/local_somfy_tahoma_v2_europe.json",
"rts://1234-5678-3293/16757826",
"cover.kitchen_pergola",
)
RTS = FixtureDevice(
"setup/cloud_somfy_connexoon_rts_asia.json",
"rts://1234-1234-6362/16730022",
Expand Down Expand Up @@ -162,6 +167,13 @@ async def test_cover_entities_snapshot(
(DYNAMIC_GARAGE_DOOR, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING),
(DYNAMIC_GARAGE_DOOR_OGP, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING),
(PARTIAL_GARAGE_DOOR, SERVICE_OPEN_COVER, "open", None, CoverState.OPENING),
(
UP_DOWN_BIOCLIMATIC_PERGOLA,
SERVICE_OPEN_COVER,
"open",
[0],
CoverState.OPENING,
),
(TILT_ONLY_VENETIAN_BLIND, SERVICE_OPEN_COVER, "open", [0], CoverState.OPENING),
(SHUTTER, SERVICE_CLOSE_COVER, "close", None, CoverState.CLOSING),
(AWNING, SERVICE_CLOSE_COVER, "undeploy", None, CoverState.CLOSING),
Expand All @@ -175,6 +187,13 @@ async def test_cover_entities_snapshot(
CoverState.CLOSING,
),
(PARTIAL_GARAGE_DOOR, SERVICE_CLOSE_COVER, "close", None, CoverState.CLOSING),
(
UP_DOWN_BIOCLIMATIC_PERGOLA,
SERVICE_CLOSE_COVER,
"close",
[0],
CoverState.CLOSING,
),
(
TILT_ONLY_VENETIAN_BLIND,
SERVICE_CLOSE_COVER,
Expand All @@ -188,6 +207,13 @@ async def test_cover_entities_snapshot(
(DYNAMIC_GARAGE_DOOR, SERVICE_STOP_COVER, "stop", None, CoverState.CLOSED),
(DYNAMIC_GARAGE_DOOR_OGP, SERVICE_STOP_COVER, "stop", None, CoverState.CLOSED),
(PARTIAL_GARAGE_DOOR, SERVICE_STOP_COVER, "stop", None, CoverState.CLOSED),
(
UP_DOWN_BIOCLIMATIC_PERGOLA,
SERVICE_STOP_COVER,
"stop",
[0],
STATE_UNKNOWN,
),
(TILT_ONLY_VENETIAN_BLIND, SERVICE_STOP_COVER, "stop", [0], STATE_UNKNOWN),
(
TILT_ONLY_VENETIAN_BLIND,
Expand Down Expand Up @@ -218,20 +244,23 @@ async def test_cover_entities_snapshot(
"open-dynamic-garage-door",
"open-dynamic-garage-door-ogp",
"open-partial-garage-door",
"open-up-down-bioclimatic-pergola",
"open-tilt-only-venetian-blind",
"close-roller-shutter",
"close-awning",
"close-garage-door",
"close-dynamic-garage-door",
"close-dynamic-garage-door-ogp",
"close-partial-garage-door",
"close-up-down-bioclimatic-pergola",
"close-tilt-only-venetian-blind",
"stop-roller-shutter",
"stop-awning",
"stop-garage-door",
"stop-dynamic-garage-door",
"stop-dynamic-garage-door-ogp",
"stop-partial-garage-door",
"stop-up-down-bioclimatic-pergola",
"stop-tilt-only-venetian-blind",
"open-tilt-tilt-only-venetian-blind",
"close-tilt-tilt-only-venetian-blind",
Expand Down