How to use Device triggers in blueprint?

Personally I hate device triggers and find them pretty much unusable. However I can try to help you.

Your first one could never work because variables are not rendered until after the trigger. So your instincts to use trigger_variables is a good one.

Your next problem is this:

You need to put this into developer - templates and edit it until what you get is what you are trying to get. I would guess that is not giving you the action_button_1_press_release that you want it to, and that is why it isn’t working.

I personally would change this to trigger more generally, IE on every trigger of the device and then in the condition or action statement sort out what the trigger event was and act on it there. In condition statements you have the full set of template functions to work with. In the trigger you only have a few.
But that is a personal choice.

Edit 2 days later:
Why and how to avoid device_ids in automations and scripts - Community Guides - Home Assistant Community.

Plus I found out device triggers and templates are not a thing.

1 Like