The below error shows in the logs as soon as I refresh my “template entities”. However, when I go to use the template tester in developer tools no errors are produced.
Can someone show/ teach me how to fix that?
{% if is_state('binary_sensor.overnight', 'off') %}
{% set temp = states('sensor.todays_high_temp')|int %}
{% else %}
{% set temp = states('weather.home.attributes.temperature') %}
{% endif %}
{%- if states('sensor.todays_high_temp')|int > 63 %}
{%- if states('sensor.todays_high_temp')|int < 80 %}
Nice
{% elif states('sensor.todays_high_temp')|int > 95 %}
Hot
{% else %}
Toasty
{%- endif %}
{% elif states('sensor.todays_high_temp')|int < 64 %}
{%- if states('sensor.todays_high_temp')|int < 32 %}
Freezing
{% elif states('sensor.todays_high_temp')|int > 50 %}
Chilly
{% else %}
Cold
{%- endif %}
{% else %}
Unknown
{%- endif %}
TemplateError('ValueError: Template error: int got invalid input 'unavailable' when rendering template '# {% if is_state('binary_sensor.overnight', 'off') %} # {% set temp = states('sensor.todays_high_temp')|int %} # {% else %} # {% set temp = states('weather.home.attributes.temperature') %} # {% endif %} {%- if states('sensor.todays_high_temp')|int > 63 %} {%- if states('sensor.todays_high_temp')|int < 80 %} Nice {% elif states('sensor.todays_high_temp')|int > 95 %} Hot {% else %} Toasty {%- endif %} {% elif states('sensor.todays_high_temp')|int < 64 %} {%- if states('sensor.todays_high_temp')|int < 32 %} Freezing {% elif states('sensor.todays_high_temp')|int > 50 %} Chilly {% else %} Cold {%- endif %} {% else %} Unknown {%- endif %}' but no default was specified') while processing template 'Template<template=(# {% if is_state('binary_sensor.overnight', 'off') %} # {% set temp = states('sensor.todays_high_temp')|int %} # {% else %} # {% set temp = states('weather.home.attributes.temperature') %} # {% endif %} {%- if states('sensor.todays_high_temp')|int > 63 %} {%- if states('sensor.todays_high_temp')|int < 80 %} Nice {% elif states('sensor.todays_high_temp')|int > 95 %} Hot {% else %} Toasty {%- endif %} {% elif states('sensor.todays_high_temp')|int < 64 %} {%- if states('sensor.todays_high_temp')|int < 32 %} Freezing {% elif states('sensor.todays_high_temp')|int > 50 %} Chilly {% else %} Cold {%- endif %} {% else %} Unknown {%- endif %}) renders=4>' for attribute '_attr_native_value' in entity 'sensor.clothing_forecast'