You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I have an issue running the library. I am not using it directly: I am running it via home-assistant-gazpar but I think the issue comes from the library so I am posting it there.
Home Assistant logs shows
2024-12-09 09:14:50.623 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 1055, in _async_update_entity_states
await entity.async_update_ha_state(True)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 978, in async_update_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1085, in __async_calculate_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1029, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/config/custom_components/gazpar/sensor.py", line 239, in state
return Util.toState(self._dataByFrequency)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/gazpar/util.py", line 38, in toState
while (currentIndex < len(dailyData)) and (float(dailyData[currentIndex][PropertyName.START_INDEX.value]) == float(dailyData[currentIndex][PropertyName.END_INDEX.value])):
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: float() argument must be a string or a real number, not 'NoneType'
2024-12-09 09:14:52.169 ERROR (SyncWorker_3) [pygazpar.datasource] An error occurred while loading data. Retry in 3 seconds.
2024-12-09 09:14:55.403 ERROR (SyncWorker_3) [pygazpar.datasource] An error occurred while loading data. Retry in 3 seconds.
2024-12-09 09:14:58.636 ERROR (SyncWorker_3) [pygazpar.datasource] An error occurred while loading data. Retry in 3 seconds.
2024-12-09 09:15:01.883 ERROR (SyncWorker_3) [pygazpar.datasource] An error occurred while loading data. Retry in 3 seconds.
2024-12-09 09:15:05.119 ERROR (SyncWorker_3) [pygazpar.datasource] An error occurred while loading data. Retry in 3 seconds.
2024-12-09 09:15:08.350 ERROR (SyncWorker_3) [pygazpar.datasource] An error occurred while loading data. Retry in 3 seconds.
2024-12-09 09:15:13.283 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None)
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 978, in async_update_ha_state
self._async_write_ha_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1148, in _async_write_ha_state
self.__async_calculate_state()
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1085, in __async_calculate_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1029, in _stringify_state
if (state := self.state) is None:
^^^^^^^^^^
File "/config/custom_components/gazpar/sensor.py", line 239, in state
return Util.toState(self._dataByFrequency)
~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/gazpar/util.py", line 38, in toState
while (currentIndex < len(dailyData)) and (float(dailyData[currentIndex][PropertyName.START_INDEX.value]) == float(dailyData[currentIndex][PropertyName.END_INDEX.value])):
~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: float() argument must be a string or a real number, not 'NoneType'
I guess something is wrong with the obtained data but I feel library should not "crash" like that.
Note: My home-assistant-gazpar's scan_interval is set to 08:00:00.
The text was updated successfully, but these errors were encountered:
Hello, I have an issue running the library. I am not using it directly: I am running it via home-assistant-gazpar but I think the issue comes from the library so I am posting it there.
Home Assistant logs shows
I guess something is wrong with the obtained data but I feel library should not "crash" like that.
Note: My home-assistant-gazpar's
scan_interval
is set to08:00:00
.The text was updated successfully, but these errors were encountered: