WTH are MQTT device triggers so annoying to work with?

MQTT deice triggers are annoying to work with, because 1) they are only available for setup through the UI and 2) you can’t add multiple device_ids in a list as you can pretty much everywhere in HA.

Details:

  1. I mostly use YAML for my automations in HA. The MQTT device_triggers cannot be set up without creating a new automation in the UI and selecting MQTT device trigger and selecting the device, switching to yaml, copy-paste the required device_id. I should be able to just look up somehwere what the device_id is, without having to create (and cancel) an automation through the UI.

  2. I have multiple IKEA buttons of the same type, and a press on either one of them results in the same action to be started: crank the ventilation up to 80%. With MQTT device triggers, one cannot use a list of device_id’s in the trigger as one can in many other places in HA (incuding state triggers) - leading to duplicated code/lines where only the device_id differs.

Go to the device, look at the URL and copy the device id.

image

If you’re talking about using a normal mqtt trigger using the “MQTT Device trigger” spoken about in discovery…

Go to the device and click on the button that says MQTT Info

In extension of this WTH… WTH can device_id’s not be set/configured like entity_ids or automations?

This would enable device replacements without having to find and update UUIDs in yaml of all automations.