From 0a5cee76e2c2d6d13e00739a2614e12961546ee9 Mon Sep 17 00:00:00 2001 From: valentinfrlch Date: Wed, 1 Jan 2025 15:14:36 +0100 Subject: [PATCH] Use slugify to resolve device names (AI Motion description (automation.ai_motion_description) has an unknown action #121) --- blueprints/event_summary.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blueprints/event_summary.yaml b/blueprints/event_summary.yaml index e2051af..7a8061c 100644 --- a/blueprints/event_summary.yaml +++ b/blueprints/event_summary.yaml @@ -203,7 +203,7 @@ variables: {% set ns = namespace(device_names=[]) %} {% for device_id in notify_devices %} {% set device_name = device_attr(device_id, "name") %} - {% set sanitized_name = "mobile_app_" + device_name | lower | regex_replace("[' -]", "_") | regex_replace("[^a-z0-9_]", "") %} + {% set sanitized_name = "mobile_app_" + device_name | slugify %} {% set ns.device_names = ns.device_names + [sanitized_name] %} {% endfor %} {{ ns.device_names }}