mirror of
https://github.com/home-assistant/core.git
synced 2025-08-03 04:35:11 +02:00
Tilt action
This commit is contained in:
@@ -18,6 +18,7 @@ from homeassistant.const import (
|
||||
SERVICE_SET_COVER_POSITION,
|
||||
SERVICE_SET_COVER_TILT_POSITION,
|
||||
SERVICE_STOP_COVER,
|
||||
SERVICE_STOP_COVER_TILT,
|
||||
)
|
||||
from homeassistant.core import Context, HomeAssistant
|
||||
from homeassistant.helpers import config_validation as cv, entity_registry as er
|
||||
@@ -139,6 +140,8 @@ async def async_call_action_from_config(
|
||||
elif config[CONF_TYPE] == "set_tilt_position":
|
||||
service = SERVICE_SET_COVER_TILT_POSITION
|
||||
service_data[ATTR_TILT_POSITION] = config["position"]
|
||||
elif config[CONF_TYPE] == "stop_tilt":
|
||||
service = SERVICE_STOP_COVER_TILT
|
||||
|
||||
await hass.services.async_call(
|
||||
DOMAIN, service, service_data, blocking=True, context=context
|
||||
|
Reference in New Issue
Block a user