Repository navigation
Replies: 2 comments
|
thanx |
0 replies
|
implemented in v2.4.0 |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Version: v2.3.0 (installed via HACS)
Home Assistant: 2026.9.4 (Docker)
Forecast enabled: yes
What happens
When a fetch from api.weather.com fails (timeout, connection error, or an empty response), the log fills with tracebacks. There is one for every sensor, and they alternate between:
With forecast sensors enabled, that adds up to dozens of tracebacks per failed fetch.
Cause
In
coordinator.py,get_weather()returnsNonein these cases:None;None;except (TimeoutError, aiohttp.ClientError)block.DataUpdateCoordinatortreats a returnedNoneas a successful update. It setscoordinator.data = Noneand notifies every entity. Each sensor then callsasync_write_ha_state(), which evaluates thenameproperty.nameindexesself.coordinator.data[FIELD_DAYPART][0]...without a None check, so it raises aTypeError.Fix (tested locally)
Raise
UpdateFailedinstead of returningNone. The coordinator then keeps the last good data and logs a single "update failed" message:UpdateFailedis already imported incoordinator.py.As a second safeguard,
WundergroundPWSSensor.namecould returnself.entity_description.namewhenself.coordinator.dataisNone.All reactions