Skip to content

Failure during unloading of the integration #244

@sveinse

Description

@sveinse

When unloading the integration the following message are printed in the logs:

(The log have been obfuscated.)

2025-07-25 21:14:42.642 ERROR (MainThread) [homeassistant.core] Error running job: <Job listen device_registry_updated HassJobType.Callback functools.partial(<function _forward_events_unconditional at 0x76ff91c6f9c0>, <bound method WebSocketHandler._send_message of <WebSocketHandler closing=False authenticated=True description=Svein from 172.17.0.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36)>>, b'45')> Traceback (most recent call last): File "/workspaces/ha-core/homeassistant/helpers/json.py", line 87, in json_encoder_default raise TypeError TypeError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/workspaces/ha-core/homeassistant/core.py", line 1575, in async_fire_internal self._hass.async_run_hass_job(job, event) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ File "/workspaces/ha-core/homeassistant/core.py", line 937, in async_run_hass_job hassjob.target(*args) ~~~~~~~~~~~~~~^^^^^^^ File "/workspaces/ha-core/homeassistant/components/websocket_api/commands.py", line 154, in _forward_events_unconditional send_message(messages.cached_event_message(message_id_as_bytes, event)) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/workspaces/ha-core/homeassistant/components/websocket_api/messages.py", line 136, in cached_event_message _partial_cached_event_message(event)[:-1], ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^ File "/workspaces/ha-core/homeassistant/components/websocket_api/messages.py", line 152, in _partial_cached_event_message _message_to_json_bytes_or_none({"type": "event", "event": event.json_fragment}) ^^^^^^^^^^^^^^^^^^^ File "src/propcache/_helpers_c.pyx", line 33, in propcache._helpers_c.under_cached_property.__get__ File "/workspaces/ha-core/homeassistant/core.py", line 1399, in json_fragment return json_fragment(json_bytes(self._as_dict)) ~~~~~~~~~~^^^^^^^^^^^^^^^ TypeError: Type is not JSON serializable: DeviceEntry 2025-07-25 21:14:42.656 WARNING (Recorder) [homeassistant.components.recorder.table_managers.event_data] Event is not JSON serializable: <Event device_registry_updated[L]: action=remove, device_id=--DEVICEID--, device=DeviceEntry(area_id=None, config_entries={'--ABCD--'}, config_entries_subentries={'--ABCD--': {None}}, configuration_url=None, connections=set(), created_at=datetime.datetime(2025, 7, 20, 14, 54, 26, 603162, tzinfo=datetime.timezone.utc), disabled_by=None, entry_type=None, hw_version=None, id='--DEVICEID--', identifiers={('zaptec', '--INST-UID--')}, labels=set(), manufacturer='Zaptec', model='Sol Installation Installation', model_id=None, modified_at=datetime.datetime(2025, 7, 25, 19, 47, 53, 82364, tzinfo=datetime.timezone.utc), name_by_user=None, name='Sol Installation', primary_config_entry='--ABCD--', serial_number=None, suggested_area=None, sw_version=None, via_device_id=None, is_new=False, _cache={'json_repr': b'{"area_id":null,"configuration_url":null,"config_entries":["--ABCD--"],"config_entries_subentries":{"--ABCD--":[null]},"connections":[],"created_at":1753023266.603162,"disabled_by":null,"entry_type":null,"hw_version":null,"id":"--DEVICEID--","identifiers":[["zaptec","--INST-UID--"]],"labels":[],"manufacturer":"Zaptec","model":"Sol Installation Installation","model_id":null,"modified_at":1753472873.082364,"name_by_user":null,"name":"Sol Installation","primary_config_entry":"--ABCD--","serial_number":null,"sw_version":null,"via_device_id":null}', 'as_storage_fragment': <orjson.Fragment object at 0x76ff34c9c890>})>: Type is not JSON serializable: DeviceEntry 

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingv0.8Issues about the v0.8 version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions