Use button press events as trigger #2293
Describe the featureCurrently, it is impossible to use button press events as trigger. The 'state' event does not work since this event type does not constitute a state change. The current way of automating button presses is as follows: https://www.home-assistant.io/integrations/event/#to-automate-on-a-button-press This work-around requires using any state change as the trigger and placing the button press state (single press, double press) as a condition. Which is unnecessary convoluted and not user-friendly. Especially since button presses are nicely visible in the history panel, so obviously the event exists on a common-sense level. Please acknowledge that the current approach is bad for user-friendliness and not desirable. Proposed solution: add an event option next to 'state change' events, namely just an event trigger on an entity. Even if this is (behind the scenes) the exact same logic as the tutorial gives us, the experience for a user would be much improved. A user shouldn't need to follow arcane tutorials to automate a trivial button press to turn some lights on and off. Use casesAny automation involving a button press. For example to toggle the lights based on a button being pressed on a Matter button device. Current workaroundsThe current workaround avoids stating the button press as the triggering event, and instead uses the button press type as a condition: Anything else?No response |
Replies: 2 comments 7 replies
|
this is already implemented with home-assistant/core#158745 and will be part of the upcoming 2026.1 release |
|
Home Assistant now supports a dedicated button-pressed trigger. It shipped in Core 2026.1 through home-assistant/core#158745, so automations can trigger directly on a button press instead of relying on a generic state trigger and condition. ../Frenck Blogging my personal ramblings at frenck.dev |
![Home Assistant automation shows a manual event trigger, with Event type set to `state_changed` and event data being set to `entity_id: [id of the button].`](https://private-user-images.githubusercontent.com/6520659/534198304-bf4f5eb7-736b-47db-9487-6742368522ad.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3OTIyMjU1NDEsIm5iZiI6MTc5MjIyNTI0MSwicGF0aCI6Ii82NTIwNjU5LzUzNDE5ODMwNC1iZjRmNWViNy03MzZiLTQ3ZGItOTQ4Ny02NzQyMzY4NTIyYWQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI2MTAxNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNjEwMTdUMDgyMDQxWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Yzk3YmI1OTNmZGExODkxNGEzNzdlMTVmNzI4M2M0MmVjY2MyNmFlODFkYWI0NmIwM2M1ZjY1ODUwY2FhOTJlNiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmcmVzcG9uc2UtY29udGVudC10eXBlPWltYWdlJTJGcG5nIn0.w4GtVKd4xEDQKIlhHYp5fE5gBqBS6lY6kB8q-BcGTp0)

Home Assistant now supports a dedicated button-pressed trigger. It shipped in Core 2026.1 through home-assistant/core#158745, so automations can trigger directly on a button press instead of relying on a generic state trigger and condition.
../Frenck
Blogging my personal ramblings at frenck.dev