GithubHelp home page GithubHelp logo

Weighted contribution about ha-average HOT 2 OPEN

limych avatar limych commented on May 29, 2024
Weighted contribution

from ha-average.

Comments (2)

Limych avatar Limych commented on May 29, 2024

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

from ha-average.

andjones132 avatar andjones132 commented on May 29, 2024

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.

from ha-average.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.