mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-08-17 19:46:43 +00:00
Update Clean Macros
Replaces all underscores with spaces for Alexa.
This commit is contained in:
@@ -1127,10 +1127,10 @@ script:
|
|||||||
] | random }}
|
] | random }}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
{# a macro that removes all newline characters, empty spaces, and returns formatted text. Also replaces all Underscores with Spaces #}
|
||||||
{%- macro cleanup(data) -%}
|
{%- macro cleanup(data) -%}
|
||||||
{%- for item in data.split("\n") if item | trim != "" -%}
|
{%- for item in data.split("\n") if item | trim != "" -%}
|
||||||
{{ item | trim }} {% endfor -%}
|
{{ item | trim | replace("_", " ") }} {% endfor -%}
|
||||||
{%- endmacro -%}
|
{%- endmacro -%}
|
||||||
|
|
||||||
{# ********************************************* #}
|
{# ********************************************* #}
|
||||||
|
Reference in New Issue
Block a user