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

Update sensor.py #1

Merged
merged 1 commit into from
Sep 27, 2023
Merged

Update sensor.py #1

merged 1 commit into from
Sep 27, 2023

Conversation

ArchaicRider
Copy link
Owner

Ensure that should_update only triggers in minutes 1-5 and 31-35 past the hour

Description

Current code will trigger twice in six minutes if 5 min schedule is 0,5,10... to 55. Change to code ensures triggers only once

Motivation and Context

This stops the data request from triggering twice in six minutes
Fixes issue #361

How Has This Been Tested?

This was tested by making the change on my system and restarting the instance at exactly zero minutes on the hour, before the change I'd get data requested at 0, 5, 30, & 35 minutes past the hour, afterwards just at 0 & 30.

Types of changes

  • [x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Ensure that should_update only triggers in minutes 1-5 and 31-35 past the hour
@ArchaicRider ArchaicRider merged commit 7013e76 into main Sep 27, 2023
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.

1 participant