Skip to content

Commit

Permalink
Use slugify to resolve device names (AI Motion description (automatio…
Browse files Browse the repository at this point in the history
…n.ai_motion_description) has an unknown action #121)
  • Loading branch information
valentinfrlch committed Jan 1, 2025
1 parent 0931519 commit 0a5cee7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blueprints/event_summary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit 0a5cee7

Please sign in to comment.