Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Weighted contribution #83

Open
ACrazyConcept opened this issue Aug 6, 2021 · 2 comments
Open

Weighted contribution #83

ACrazyConcept opened this issue Aug 6, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request.

Comments

@ACrazyConcept
Copy link

Is your feature request related to a problem? Please describe.

No

Describe the solution you'd like

Weighted contribution of sensors.
E.g. if you have three sensors but for whatever reason you prefer that one sensor contributes 50% and the two other sensos only contribute 25% each to the average. Or any other combination.

Not a huge priority but if it doesn't require too much it would be pretty neat.

Describe alternatives you've considered

I can of course just create multiple average sensors or template sensors. But I already have too many.

Additional context

@ACrazyConcept ACrazyConcept added the enhancement New feature or request. label Aug 6, 2021
@Limych Limych self-assigned this Aug 26, 2021
@Limych
Copy link
Owner

Limych commented Aug 26, 2021

Interesting idea. I'll try to add that ability.

Limych added a commit that referenced this issue May 7, 2022
@andjones132
Copy link

Not sure if this is related to this enhancement request or if I should submitted a new request. Please let me know if this needs to be submitted as a new feature request.

I have several light/lux sensors around my home and based on their location, they can return a wide range of values. As is, I believe this ha_average sensor would favor the sensors with the largest values and basically drown out the sensor that return small values. The solution to this problem could be handled by assigning a weight to each sensor in the average calculation, however during different parts of the day that weighting may no longer be applicable as the sun moves from one side of the house to the other. Another alternative maybe to "normalize" the data from each sensor, say between 0 - 1 so that each sensor contribution to the average calculation would be roughly equal. If I want to know the overall lightness or darkness for my entire home regardless of the time of day then I don't want one sensor to dominate as it could be that sensor just happens to pointed in a direction with direct sunlight.

In the graphs below, I have 2 different light sensors. The value in the top left corner of each graph is the actual sensor value, the middle number is the 15 minute average for that one sensor, the value in the top right corner is the 15 min average for all sensors. As you can see the red line that represents the overall average is dominated by the Living Room Sensor. It would be nice if there was an option to make contribution of each sensor roughly equal.

image

Thank you for creating this custom component. This is so much better and easier to use than the builtin Statistics component. I plan to make a Patreon contribution to help support it's further development.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

3 participants