Limych / ha-gismeteo

Gismeteo Weather Provider for Home Assistant
Other
119 stars 22 forks source link

Stopped working after restart #8

Closed a005 closed 3 years ago

a005 commented 3 years ago

Versions

Describe the bug

Component suddenly Stopped working after НА restart


2020-10-15 18:58:20 ERROR (MainThread) [homeassistant.components.weather] gismeteo: Error on device update!
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 346, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update
    await self.hass.async_add_executor_job(self.update)  # type: ignore
  File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/config/custom_components/gismeteo/weather.py", line 85, in update
    self._wd.update()
  File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
  File "/config/custom_components/gismeteo/__init__.py", line 347, in update
    ATTR_WEATHER_PHENOMENON: int(current_v.get("ph")),
ValueError: invalid literal for int() with base 10: 'Array'
Limych commented 3 years ago

This is not a component error - unfortunately, this is an error on the Gismeteo server. I don't know when they fix it. Therefore, I added a check to the component for the correctness of the data returned from the server. All invalid data is now simply ignored.

to4ko commented 3 years ago

@Limych, same errors on 116.4 and latest version of component

2020-10-16 09:59:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for weather.gismeteo_hourly fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/weather.py", line 85, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType' 2020-10-16 09:59:46 ERROR (MainThread) [homeassistant.helpers.entity] Update for weather.gismeteo_daily fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/weather.py", line 85, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType' 2020-10-16 09:59:46 INFO (MainThread) [homeassistant.components.automation.system_error_counter] system_error_counter: Running automation actions 2020-10-16 09:59:46 INFO (MainThread) [homeassistant.components.automation.system_error_counter] system_error_counter: Executing step call service 2020-10-16 09:59:49 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.gismeteo_condition fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/sensor.py", line 126, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType' 2020-10-16 09:59:49 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.gismeteo_temperature fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/sensor.py", line 126, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType' 2020-10-16 09:59:49 INFO (MainThread) [homeassistant.components.automation.system_error_counter] system_error_counter: Running automation actions 2020-10-16 09:59:49 INFO (MainThread) [homeassistant.components.automation.system_error_counter] system_error_counter: Executing step call service 2020-10-16 09:59:50 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.gismeteo_wind_speed fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/sensor.py", line 126, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType' 2020-10-16 09:59:50 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.gismeteo_wind_bearing fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/sensor.py", line 126, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType' 2020-10-16 09:59:50 INFO (MainThread) [homeassistant.components.automation.system_error_counter] system_error_counter: Running automation actions 2020-10-16 09:59:50 INFO (MainThread) [homeassistant.components.automation.system_error_counter] system_error_counter: Executing step call service 2020-10-16 09:59:50 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.gismeteo_humidity fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/sensor.py", line 126, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType' 2020-10-16 09:59:50 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.gismeteo_pressure fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/sensor.py", line 126, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType' 2020-10-16 09:59:50 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.gismeteo_cloud_coverage fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/sensor.py", line 126, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType' 2020-10-16 09:59:50 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.gismeteo_rain fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/sensor.py", line 126, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType' 2020-10-16 09:59:50 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.gismeteo_snow fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/sensor.py", line 126, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType' 2020-10-16 09:59:50 ERROR (MainThread) [homeassistant.helpers.entity] Update for sensor.gismeteo_forecast fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 278, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 471, in async_device_update await self.hass.async_add_executor_job(self.update) # type: ignore File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(*self.args, **self.kwargs) File "/config/custom_components/gismeteo/sensor.py", line 126, in update self._wd.update() File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper result = method(*args, **kwargs) File "/config/custom_components/gismeteo/__init__.py", line 352, in update ATTR_WEATHER_PRECIPITATION_AMOUNT: self._get(current_v, "prflt", float), File "/config/custom_components/gismeteo/__init__.py", line 153, in _get res = func(res) TypeError: float() argument must be a string or a number, not 'NoneType'

github-actions[bot] commented 3 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.