mirror of
https://github.com/thejeffreystone/home-assistant-configuration.git
synced 2025-02-09 00:55:08 +00:00
18 lines
487 B
YAML
Executable File
18 lines
487 B
YAML
Executable File
>
|
|
{% macro getIntro() %}
|
|
|
|
{% endmacro %}
|
|
{# a macro that removes all newline characters, empty spaces, and returns formatted text #}
|
|
{%- macro cleanup(data) -%}
|
|
{%- for item in data.split("\n") if item | trim != "" -%}
|
|
{{ item | trim }} {% endfor -%}
|
|
{%- endmacro -%}
|
|
|
|
{# a macro to call all macros :) #}
|
|
{%- macro mother_of_all_macros() -%}
|
|
{{ getIntro() }}
|
|
|
|
{%- endmacro -%}
|
|
|
|
{# Call the macro #}
|
|
{{- cleanup(mother_of_all_macros()) -}} |