HandyHat / ha-hildebrandglow-dcc

Home Assistant integration for UK SMETS (Smart) meters pulling data from the DCC via the Hildebrand Glow API
MIT License
229 stars 31 forks source link

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

Open ArchaicRider opened 9 months ago

ArchaicRider commented 9 months ago

Description

Changed should_update trigger to only trigger twice an hour

Motivation and Context

The current code allows triggers twice in six minutes if the sequence is 0,5,10,15...55 at 0,5,30, & 35 minutes past the hour Fixes issue #361

How Has This Been Tested?

Change the code on my running system and restarted exactly on the hour. Before the change, four runs an hour, afterwards two runs an hour Checked by reviewing the logs

Types of changes