Removed helpers restored after a restart

Hey there,
There are a few Helpers (timers, booleans, selects) and Automations that I explicitly Delete, which successfully removed from the UI.

But after a restart, all of them added back. On their ‘Entities’ item, I see they show as ‘Restored’ and on Helpers page, they look ‘Read Only’.

I tried

  • Purge their Recorder data
  • Cleaning the Browser cache, logout, login
  • Restarting the device after every attempt
  • Checked Relations with any other automation or script

I really want to get rid of them - hopefully by not touching any YAML manually.

Any leads?

Try going directly to your local IP http://192.168.xx.xxx:8123/config/helpers select the Helper you want to delete,

then select the gear and select delete.

image
image

Earlier today, I could not delete them by going through the UI to the Helper menu.

Nope, that didn’t worked.
I saw this when I was checking the logs, related maybe?

(I’m using linuxserver’s docker image)

Logger: homeassistant
Source: helpers/entity_registry.py:325
First occurred: 11:43:30 AM (1 occurrences)
Last logged: 11:43:30 AM
Error doing job: Task exception was never retrieved

Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/json.py", line 61, 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.12/site-packages/homeassistant/helpers/storage.py", line 504, in _async_callback_delayed_write
    await self._async_handle_write_data()
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/storage.py", line 529, in _async_handle_write_data
    await self._async_write_data(self.path, data)
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/storage.py", line 534, in _async_write_data
    await self.hass.async_add_executor_job(self._write_data, self.path, data)
  File "/usr/local/lib/python3.12/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/storage.py", line 541, in _write_data
    data["data"] = data.pop("data_func")()
                   ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/entity_registry.py", line 1315, in _data_to_save
    "entities": [entry.as_storage_fragment for entry in self.entities.values()],
                 ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/functools.py", line 995, in __get__
    val = self.func(instance)
          ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/homeassistant/helpers/entity_registry.py", line 325, in as_storage_fragment
    json_bytes(
TypeError: Type is not JSON serializable: method

I think the root cause was a HACS extension needed update. After updating that, this error vanished and everything went back to work normally.

1 Like