Ghost “switch” created after reboot

As the title suggests…

My entire house is in-wall GE Z-Wave light switches and half of the outlets - to include fan controls.

Occasionally, I have noticed after an upgrade or reboot, some of my existing switches (seems to be the same four or five) create an extra entity. The entity is always a “switch” - but it is non-functional.

This extra entity causes no problems except Spook reports it and Apple HomeKit picks it up and reports it as non-functional.

I login, delete it (as the normal functional switch is fine)
Only to have it occasionally return - randomly

I doubt this is the issue, but could it be that you changed the type of the switch to light?

I have switches where I have done that and I also see both a light and a switch. But, it shows up as hidden and both work, which is different from the image you posted.

Now I’m curious. I assume the only way HA might determine a switch is a “light” is maybe during the interview process. There’s no binary “light” command class from my basic understanding – just the SwitchBinary (37) command class.

Did you do anything to get it marked “Hidden”?
I have “disabled” the ghost switch, but I haven’t noticed it as “Hidden”

Again, I don’t think this is your issue. It’s just that in your image you have both a switch and a light entity which is what the “Switch as X” integration does. But in your case is seems the switch is disabled, which “Switch as X” doesn’t do – it just marks it as hidden.

If you look at config/.storage/core.entity_registry do the two entites have the same created time?

I just now used “Switch as X” to change a switch to a light:

➜  .storage jq '.data.entities[]|select(.entity_id|contains("zen14_fountain_outlet_2"))| { entity_id, created_at, modified_at, hidden_by, disabled_by }' core.entity_registry
{
  "entity_id": "switch.zen14_fountain_outlet_2",
  "created_at": "2025-07-05T18:32:33.260150+00:00",
  "modified_at": "2025-10-10T13:28:28.832492+00:00",
  "hidden_by": "integration",
  "disabled_by": null
}
{
  "entity_id": "light.zen14_fountain_outlet_2",
  "created_at": "2025-10-10T13:28:28.818091+00:00",
  "modified_at": "2025-10-10T13:28:28.828038+00:00",
  "hidden_by": null,
  "disabled_by": null
}