Joel_DE
(Joel De)
February 15, 2023, 11:50pm
1
hi all,
i have a device that has had domain of light. but it’s actually a switch.
I can’t change the domain in the device itself (says i have to keep it as is)
I can’t edit the zigbee.db in file editor - how do you edit a light to become a switch?
Thank you
Akriss
(kris)
February 15, 2023, 11:57pm
2
Under Settings/Devices & services/ Helpers.
There is a helper for that.
Joel_DE
(Joel De)
February 15, 2023, 11:59pm
3
thanks. doesn’t that create an additional virtual device?
i forgot to say I was looking at Zigbee Home Automation - Home Assistant
did this and reset HA but it’s still a light. not sure if i have to do something else
Akriss
(kris)
February 16, 2023, 12:06am
4
Ya that may not work for ZHA. I’m not that familiar with ZHA, I’ve have Z2M.
Sorry I think I’m wrong on that.
Joel_DE
(Joel De)
February 16, 2023, 12:29am
5
solved it as i wasn’t including the endpoint ID
SOLVED:
I didn’t realize that new entities would be created. The old light. entities still existed. Once I went in via the ZHA integration to the devices I could see two entities, one being light. the other being switch. I simply deleted the original light. and renamed the switch. to the name I want.
As other have pointed out, sometimes a Zigbee device shows up with the incorrect domain. In my case I have Sonoff ZBMINI switches that show up as lights.
I’ve followed the Zigbee documentation …
Hedda
(Hedda)
February 16, 2023, 8:44am
6
Either way will work, however as noted the way documentation for the ZHA integration will not create an additional virtual device https://www.home-assistant.io/integrations/zha#modifying-the-device-type
But if the manufacturer has set to wrong device type in the firmware then a better long-term solution would be to add a new device handler to ZHA Device Handlers library for a custom quirk for that device as that would solve it for everyone adding the same device in the future, (if so suggest report it as a new device request to ZHA Device Handlers), see → https://www.home-assistant.io/integrations/zha#zha-exception-and-deviation-handling