mirror of
https://github.com/home-assistant/core.git
synced 2026-12-03 04:08:19 -04:00
Use the scene action enum in the script helper (#195035)
This commit is contained in:
@@ -16,9 +16,9 @@ import probatio
|
||||
from propcache.api import cached_property
|
||||
|
||||
from homeassistant import exceptions
|
||||
from homeassistant.components import scene
|
||||
from homeassistant.components.device_automation import action as device_action
|
||||
from homeassistant.components.logger import LOGSEVERITY
|
||||
from homeassistant.components.scene import DOMAIN as SCENE_DOMAIN, SceneService
|
||||
from homeassistant.const import (
|
||||
ATTR_DEVICE_ID,
|
||||
ATTR_ENTITY_ID,
|
||||
@@ -64,7 +64,6 @@ from homeassistant.const import (
|
||||
CONF_WAIT_TEMPLATE,
|
||||
CONF_WHILE,
|
||||
EVENT_HOMEASSISTANT_STOP,
|
||||
SERVICE_TURN_ON,
|
||||
TargetKey,
|
||||
)
|
||||
from homeassistant.core import (
|
||||
@@ -1374,8 +1373,8 @@ class _ScriptRun:
|
||||
self._step_log("activate scene")
|
||||
trace_set_result(scene=self._action[CONF_SCENE])
|
||||
await self._hass.services.async_call(
|
||||
scene.DOMAIN,
|
||||
SERVICE_TURN_ON,
|
||||
SCENE_DOMAIN,
|
||||
SceneService.TURN_ON,
|
||||
{TargetKey.ENTITY_ID: self._action[CONF_SCENE]},
|
||||
blocking=True,
|
||||
context=self._context,
|
||||
|
||||
Reference in New Issue
Block a user