From e4a1a1d73b2b4e209a1c5a96528cd398e52a9889 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Mon, 12 Feb 2024 17:31:17 +0100 Subject: [PATCH] Fix detecting service calls that use old-style service_template --- custom_components/spook/util.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/custom_components/spook/util.py b/custom_components/spook/util.py index a3ebc777..df92b365 100644 --- a/custom_components/spook/util.py +++ b/custom_components/spook/util.py @@ -256,7 +256,11 @@ def async_find_services_in_sequence( # noqa: C901 for step in sequence: action = cv.determine_script_action(step) - if action == cv.SCRIPT_ACTION_CALL_SERVICE and step.get(CONF_ENABLED, True): + if ( + action == cv.SCRIPT_ACTION_CALL_SERVICE + and CONF_SERVICE in step + and step.get(CONF_ENABLED, True) + ): called_services.add(step[CONF_SERVICE]) if action == cv.SCRIPT_ACTION_CHOOSE: