[Bug]: Templates not rendering in 2022.6
totalitarian opened this issue · comments
totalitarian commented
Current Behavior
Normally this code would render state values
- type: custom:mushroom-template-card
style: |
ha-card {
--icon-symbol-size: 1.25em;
--card-mod-icon-color: rgb(33, 150, 243);
}
primary: '[[name]]'
secondary: |-
ㅤ {% if states('[[temperature-chip]]') | float > 0 %}
{{ states('[[temperature-chip]]') | round(0)}} °C {% endif %}
{% if states('[[humidity-chip]]') | float > 0 %}
ㅤ{{ states('[[humidity-chip]]') | round(0) }} %
{% endif %} ㅤ
icon: mdi:[[main-icon]]
Expected Behavior
Rendering the value
Steps To Reproduce
No response
Environment
No response
Anything else?
Paul Bottein commented
What is this syntax [[""]]
? Is it from another plugin ? Mushroom use HA template and this syntax is not supported by default.
totalitarian commented
What is this syntax
[[""]]
? Is it from another plugin ? Mushroom use HA template and this syntax is not supported by default.
It's from the decluttering card here
https://github.com/custom-cards/decluttering-card
Normally works just fine
Paul Bottein commented
I think it's linked to this : home-assistant/core#71687. You should specify a default value for float
.
totalitarian commented
That worked, many thanks!
ㅤ {% if states('[[temperature-chip]]') | float(0) > 0 %}
{{ states('[[temperature-chip]]') | round(0)}} °C
{% endif %}
{% if states('[[humidity-chip]]') | float(0) > 0 %}
ㅤ{{ states('[[humidity-chip]]') | round(0) }} %
{% endif %} ㅤ