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 filtering events when sensors try to update data #198

Closed
wants to merge 2 commits into from

Conversation

Pluimvee
Copy link
Contributor

@Pluimvee Pluimvee commented Oct 7, 2024

The coordinator is called each 60 minutes to refresh its data. However when the sensors try to get the latest data the calculator may not be refreshed.

I call the calculator the logic which filters the data based on the calculation_mode, and uses this dataset to calculate the min(), max(), avg(), perc()

I change the update_data() to sync_calculator() to be more descriptive and added a self.calculator_last_sync member which tracks the hour for which the calculator was last updated

This codes optimizes update #188

@Roeland54
Copy link
Collaborator

This also contains code from your other work. Please be careful when branching to branch from a branch in sync with the main branch of the project.

@Pluimvee Pluimvee closed this Oct 8, 2024
@Pluimvee Pluimvee deleted the Reduce-update-calls branch October 8, 2024 11:31
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

Successfully merging this pull request may close these issues.

2 participants