Zigbee 3.0 smart socket plug entity Device ID

i have a HGZB-20A Zigbee 3.0 smart plug socket and it is comes up as a light in the entity domain. My question is how is this determined? Is it by the something the manufacturer sets in the device or does HA decide? I have a Tradfri smart plug socket and this is listed as a switch, both are controlling fans but one is a light and the other is a switch so my inner ADD doesnt like that. I know I can use templates to change the behaviour but i would really like to know how the initial entity device is decided.
TIA

it determined by what the device. you can overide it in the zha section of your config as described in in this post:

Thanks, this helps. It led me to this wiki article https://www.home-assistant.io/integrations/zha/ which explains it specifically for Zigbee and solution is really just adding 4 lines in the configuration.yml file so nice and easy.

Also explains what you said, device is set by the manufacturer and sometimes they do get it wrong.

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

thanks

1 Like