diff --git a/custom_components/rozkladzik/sensor.py b/custom_components/rozkladzik/sensor.py index 90203d8..147b040 100644 --- a/custom_components/rozkladzik/sensor.py +++ b/custom_components/rozkladzik/sensor.py @@ -99,7 +99,7 @@ def device_state_attributes(self): def update(self): now = datetime.datetime.now() r_time = now.hour * 60 + now.minute - if self._should_update(now): + if self._should_update(r_time): url_template = 'https://www.rozkladzik.pl/{}/timetable.txt?c=tsa&t={}&day={}&time={}' if self._group_mode: url_template = 'https://www.rozkladzik.pl/{}/timetable.txt?c=bsa&b={}&day={}&time={}'