Closed Gugulator closed 1 year ago
Same here. Appeared today only.
Looking into that
Part of the problem is with the fact that https://ims.gov.il/en/now_analysis returns only a single state
Looks like IMS changed their API for current forecast. Working on a fix
(I hope it's) Fixed in version 0.1.6
New issue after updating: Logger: homeassistant.components.weather Source: custom_components/ims/weather.py:250 Integration: Weather (documentation, issues) First occurred: 14:49:09 (6 occurrences) Last logged: 14:51:06
Error adding entities for domain weather with platform ims Error while setting up ims platform for weather Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 846, in add_to_platform_finish 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 "/usr/src/homeassistant/homeassistant/components/weather/init.py", line 783, in state return self.condition File "/config/custom_components/ims/weather.py", line 250, in condition condition = WEATHER_CODE_TO_CONDITION[ KeyError: '0'
@vadimnazaroff
Fixed in 0.1.7
They screwed up their API (not sending weather_code
fields and all) - but in 0.1.7 it works.
Thanks, no errors now in system logs. However new issue now - weather card not displayed for created weather entity, probably due to some missing parameters in the created entity?
It relates to changes in IMS API (which I can't control) - sometimes they don't list all the data. It feels they're changing they're playing with the API. Let it a day or two and see if it's any better.
Ok, Thanks much for quick response, lets follow up in coming days
@vadimnazaroff - can you try again with the latest version?
Yesterday night after upgrade worked well, this morning again issues started to occur:
Logger: homeassistant.components.weather Source: custom_components/ims/weather.py:248 Integration: Weather (documentation, issues) First occurred: 10:54:49 (2 occurrences) Last logged: 10:54:49
Error adding entities for domain weather with platform ims Error while setting up ims platform for weather Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish 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 "/usr/src/homeassistant/homeassistant/components/weather/init.py", line 783, in state return self.condition File "/config/custom_components/ims/weather.py", line 248, in condition self._weather_coordinator.data.current_weather.weather_code AttributeError: 'NoneType' object has no attribute 'weather_code'
Yesterday night after upgrade worked well, this morning again issues started to occur:
Logger: homeassistant.components.weather Source: custom_components/ims/weather.py:248 Integration: Weather (documentation, issues) First occurred: 10:54:49 (2 occurrences) Last logged: 10:54:49
Error adding entities for domain weather with platform ims Error while setting up ims platform for weather Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 455, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 731, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 845, in add_to_platform_finish 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 "/usr/src/homeassistant/homeassistant/components/weather/init.py", line 783, in state return self.condition File "/config/custom_components/ims/weather.py", line 248, in condition self._weather_coordinator.data.current_weather.weather_code AttributeError: 'NoneType' object has no attribute 'weather_code'
And back working again. Seems IMS changing APIs on the fly ...
Try again with 0.1.12
- added some protections
Closing for inactivity
suddenly integration that was installed and working, fails to load. in ha->settings->integrations I have following error on IMS integration: Retrying setup: 'NoneType' object is not iterable
Here is record from system log: Config entry 'IMS Weather' for ims integration not ready yet: 'NoneType' object is not iterable; Retrying in background
Home Assistant 2023.5.2 Supervisor 2023.04.1 Operating System 10.1 Frontend 20230503.3 - latest