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

Reduce the number of data produced filtering it #16

Open
McGiverGim opened this issue Dec 16, 2020 · 4 comments
Open

Reduce the number of data produced filtering it #16

McGiverGim opened this issue Dec 16, 2020 · 4 comments
Labels
enhancement New feature or request.

Comments

@McGiverGim
Copy link
Contributor

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

The component produces a lot of data, refreshing sometimes with an update rate of only some seconds between values.

Describe the solution you'd like

Some parameter in the configuration to "reduce" the rate to for example a maximum of 1 value each X seconds. Internally the component can discard values, or made the average of data, or any other filter that can do this.

Describe alternatives you've considered

Add filters directly in Home Assistant (https://www.home-assistant.io/integrations/filter/) and remove the original sensors from the recorder. But I think is more complex and less straightforward.

Additional context

Nothing.

@McGiverGim McGiverGim added the enhancement New feature or request. label Dec 16, 2020
@Limych
Copy link
Owner

Limych commented Dec 16, 2020

Starting from version 0.7.18 of the component, the sensor values are updated with a frequency set by HA itself — for me it is 1 time in 30 seconds for each sensor. And only if the sensor value are changed.
The rest of the time, the component only collects data from cloud in order to use them in the next calculations of sensor values.

@McGiverGim
Copy link
Contributor Author

Then if we internally don't modify the value I Home Assistant will ignore it. Maybe we can add a parameter to not modify this internal value. For example with values that are the average of one or two minutes (or what the user selects).

Is not an important request, but I think it can be useful.

@Limych
Copy link
Owner

Limych commented Dec 16, 2020

Sorry, I did not understand your last message.

Now the logic of work is as follows: as I wrote above, the component remembers all incoming data from the device, but changes the sensor values ​​approximately once every 30 seconds. In addition, the values ​​are passed through a low pass filter to remove bounce in the values.

@McGiverGim
Copy link
Contributor Author

I think you understand it right the first time but I explained it wrong 😁
I wanted to refresh the values of the sensor each 60 or 90 seconds or any other value configurable to produce less data.

Limych added a commit that referenced this issue May 5, 2021
…cache-v2.1.5

Bump actions/cache from v2.1.4 to v2.1.5
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

2 participants