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 fixturespull/45385/head
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