From 6d49bdc8f030a90c58ac93c7dd8a024595247d34 Mon Sep 17 00:00:00 2001 From: epenet <6771947+epenet@users.noreply.github.com> Date: Sun, 29 Nov 2026 19:11:58 +0100 Subject: [PATCH] Use the scene action enum in the script helper (#195035) --- homeassistant/helpers/script.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/homeassistant/helpers/script.py b/homeassistant/helpers/script.py index 6c4a30e1167f..795cc06c3071 100644 --- a/homeassistant/helpers/script.py +++ b/homeassistant/helpers/script.py @@ -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,