[solved] Zigbee2mqtt and HA auto discovery

Hi,

I’m trying to understand how zigbee2mqtt works with HA auto discovery. I have Conbee II and some Nonename 1 gang switch. I tried to use that switch with deCONZ but for some reason it was detected as ‘light’ and is fully unusable. I decided to try zigbee2mqtt. Initially switch was detected as unknown and It had to add ‘zigbee-herdsman-converters’ and Z2M detected it as “Device ‘0xec1bbdfffe0c189d’ is supported, identified as: Somgoms 1 gang switch (ZSTY-SM-11ZG-US-W)”. I see messages from switch in zigbee2mqtt topic, like “state”: “OFF” or “state”: “ON”. Now I want to add that switch to HA. I set ‘homeassistant: true’ in configuration.yaml, restarted zigbee2mqtt docker container however my switch didn’t appear under ‘homeassistant/switch/’ topic. Also I don’t see it under any other topic in ‘homeassistant’ root topic. It’s only available under ‘zigbee2mqtt’ topic. What I’m doing wrong?

I use Conbee II because CC2531 doesn’t see that switch at all, probably because it’s Zigbee 3.0 as stated in its manual. I know that support of Conbee II is experimental but it seems it shouldn’t be an issue in my case.

I managed it. I missed step 5 in ‘How to support new devices’. After adding mapping to homeassistant.js it appeared in HA topic.