Skip to content

Commit

Permalink
Merge pull request #91 from jukkapirinen/main
Browse files Browse the repository at this point in the history
Allow hyphen and underscore in device_name
  • Loading branch information
valentinfrlch authored Nov 16, 2024
2 parents 4e1dca0 + 9d7d4eb commit b07aa6c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blueprints/event_summary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,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("[^a-z0-9 ]", "") | replace(" ", "_") %}
{% set sanitized_name = "mobile_app_" + device_name | lower | regex_replace("[^a-z0-9_\- ]", "") | replace(" ", "_") | replace("-", "_") %}
{% set ns.device_names = ns.device_names + [sanitized_name] %}
{% endfor %}
{{ ns.device_names }}
Expand Down Expand Up @@ -388,4 +388,4 @@ action:
clickAction: !input tap_navigate #Android
tag: "{{tag}}"
group: "{{group}}"
interruption-level: passive
interruption-level: passive

0 comments on commit b07aa6c

Please sign in to comment.