I have a home/away automation that is dependent on Trigger IDs and Choose. I want to be able to have a button on the dashboard that will let me manually run the automation to toggle between home/away, but I can’t find how to say that “the button was pushed and it has Trigger ID X”. It seems buttons are stateless and there is no “the button was pushed” event. There are service calls from the button, but I can’t (so far as I can tell) assign a Trigger ID to a service call. Is what I want to do possible? I figure I can toggle an input boolean and then use the input boolean state change as an event trigger, but that seems wrong.
Dashboard buttons are not the same as button entities. Button entities are “stateless”… their state is a timestamp representing the last time they were pressed, so you can use a State trigger for buttons as shown in the example in the docs. You assign the new trigger an id just like any other trigger. Trigger ids do not have to be unique. You can assign the same trigger id to any trigger you want to execute the same option of a Choose or If/Then action.
You can have dashboard buttons execute a sequence of actions by using scripts, but to incorporate that with the existing automation will require a pretty significant rewrite. Since you already have the automation, it will be easier to just create input button helpers which can be “pressed” by a dashboard button and trigger an automation.
Ok, then I am missing something very basic. I create a button on the dashboard and give it a name. I have no entity associated.
However no entity is created and thus I don’t know how to add it to an automation? I would expect an input_button.aaaaahome_away or similar entity to have been created that I then can reference for state changes?
I’m dumb. I need to create a button as a helper first. Sigh, ok. Thank you!