Closed whatzefak closed 1 month ago
In 2023.5 the log is FLOODED by these errors.
To remove these error messages edit custom_components/gismeteo/api.py and replace STATE_UNKNOWN by 0 in definition:
def wind_bearing(self, src=None):
"""Return the current wind bearing."""
src = src or self._current
bearing = int(src.get(ATTR_WEATHER_WIND_BEARING, 0))
return (bearing - 1) * 45 if bearing > 0 else STATE_UNKNOWN
Looks like this not a bug in this integration, but a feature of the new version of Sensor integration, which does not accept "unknown" for numeric values; the same type of error is reported in HA 2023.5 by many other integrations, including Energy, Mobile, etc.
My guess is that it happens on a regular basis with wind_bearing and does not happen with other entities of Gismeteo integration is that wind will have no direction, if there is no wind at all :) ...i.e. wind speed equals zero. All other entities of the integration are always defined.
Environment
Describe the bug
Configuration.yaml
Steps to Reproduce
Expected behavior
Debug log