Hello,
I would appreciate some help with a helper template sensor. I’m trying to count the number of devices with an entity that has the Value ‘True’ or ‘1’. This is to see how many thermostats are demanding heat and bring a second boiler online if it exceeds a certain threshold.
I’m new to Home Assistant but not to programming in general (C/C++, Java etc.). I’ve managed to count the number of devices that have this entity, but I can’t figure out how to select the ones that have that value set as true. I’ve tried all sorts of combinations and the template just gives the result ‘unavailable’.
Any help greatly appreciated.
Lee
{{ states | selectattr('entity_id', 'search', 'thermostatic_valve_provide_heat') | list | count }}