Wrong device class for some outlets, quirks not applied?


I have several zigbee power plugs, same brand, same model.
The information in Home Assistant about the maker and the model are the same:
_TZ3000_okaz9tjs TS011F

However, some of them are correctly seen as ‘switch’, and some of them are seen as ‘light’ which is a problem for instance when I ask Google Assistant to turn off the lights, it will turn off these plugs even if they don’t control a light.

I got the diagnosis data, it says :

For the ‘switch’ plugs:

“data”: {
“ieee”: “**REDACTED**”,
“nwk”: 39577,
“manufacturer”: “_TZ3000_okaz9tjs”,
“model”: “TS011F”,
“name”: “_TZ3000_okaz9tjs TS011F”,
"quirk_applied": true,
quirk_class": "zhaquirks.tuya.ts011f_plug.Plug_v2”,
quirk_id": "tuya.plug_on_off_attributes”,
“manufacturer_code”: 4660,
“power_source”: “Mains”,

but for the ‘light’ plugs:

“data”: {
“ieee”: “**REDACTED**”,
“nwk”: 48453,
“manufacturer”: “_TZ3000_okaz9tjs”,
“model”: “TS011F”,
“name”: “_TZ3000_okaz9tjs TS011F”,
"quirk_applied": false,
quirk_class": "zigpy.device.Device”,
"quirk_id": null,

So my understanding is that a quirk must be applied to have them identified as plugs, but for some reason it is not.

The plugs were added at different moment over several months, and the ‘light’ type plugs are the latest ones, so one possibility is that an update of HA or of ZHA prevented the quirk to be applied from some moment on.

What can I do to fix this ?

Thank you.

See → https://www.home-assistant.io/integrations/zha#how-to-add-support-for-new-and-unsupported-devices

1. Try to re-pair/re-join the device several times.
2. Checkout the troubleshooting section.
3. Still not working? You may need a custom device handler. This handler will have exception handling code to work around device-specific issues.

However, before re-pairing them, read and try to follow the best practice tips here → https://community.home-assistant.io/t/zigbee-networks-how-to-guide-for-avoiding-interference-and-optimize-for-getting-better-range-coverage/515752

Some but not all of those tips are also covered in the other sections under troubleshooting in ZHA docs → https://www.home-assistant.io/integrations/zha#troubleshooting

I don’t have this particular type of plug, but in all the ones I do have there is an option in the HA configuration to change how they are handled.

This is not a pairing problem. Anyway I tried several times to unpair/pair with various zha settings but no change. The connection to the mesh is quite good too.

My specific problem is that there is or there was a quirk about this device, that it used to be activated some weeks ago, and that it is not anymore.

Do you know how to force applying a quirk and how to check that it is still there ?

No there is no choice of device class. Zha decides that it’s a light and don’t let me change it.

I can change the icon or the name of the device but it doesn’t change the class, the device is still a light whatever I put there.

Change device type:


Great it works !!!

Thank you !

I will have to do it for each plug but never mind. This procedure is worth knowing.

As a bonus, I also changed from switch to light a plug who was integrated as a switch but that commands a lamp…