Limych / ha-average

Average Sensor for Home Assistant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Average only from values registered from the last X secs/mins/hrs.

mareksuski-dell opened this issue · comments

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

Describe the solution you'd like
The average sensor should be configurable to calculate an average only from values registered from the last X secs/mins/hrs.

Describe alternatives you've considered
I didn't find an alternative

Additional context
I am automating my balcony blinds based on the amount of light (lux) hitting two light sensors (top and bottom) that will close or open the blinds. To compensate when the sky is a little bit cloudy and clouds could temporarily cause a smaller amount of light to hit the sensor so I am using an average to smoother the transition high->low or low->high amount of light. It would be great to have the possibility to define from how long in the past registered values would be used in the average calculation.

image

Did you try to replace duration from days to hours, minutes or seconds?