-
Notifications
You must be signed in to change notification settings - Fork 132
Closed
Description
Version of the custom_component
0.0.7
Homeassistant version
2022.7.4
Describe the bug
Sometime when day changes then the prices are not updated. Have started to happen more frequent these days.
This is logged every hour until I restart HA and it starts to work again.
Debug log
2022-08-09 09:00:00 ERROR (MainThread) [homeassistant.util.logging] Exception in check_stuff when dispatching 'nordpool_update': ()
Traceback (most recent call last):
File "/usr/local/lib/python3.10/statistics.py", line 258, in _exact_ratio
return (x.numerator, x.denominator)
AttributeError: 'NoneType' object has no attribute 'numerator'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/config/custom_components/nordpool/sensor.py", line 460, in check_stuff
self._update(self._data_today)
File "/config/custom_components/nordpool/sensor.py", line 314, in _update
self._peak = mean(peak)
File "/usr/local/lib/python3.10/statistics.py", line 329, in mean
T, total, count = _sum(data)
File "/usr/local/lib/python3.10/statistics.py", line 188, in _sum
for n, d in map(_exact_ratio, values):
File "/usr/local/lib/python3.10/statistics.py", line 261, in _exact_ratio
raise TypeError(msg)
TypeError: can't convert type 'NoneType' to numerator/denominator
Perhaps related to #127 ?
Metadata
Metadata
Assignees
Labels
No labels