File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
custom_components/nordpool Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 11import logging
22from collections import defaultdict
3- from datetime import datetime , timedelta
4- from functools import partial
3+ from datetime import timedelta
54from random import randint
65
6+ import backoff
77import voluptuous as vol
88from homeassistant .config_entries import ConfigEntry
99from homeassistant .core import Config , HomeAssistant
@@ -143,6 +143,10 @@ async def new_hr(_):
143143 _LOGGER .debug ("Called new_hr callback" )
144144 async_dispatcher_send (hass , EVENT_NEW_HOUR )
145145
146+ @backoff .on_exception (
147+ backoff .constant ,
148+ (InvalidValueException ),
149+ logger = _LOGGER , interval = 600 , max_time = 7200 , jitter = None )
146150 async def new_data_cb (_ ):
147151 """Callback to fetch new data for tomorrows prices at 1300ish CET
148152 and notify any sensors, about the new data
You can’t perform that action at this time.
0 commit comments