I want to show if the laundry machine has finished, or if it is still running. So I put an monitored power outlet for the laundry, and this seems to work fine.
My dashboard displays all the various energy/power etc consumptions nicely.
So, to make the display a bit more Yes/No friendly, I decided to create a binary sensor for this.
Found this excellent example, Template - Home Assistant which I implemented.
template:
- binary_sensor:
- name: "Washing Machine"
delay_off:
minutes: 5
state: >
"{{ states('sensor.smart_plug_2210195428482851070348e1e9ac2279_power')|float(0) > 0}}"
But this sensor is always showing Off (which I presume is false).
I try it in the template editor, and the state there shows state:True
I change the code in the template, to be <= 0 (to trigger something else), and yes the template editor (when I tried in it) shows state:False now.
But the dashbord, as well as the binary sensor I created still shows Off (false)
I have no clue where I am doing something wrong.
Don’t have the most experience with HA, just started playing with templates and more integrations here.
Found a similar questions when I checked
Below comes a few screenshots that hopefully will illustrate the issue and my configuration a bit more.
What my dashboard shows
What Developers tools - States shows
And my Developers tools - Template
And the binary sensor template it self.
Don’t know how to expand the template code, sorry
And the entity I check for power consumption
And lastly, some version information