[Zigbee2mqtt] MQTT Device triggers explained and advantages


Since several weeks my HA , Z2M, Node-Red automations are messed up. Xiaomi motion sensors don’t update illuminance so it’s dark inside, Xiaomi door-sensors don’t send first event . Xiaomi wall-switches seem te have amnesia. First event does nothing. Then it’s all okay for x period. Then it all starts over again. Very annoying and I have no clue what’s going wrong.

I fiddled with legacy_triggers in Z2M. HA docs states;

An MQTT device trigger is a better option than a binary sensor for buttons, remote controls etc.

HA Docs don’t mention why it’s better neither Z2M docs .

When I read HA Docs it’s to me tomayto tomatho. What’s the advantage?

Could messing with discovery of devices and homeassistant_legacy_triggers and homeassistant_legacy_entity_attributes in Z2M-config screw up my (HA and maybe NR) configuration? How do I figure out the cullprit?

[Edit] And by the way while reading example automations in Z2M doc I’m wondering how to setup a NR ha-node. because it doesn’t use Entity_id and State but Device_id, Discovery_id, Platform, Type and Subtype. what the hell…

I fell you. I’m struggeling with the same stuff. Why should I use MQTT Device trigger instead of something else. What are the benefits, and how do you automate an binary sensor using MQTT?

Did you figure this out?

Nope! “It’s better” is the best argument I read so far. I would like to switch cause it might be future proof and be not extending execution of a future deprecated mechanism. Probably I’ll do a complete reset/rediscover (plus maybe reinstall Z2M+HA) of all devices around Christmas holidays.