You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fixed
Sensor state "unknown": The sensor state was incorrectly showing unknown even when events were present. The root cause was that entry.time from aio_geojson_usgs_earthquakes is a datetime object, and the code tried to call .replace("Z", "+00:00") on it as if it were a string. datetime.replace() does not accept positional string arguments, causing a TypeError that was silently caught and left _attr_native_value as None.
Removed erroneous @callback decorator from async def _async_update_events in sensor.py (correct pattern for async dispatcher callbacks).
Changed
Removed formatted_events attribute from the sensor's extra_state_attributes.
Added new format_events action (service) that returns formatted earthquake events in a response variable (formatted_events). Call this action with a response_variable to get the human-readable text output.