Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 105971

How to handle unknown or unavailable states in template entities or automations

$
0
0
* Template warning: 'int' got invalid input 'unknown' when rendering template ...
* Template warning: 'float' got invalid input 'unavailable' when rendering template ...
...
but no default was specified. Currently 'float' will return '0', however this template will fail to render in Home Assistant core 2022.1

I guess I should change something in my templates, but how? If the value is not available, it doesn’t make sense to calculate with this value. So it should probably set the template entity to unknown.

This also includes states for automations:

* Error in 'xyz' trigger: In 'numeric_state' condition: no entity specified

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 105971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>