Add support for weighted average in min/max integration #435
Unanswered
MaJerle
asked this question in
Integration enhancements
Replies: 2 comments 3 replies
-
🏷️ I've automatically added the |
Beta Was this translation helpful? Give feedback.
0 replies
-
E.g. min_max:
- sensor:
- name: ....
entities:
- sensor.kitchen_temperature
- sensor.living_room_temperature
- sensor.office_temperature As for the feature in this request, the only option for grouped information is a list of dictionaries. min_max:
- sensor:
- name: ....
entities:
- entity_id: sensor.kitchen_temperature
weight: 10
- entity_id: sensor.living_room_temperature
weight: 20
- entity_id: sensor.office_temperature
weight: 30 |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Integration name
Min/Max
Link to integration documentation on our website
https://www.home-assistant.io/integrations/min_max/
Describe the enhancement
Currently, the Min/Max integration supports the average (mean) of all the listed entities, with the formula:
With configuration:
New proposal
The proposal is to allow the weight average entities by providing the weight number. The new sum would be calculated with the following math:
with configuration:
Which would calculate the average like:
In case one of the entities is not available, its value and weight is simply removed from the picture.
For YAML structure, user must provide the weight number. I see some options:
entities
where each value hasentity_id
andweight
:Use cases
Use case involves the average temperature in the room or home. The weight distribution shall be performed according to the room size or the overall impact room has to the total temperature.
The solution today is to use the template sensor and implement a loop to:
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions