mirror of
https://github.com/CCOSTAN/Home-AssistantConfig.git
synced 2025-08-18 11:16:37 +00:00
Updating all the Customize entries with standardized Templates!
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
You can use this code to quickly create files from the template editor in HA.
|
||||
You can use this code to quickly create files from the template editor in HA. I use it mainly for `emulated_hue`
|
||||
|
||||
#########################################################3
|
||||
Create fast Customize for groups.yaml:
|
||||
@@ -9,7 +9,8 @@ Create fast Customize for groups.yaml:
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{{ state.entity_id }}:
|
||||
friendly_name: '{{ state.attributes.friendly_name if state.attributes.friendly_name is defined else state.name }}'
|
||||
friendly_name: '{{ state.attributes.friendly_name|replace("_"," ",)|title() if state.attributes.friendly_name is defined else state.name|replace("_"," ",)|title() }}'
|
||||
{{-'icon: '+ state.attributes.icon if state.attributes.icon is defined}}
|
||||
emulated_hue: {{state.attributes.emulated_hue if state.attributes.emulated_hue is defined else 'False' }}
|
||||
{%- endfor -%}
|
||||
|
||||
@@ -22,6 +23,21 @@ Create fast Customize for lights.yaml
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{{ state.entity_id }}:
|
||||
friendly_name: '{{ state.attributes.friendly_name if state.attributes.friendly_name is defined else state.name }}'
|
||||
friendly_name: '{{ state.attributes.friendly_name|replace("_"," ",)|title() if state.attributes.friendly_name is defined else state.name|replace("_"," ",)|title() }}'
|
||||
{{-'icon: '+ state.attributes.icon if state.attributes.icon is defined}}
|
||||
emulated_hue: {{state.attributes.emulated_hue if state.attributes.emulated_hue is defined else 'False' }}
|
||||
{%- endfor -%}
|
||||
|
||||
#########################################################
|
||||
Create fast Customize for Input_Boolean.yaml
|
||||
|
||||
{% for state in states.input_boolean -%}
|
||||
{% if loop.first %}
|
||||
{% elif loop.last %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{{ state.entity_id }}:
|
||||
friendly_name: '{{ state.attributes.friendly_name|replace("_"," ",)|title() if state.attributes.friendly_name is defined else state.name|replace("_"," ",)|title() }}'
|
||||
{{-'icon: '+ state.attributes.icon if state.attributes.icon is defined}}
|
||||
emulated_hue: {{state.attributes.emulated_hue if state.attributes.emulated_hue is defined else 'False' }}
|
||||
{%- endfor -%}
|
Reference in New Issue
Block a user