Hi there, I do get them same warnings but could not find the cause, could anybody help on that? Thanks!
- Template warning: ‘float’ got invalid input ‘unavailable’ when rendering template ‘{% set daily_min = states(‘sensor.daily_wohnen_temp_min’) | float %} {% set current = states(‘sensor.indoor_temperature’) | float %} {% if daily_min == ‘unknown’ %} 99 {% elif (now().hour == 0 and now().minute == 0) %} {{ current | float }} {% else %} {{ current if current <= daily_min | float else daily_min | float }} {% endif %}’ but no default was specified. Currently ‘float’ will return ‘0’, however this template will fail to render in Home Assistant core 2021.12
and the code is:
value_template: >-
{% set daily_min = states('sensor.daily_outdoor_temp_min') | float %}
{% set current = states('sensor.outdoor_temperature') | float %}
{% if daily_min == 'unknown' %}
99
{% elif (now().hour == 0 and now().minute == 0) %}
{{ current | float }}
{% else %}
{{ current if current <= daily_min | float else daily_min | float }}
{% endif %}