Sonoff ZBMINI added via ZHA is incorrectly classified as a light , should be switch

I am using a Zigbee switch from Sonoff (Sonoff ZBMINI) to switch a fan.
I have successfully added it to Home Assistant via ZHA and Conbee II stick.

However, the switch is incorrectly classified as a light:

This gives me problems, e.g. when turning on all the lights in the same room, the fan also starts.

When I try to change the domain from “light” to “switch”, but I cannot seem to change this in the entity settings:

I have read somewhere else a suggestion to try to change the domain in Configuration < Customizations. This does not allow to change the entity domain:

Adding a virtual switch entity on top of this using templates seems an ugly workaround which does not solve the problem: the original entity remains active and classified under the light domain.

How can I change the domain of an entity?
If this is not possible, should I file a bug report for ZHA and ask them to classify the ZBMINI as switch instead of light?


Solved with the help of dmulcahey and Adminiuga, see .


    84:71:27:ff:fe:93:17:24-1:    # format: {ieee}-{endpoint_id}
      type: 'switch'              # corrected device type

nice … thanks for the pull request … waiting to set device classes via GUI as for the moment using configuration.yaml is a bit out of date as devs want to push people to use GUI to configure devices etc. But I confrim. Light becomes switch after addingthose magical lines to the configuration.yaml

1 Like

How did u get the zbmini paired? any specifics on that?

I paired them via ZHA integration. normally if they are in factory mode they will be added once u call the button to add a device… if not you have to push the reset button 5 seconds and release. zbmini will be reset and can be added as stated

I know this is an old thread, but I have been trying to use a ZBMINI (and NSPanel) to control my boiler for over a week and finally found this thread and got it working! (I’m new to HA and ZigBee)

Thanks to everyone! :slight_smile:

Hi all. I followed the instructions for this the other day and it worked 100%.
But for some strange reason the switch it created is now greyed out and when you click into it this is the message.
This entity is no longer being provided by the zha integration. If the entity is no longer in use, delete it in settings.

The light entity that was the original entity is re-enabled and working but its a light not a switch so it turns of when I say turn off lights .

Not sure how to reverse this back to a switch.
Anyone have this issue ?