Every solution I have seen starts with the states object or an entity list, so it misses any device that has no entities. For example (and the reason for this question), Pico remotes in the lutron_caseta integration don’t have any entities; they exist only to emit events.
I know I can open the device registry file core.device_registry and look manually for the entry I want and pull the information from there. It looks like I can also download diagnostics from the integration page and, again, manually review that JSON to find it. Neither of those seems ideal.
The use case: if I want to trigger an automation on a Pico button press, I have to start the event listener in the GUI and actually press the button to see what comes out, which is something like this:
According to the documentation for the Lutron Caseta integration, it creates button entities (for transmitting) and it supports Device Triggers (for receiving; available button events are revealed when the trigger is composed in the Automation Editor).
Perhaps that’s only available when your system uses certain models of the bridge?
FWIW, the technique you described represents the traditional way that a remote-control’s button events were handled. The drawback is what you have already encountered, namely button events aren’t documented, or self-evident, and must be discovered empirically.
What came afterwards were Device Triggers, button and event entities. Both Device Triggers and event entities reveal the available events.
How many of these concepts are incorporated into an integration is determined by the integration’s maintainers.
Thanks, all good points. I think you accurately homed in on my real question: the only reason I wanted a template to identify all devices was to easily find the device_id for something I wanted to use in a trigger.
So maybe this ends up as more of a gripe than a question; Device Triggers are definitely a pain to use in yaml. Even the documentation for Device Triggers suggests creating an automation from the GUI, then copy-pasting the trigger info into yaml. That’s a weird approach.
After seeing your responses and reformulating my search I ran across this WTH post:
It never occurred to me that the device_id showed up in the URL for the device info page (probably because I’m usually using the mobile app). That’s helpful. And the MQTT INFO link for my Zigbee devices is helpful too, but it still takes some interpretation to figure out what the appropriate actions and other parameters for the trigger should be, and other integrations don’t even have that option.
I think I’ll pop on over to Feature Requests and make a suggestion: perhaps on the Device info page there could be a “Trigger Info” link that contains device_id, other identifiers, and the legal combinations of type, subtype, button_type, and other trigger parameters that are available for the integration/device.