Not a valid value for dictionary value @ data['disabled_by']. Got 'config_entry'

I can’t reactivate a Device. The enable toggle does not responds to click and when trying to update the device I get:

Not a valid value for dictionary value @ data[‘disabled_by’]. Got ‘config_entry’

Here’s a short 20 seconds video showing the error: https://youtu.be/gKr5QtT4jsc

Corrupted config file?

Yeah, it sound like an issue in your /config/.storage/core.device_registry.

If you’ve got terminal and/or ssh set up, run something like

cat /config/.storage/core.device_registry | grep cucina_switch_1

which will show the entry for the switch in question. edit the file and add the value null (without ticks) as the ‘disabled_by’ value. Here’s a record for one of my switches from that file that is confirmed working correctly.

{"area_id":"kitchen","config_entries":["8d3650365f40cad7a8435b50e3d04"],"configuration_url":null,"connections":[["mac","6c:5a:b0:a1:b2:c3"]],"created_at":"1970-01-01T00:00:00+00:00","disabled_by":null,"entry_type":null,"hw_version":"3.0","id":"1f93adf2877015f1970007fb47b9e228","identifiers":[["tplink","6C:5A:B0:EE:6A:23"]],"labels":["lightswitch"],"manufacturer":"TP-Link","model":"HS220(US)","model_id":null,"modified_at":"2024-09-04T16:08:42.886154+00:00","name_by_user":"Kitchen Lightswitch","name":"kitchen","primary_config_entry":"8d365067365f40cad7a8435b50e3d024","serial_number":null,"sw_version":"1.0.3 Build 210202 Rel.190636","via_device_id":null},

Did you manually edit the config file?