Merge pull request #514 from edwardtfn/patch-16
Fix for "Error rendering data template"
This commit is contained in:
@@ -4577,7 +4577,12 @@ action:
|
||||
- service: "{{ command_text_printf }}"
|
||||
data:
|
||||
component: "{{ repeat.item.row }}_state"
|
||||
message: '{{ states(repeat.item.entity) |round(1) }}{{ state_attr(repeat.item.entity, "unit_of_measurement") }}'
|
||||
message: >
|
||||
{% if is_number(states(repeat.item.entity)) %}
|
||||
{{ states(repeat.item.entity) | round(1) }}{{ state_attr(repeat.item.entity, "unit_of_measurement") if state_attr(repeat.item.entity, "unit_of_measurement") else '' }}
|
||||
{% else %}
|
||||
{{ states(repeat.item.entity) | default('unknown') }}
|
||||
{% endif %}
|
||||
|
||||
##### Set notify icon #####
|
||||
- variables:
|
||||
|
||||
Reference in New Issue
Block a user