#binary_sensor.yaml (depends on what you have setup might be configuration.yaml)
- platform: template
sensors:
dock_jellyfin_update:
friendly_name: "Jellyfin Update Available"
value_template: "{{ states('sensor.docker_image_jellyfin')|float > 1 }}"
Templating says you can use device class for binary, but for troubleshooting you might what to temporarily remove it.
I’ve read here that it’s better to use state_attrib than states(). I can’t recall why but there is at least one thread here which goes into some detail. I only mention this because there are two working examples here. You may as well start with the “better” option. I had to go back and change a lot of my templates when states() caused some things to break for me.
Two different things, states() returns the current state of that entity which - for the TP-Link HS110 - is either on or off. To identify the state of the connected device (washing machine), I need to monitor the power consumption, which is reported as an attribute. The socket is still in state “on”, even if the washing maschine has come to rest.
This has never been an issue. Your template must have been incorrect. Considering your misunderstanding of this:
It is the most likely scenario.
Read the warning from the documents:
Avoid using states.sensor.temperature.state , instead use states('sensor.temperature') . It is strongly advised to use the states() , is_state() , state_attr() and is_state_attr() as much as possible, to avoid errors and error message when the entity isn’t ready yet (e.g., during Home Assistant startup).