Core.entity_registry not updated anymore, works again with hass-victron disabled

Hello all,

the file core.entity_registry is not updated anymore here on my installation since HA 2026.4.0 or 2026.4.1 (HA was updated during the weekly Docker backup on April 5th). The file kept its timestamp and never was updated, e.g. when changing/deleting/adding entities in HA.

When disabling Victron integration (version 0.6.4) it started updating again.

I’m noticing errors/warnings in home-assistant.log, not sure if related. Also there are tracebacks which could be related. Both see below.

I also noticed that many Victron entities are unavailable since then. As this is the case I disabled the integration for now, as it breaks my system and also is not usable due to all these unavailable entities.

Maybe I am not alone with this problem.

And here’s the logs:

2026-04-18 13:27:59.516 ERROR (MainThread) [homeassistant.components.websocket_api.messages] Unable to serialize to JSON. Bad data found at $.event.a.sensor.victronvebus_microgrid_error227.a.unit_of_measurement=<custom_components.victron.const.TextReadEntityType object at 0x7fe03614e350>(<class 'custom_components.victron.const.TextReadEntityType'>
2026-04-18 13:28:01.418 WARNING (Recorder) [homeassistant.components.recorder.table_managers.state_attributes] State is not JSON serializable: <state sensor.victronvebus_microgrid_error227=unknown; state_class=measurement, unit_of_measurement=<custom_components.victron.const.TextReadEntityType object at 0x7fe03614e350>, friendly_name=vebus Microgrid error @ 2026-04-18T13:27:59.506645+02:00>: Type is not JSON serializable: TextReadEntityType
2026-04-18 13:28:02.720 WARNING (Recorder) [homeassistant.components.recorder.table_managers.state_attributes] State is not JSON serializable: <state sensor.victronvebus_microgrid_error227=0.0; state_class=measurement, unit_of_measurement=<custom_components.victron.const.TextReadEntityType object at 0x7fe03614e350>, friendly_name=vebus Microgrid error @ 2026-04-18T13:28:00.067339+02:00>: Type is not JSON serializable: TextReadEntityType
2026-04-18 13:30:10.883 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.victronvebus_microgrid_error227 (<custom_components.victron.const.TextReadEntityType object at 0x7fe03614e350>) cannot be converted to the unit of previously compiled statistics (<custom_components.victron.const.TextReadEntityType object at 0x7f4075faca60>). Generation of long term statistics will be suppressed unless the unit changes back to <custom_components.victron.const.TextReadEntityType object at 0x7f4075faca60> or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2026-04-18 13:33:11.038 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [140601478936224] Unable to serialize to JSON. Bad data found at $(State: sensor.victronvebus_microgrid_error227).attributes.unit_of_measurement=<custom_components.victron.const.TextReadEntityType object at 0x7fe03614e350>(<class 'custom_components.victron.const.TextReadEntityType'>
2026-04-18 13:35:10.700 WARNING (Recorder) [homeassistant.components.sensor.recorder] The unit of sensor.victronvebus_microgrid_heartbeat227 (1) cannot be converted to the unit of previously compiled statistics (1). Generation of long term statistics will be suppressed unless the unit changes back to 1 or a compatible unit. Go to https://my.home-assistant.io/redirect/developer_statistics to fix this
2026-04-18 13:38:14.270 WARNING (Recorder) [homeassistant.components.recorder.table_managers.state_attributes] State is not JSON serializable: <state sensor.victronvebus_microgrid_error227=unavailable; restored=True, state_class=measurement, friendly_name=vebus microgrid error, supported_features=0, unit_of_measurement=<custom_components.victron.const.TextReadEntityType object at 0x7fe03614e350> @ 2026-04-18T13:38:13.945428+02:00>: Type is not JSON serializable: TextReadEntityType

Traceback (most recent call last):
  File "/usr/local/lib/python3.14/site-packages/homeassistant/helpers/json.py", line 55, in json_encoder_default
    raise TypeError
TypeError

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.14/site-packages/homeassistant/helpers/storage.py", line 566, in _async_callback_delayed_write
    await self._async_handle_write_data()
  File "/usr/local/lib/python3.14/site-packages/homeassistant/helpers/storage.py", line 591, in _async_handle_write_data
    await self._async_write_data(data)
  File "/usr/local/lib/python3.14/site-packages/homeassistant/helpers/storage.py", line 604, in _async_write_data
    await self.hass.async_add_executor_job(self._write_data, data)
  File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 86, in run
    result = ctx.run(self.task)
  File "/usr/local/lib/python3.14/concurrent/futures/thread.py", line 73, in run
    return fn(*args, **kwargs)
  File "/usr/local/lib/python3.14/site-packages/homeassistant/helpers/storage.py", line 609, in _write_data
    data["data"] = data.pop("data_func")()
                   ~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/local/lib/python3.14/site-packages/homeassistant/helpers/entity_registry.py", line 2132, in _data_to_save
    entry.as_storage_fragment for entry in list(self.entities.values())
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "src/propcache/_helpers_c.pyx", line 48, in propcache._helpers_c.under_cached_property.__get__
  File "/usr/local/lib/python3.14/site-packages/homeassistant/helpers/entity_registry.py", line 394, in as_storage_fragment
    json_bytes(
    ~~~~~~~~~~^
        {
        ^
    ...<32 lines>...
        }
        ^
    )
    ^
TypeError: Type is not JSON serializable: TextReadEntityType

I also opened up a issue on Github about that:

No idea, nobody?

I still the same problem with the most current Home Assistant Docker container (lscr.io/linuxserver/homeassistant:latest), which is based on 2026.4.3 also.

And it seems that I am not the only one with this problem.

A (temporary) solution/fix was provided here:

This works for me, great! :slight_smile:

Thank you again aHUG4good · GitHub :slight_smile: .