Skip to content

Commit

Permalink
Avoid calling yr update every second for a minute ones every hour (#1…
Browse files Browse the repository at this point in the history
…6731)

* Avoid calling yr update every second for a minute one every hour

* style
  • Loading branch information
Danielhiversen authored and balloob committed Sep 20, 2018
1 parent d1acb03 commit 93af3c5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion homeassistant/components/sensor/yr.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ async def async_setup_platform(hass, config, async_add_entities,
async_add_entities(dev)

weather = YrData(hass, coordinates, forecast, dev)
async_track_utc_time_change(hass, weather.updating_devices, minute=31)
async_track_utc_time_change(hass, weather.updating_devices,
minute=31, second=0)
await weather.fetching_data()


Expand Down

0 comments on commit 93af3c5

Please sign in to comment.