mirror of
https://github.com/home-assistant/core
synced 2024-09-06 10:29:55 +02:00
Add DemoCover with only tilt controls (#45228)
* Add DemoCover with only tilt controls * Add default tilt position to Pergola Roof * Apply githooks (isort) * Add new demo device to Google Assistant fixtures
This commit is contained in:
parent
7a81ff55bc
commit
9b14586568
@ -3,7 +3,11 @@ from homeassistant.components.cover import (
|
||||
ATTR_POSITION,
|
||||
ATTR_TILT_POSITION,
|
||||
SUPPORT_CLOSE,
|
||||
SUPPORT_CLOSE_TILT,
|
||||
SUPPORT_OPEN,
|
||||
SUPPORT_OPEN_TILT,
|
||||
SUPPORT_SET_TILT_POSITION,
|
||||
SUPPORT_STOP_TILT,
|
||||
CoverEntity,
|
||||
)
|
||||
from homeassistant.core import callback
|
||||
@ -26,6 +30,18 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
||||
device_class="garage",
|
||||
supported_features=(SUPPORT_OPEN | SUPPORT_CLOSE),
|
||||
),
|
||||
DemoCover(
|
||||
hass,
|
||||
"cover_5",
|
||||
"Pergola Roof",
|
||||
tilt_position=60,
|
||||
supported_features=(
|
||||
SUPPORT_OPEN_TILT
|
||||
| SUPPORT_STOP_TILT
|
||||
| SUPPORT_CLOSE_TILT
|
||||
| SUPPORT_SET_TILT_POSITION
|
||||
),
|
||||
),
|
||||
]
|
||||
)
|
||||
|
||||
|
@ -143,6 +143,15 @@ DEMO_DEVICES = [
|
||||
"type": "action.devices.types.BLINDS",
|
||||
"willReportState": False,
|
||||
},
|
||||
{
|
||||
"id": "cover.pergola_roof",
|
||||
"name": {"name": "Pergola Roof"},
|
||||
"traits": [
|
||||
"action.devices.traits.OpenClose",
|
||||
],
|
||||
"type": "action.devices.types.BLINDS",
|
||||
"willReportState": False,
|
||||
},
|
||||
{
|
||||
"id": "cover.hall_window",
|
||||
"name": {"name": "Hall Window"},
|
||||
|
Loading…
Reference in New Issue
Block a user