I’ve just started playing with HA, so bare with me.
I create a template binary sensor that uses the temp from our freeze. If the temp is above -15 degree Celsius the sensor should be on, else it should be off. It goes like this:
I can observe the sensor under Developer Tools → States and when the temperature changes to above -15, the state changes from off to on. So this is working fine.
I also wanted to try to create a binary sensor using the UI, so I created it using Helpers → Create Helper → Template → Template binary sensor
Initially, the dialog says “This template does not listen for any events and will not update automatically”
When I paste the same template as I use in YAML, the dialog updates to "This template listens for the following state change events:
Entity: sensor.termometer_frys_nere_temperature"
I press “Submit” and the binary sensor is added. I can look it up under Developer Tools → States and observe it.
But this sensor does not change when the temperature gets higher. I assumed that this sensor should work the same way as the one I created in YAML but obviously this is not the case. Or am I doing something wrong? Why is one sensor updating and the other one not? This page says that “Template entities will by default update as soon as any of the referenced data in the template updates”, but this does not seem to be the case here.
Please explain what is going on
Functionally they work the same way regardless of having been added through the GUI or yaml. Did you only paste the template section when defining it as a helper?
Gosh. This is so embarrassing.
I took a look at a graph with temperature and the sensors, and suddenly the GUI sensor (FreezerDemo) updates just like the YAML one:
I had missed that double quote at the beginning. After removing it, it works just as the other senors.
So I was all my mistake Thanks for the help, guys