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

Feature Request: Add throttle_average #131

Open
hanley-development opened this issue Feb 21, 2023 · 0 comments
Open

Feature Request: Add throttle_average #131

hanley-development opened this issue Feb 21, 2023 · 0 comments

Comments

@hanley-development
Copy link

hanley-development commented Feb 21, 2023

Instead of having a continuous stream and so that there aren't 5000 points of data per day can throttle average be added to the sensor?

Another workaround would be to create a way to optionally only send through template rather than sensor directly. throttle_average could be applied to template sensor.

throttle_average
An average over the specified time period, potentially throttling incoming values. When this filter gets incoming values, it sums up all values and pushes out the average after the specified time period passed. There are two edge cases to consider within the specified time period:

no value(s) received: NaN is returned - add the heartbeat filter if periodical pushes are required and/or filter_out: nan if required

one value received: the value is pushed out after the specified time period passed, without calculating an average

For example a throttle_average: 60s will push out a value every 60 seconds, in case at least one sensor value is received within these 60 seconds.

# Take a measurement every 10s but only report the average 
# every 300s. This is to overcome the noisy ADC on the ESP32.
   update_interval: 10s
   filters:
     - throttle_average: 300s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant