#New Triggers With Zigbee2MQTT Buttons

1 messages ยท Page 1 of 1 (latest)

thin drum
#

Hi

I'm using Zigbee2MQTT and I've enabled the new triggers in labs. However I've noticed my Zigbee buttons aren't compatible with the new button.pressed trigger (they do not appear in the target selector).

Does anyone know if Zigbee2MQTT will be supporting this or are the triggers being mainly built with ZHA in mind? I appreciate it's still in labs so this might be something that is still being ironed out by either dev team but I was wondering if there was some context available regarding this.

gilded meteor
#

Is your button an event.something entity? If yes, I don't think it works with buttons, but I may be wrong at this point.

rocky jasper
#

The experimental entities in Z2M are event entities, not button entities. And unfortunately they are still lacking a propper trigger. You can use them with a normal state trigger but:

  • Don't use the event_type attribute in your trigger! This needs to go in a separate condition
  • And you want to make sure to not trigger on "from unavailable" or "to unavailable"

Because that's not super easy with the UI I still think they suck ๐Ÿ˜„

thin drum
#

Thanks @rocky jasper this matches with what my experience has been. The event entities are not very intuitive as you say, so naturally the new triggers design peaked my interest. Maybe I need to give ZHA a try!

#

(unless zigbee buttons there are also "events" to cover things like double presses and holds...)

rocky jasper
#

ZHA works a bit different as most stuff is only easy if you use a device trigger. (Which is also available for Z2M buttons.) But imho not simpler for complex stuff as you need manual events. I assume they want to expose those to event entities as well at some point as an easier alternative. And although I like the entity concept, they lack an intuitive trigger implementation ๐Ÿ™‚ Making them not very simple atm.

thin drum
#

It does seem weird for a button not to have an entity in the... Button domain!
Hopefully once the new trigger system is out of labs we'll have a cleaner way to trigger automations on button presses regardless of domain (event vs button). The current event entity approach that is penciled in to replace the device stuff goes against everything the dev team says it's trying fix (needing to know about HA's internals to write a trigger).

Thanks for the info and I'll see how the next few releases shape up. I'm quite a heavy user of buttons so I might not be a good candidate for early adoption.

rocky jasper
#

Can't be a button as that represents a button in HA, not an input ๐Ÿ™‚ So a button is a control (/write) rather then an indicator (/read). Like a number entity is a control and a sensor entity is an indicator.

rocky jasper
#

@gilded meteor Indeed. But if it's an external integration like Z2M, you want a not_to: unavailable as well. Woke up my daughter in the middle of the night because I updated Z2M and the event entity triggered stuff in her room... Unfortunately the not-items are still not in the UI :/

gilded meteor
#

Indeed