Hi @ Rudd-O. First of all thanks for the work! I have installed the integration and selected the appropriate location parameters. Whereas the real-time sensors are shown properly, the forecast sensor is shown as not available. Attached my log with the error message:
Logger: homeassistant.components.sensor
Source: custom_components/meteo-swiss/weather.py:139
Integration: Sensor (documentation, issues)
First occurred: 13:34:23 (1 occurrences)
Last logged: 13:34:23
meteo-swiss: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 521, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 779, in async_device_update
await self.async_update()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 444, in async_update
await self.coordinator.async_request_refresh()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 211, in async_request_refresh
await self._debounced_refresh.async_call()
File "/usr/src/homeassistant/homeassistant/helpers/debounce.py", line 95, in async_call
await task
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 237, in async_refresh
await self._async_refresh(log_failures=True)
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 349, in _async_refresh
self.async_update_listeners()
File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 146, in async_update_listeners
update_callback()
File "/config/custom_components/meteo-swiss/weather.py", line 80, in _handle_coordinator_update
self.async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 585, in async_write_ha_state
self._async_write_ha_state()
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 649, in _async_write_ha_state
state = self._stringify_state(available)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 591, in _stringify_state
if (state := self.state) is None:
File "/config/custom_components/meteo-swiss/weather.py", line 138, in state
cond = next(
File "/config/custom_components/meteo-swiss/weather.py", line 139, in <genexpr>
(k for k, v in CONDITION_CLASSES.items() if int(symbolId) in v),
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
Do you have any hints what went wrong?
I am running HA OS 10.1 with Home Assistant 2023.5.4
Thanks and Regads,
Aleardo