I’m trying to create an automation that doesn’t require me to hard code every sensor entity name into the trigger.
I have ecobee thermostats, and each thermostat also has an additional occupancy sensor attached to it.
So for my thermostat named
upstairs there are two binary sensors
And I have another thermostat
downstairs so I would have two more binary_sensors similarly named. I also have a few other sensors that are named
What I want to happen is if more than ONE (1) sensor whose name matches
binary_sensor.XXX_occupancy is on/true then run the automation.
This smells like a template trigger to fire anytime a binary sensor whose name ends with _occupancy, and a condition template counting the number of those same entity name matches.
Can you suggest what this automation would look like that doesn’t require hard coding of the sensor names?
Pinging @123 as it looks like you’ve seen this request before.