Skip to content

Commit

Permalink
Merge pull request #315 from MTrab:Fixing-refresh-issues-around-midnight
Browse files Browse the repository at this point in the history
Fixing refresh issues around midnight
  • Loading branch information
MTrab authored Jun 23, 2023
2 parents 2577a9c + 819e2e6 commit 90e9a6c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions custom_components/energidataservice/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from homeassistant.helpers.event import (
async_call_later,
async_track_time_change,
async_track_utc_time_change,
)
from homeassistant.loader import async_get_integration

Expand Down Expand Up @@ -131,10 +130,10 @@ async def update_carnot(n): # type: ignore pylint: disable=unused-argument, inv
async_dispatcher_send(hass, UPDATE_EDS.format(entry.entry_id))

# Handle dataset updates
update_tomorrow = async_track_utc_time_change(
update_tomorrow = async_track_time_change(
hass,
get_new_data,
hour=12, # UTC time!!
hour=12, # LOCAL time!!
minute=rand_min,
second=rand_sec,
)
Expand Down

0 comments on commit 90e9a6c

Please sign in to comment.