I currently have a few different thermometers around the house. Some use wifi, some use zwave and one of them is my thermostat. Is there an easy way to group them in one place so I don’t have to update my 3 combined sensors each time I add a new one?
For instance say I have upstairs, bedroom 1 and Living Room thermostats. I have 3 sensors for Min, Avg, & Max that have these 3 entities. If I add a new temperature sensor for downstairs I need to now add an entity in 3 separate places(The horror right? /s).
Is there a way to create a group that has all the entities and then use that group in some way to fill out my helpers so it’s only one update?
There are a number of routes you could take, but they’re all going to require some degree of Templating.
One way to approach it would be to set up a Group Helper with its type set to “Arithmetic Mean”. Then set up the Min and Max sensors as Template Sensors; using templates based on the group helper.
Example Minimum sensor template:
{{ state_attr('sensor.example', 'entity_id')
| select('has_value') | map('states')
| map('float') | list
| min }}
The template for the Maximum is exactly the same except with max
at the end instead of min
.
1 Like
This is perfect! Thank you so much. I didn’t have enough templating knowledge to do this. I got this working and love it. Add one sensor to the group and it works by updating the other two sensors. Thanks again!
1 Like