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?

2 Likes

Solved with the help of dmulcahey and Adminiuga, see https://github.com/zigpy/zha-device-handlers/issues/654 .

TL;DR:

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

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: