New ZHA Tuya smart plug detected as light

Hello there,

I recently bought a bunch of smart plugs second-hand, which are probably that model: https://fr.aliexpress.com/item/1005007474624117.html

They’re immediately recognized in ZHA and I can switch them on/off and everything works very well, I even get power-related entities.
Except: they’re not discovered as switches, but as lights.

This is annoying because I’ve got an automation that turns off all lights of all rooms and switches when I leave home, and another one that just turns on the lights of a specific room. This means devices connected to these smart plugs get turned on automatically, which is not what I want.

Is there something I could do to requalify a light as a switch? I only found a blueprint which does the opposite.
Thank you,
Ben

Go to Settings > Devices > Entites
grafik
Click on all your entities > The Tool Icon on the top right (Settings)
and change the entity from light to switch.

If you can see the icon for your entity has also changed from light to switch, you were successful.

If you want to help change its device type permanently for everyone then submit a device support request or bug so that it can be corrected via a ZHA Device Handee (also known as quirk) for it, see → https://www.home-assistant.io/integrations/zha#how-to-add-support-for-new-and-unsupported-devices

I couldn’t find any menu that offers to change the entity from light to switch.
When I go to Device → Entities → The Tool Icon on the top right is about customizing the columns in the list.
When I click on the entity, there’s a tool icon on the top right of the modal where I can customize the entity (name, icon, id, label, voice assistants, enabled, visible, device area) but no such thing as changing the entity’s type?

That will only allow you to change the icon and not the actual device type.

To actually change the device type you need to modify the device type via yaml configuration, see the ZHA documentation → https://www.home-assistant.io/integrations/zha#modifying-the-device-type

You can alternativly create a swtich template which from the light entiry and then use that template instead, see → Template Switch - Home Assistant

Again, a better permanent option (for all) would instead be to create a ZHA Device Handler (also known as quirk) for it, see → https://www.home-assistant.io/integrations/zha#how-to-add-support-for-new-and-unsupported-devices

PS: There is also a helper that can change device type of a switch to a light but I do not think there are any helpers that can change device type from light to a switch, or?