Skip to content

Commit

Permalink
Reevaluate averages every hour on the half hour
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanmarlor committed Nov 1, 2022
1 parent b80f24a commit f8d9c13
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions custom_components/foxess_em/average/average_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,11 @@ def __init__(

self._model = AverageModel(hass, entities, eco_start_time, eco_end_time)

# Refresh at midnight
# Refresh every hour on the half hour
midnight_refresh = async_track_utc_time_change(
self._hass,
self.async_refresh,
hour=0,
minute=0,
second=10,
minute=30,
local=True,
)
self._unload_listeners.append(midnight_refresh)
Expand Down

0 comments on commit f8d9c13

Please sign in to comment.