Hi, I wonder how to make a button do a "run actions" instead of "toggle".. I try to run my chain of automation, but it just toggles on/off without anything happening.
I have to click in to the automation and hit something called "run actions", very cumbersome. Can't seem to figure this out or google gives me no help either.
#Running an automation with the press of a button
1 messages · Page 1 of 1 (latest)
Hello @haughty tiger,
Your automation would have a trigger and whatever that action is, that would start the automation.
As Rob said if you just want to run something when a button is pushed, use that button as the trigger or just write a script and call it when you press a button.
Run actions just fakes the trigger while editing in the UI and is used for testing. That's not meant for daily use.
What kind of button are we talking about? All the ones I've tried does the toggle thing.. I dont know scripting
https://www.home-assistant.io/integrations/script/
A script is a form of automation that does not use a trigger. It just happens when you call it.
An automation requires a trigger and there are many kinds of triggers, including looking at the state of a (physical) button among many others.
Run thru the docs on getting started with the automation editor. If you get stuck, come back with what you have done.
https://www.home-assistant.io/docs/automation/basics/
and
https://community.home-assistant.io/t/the-home-assistant-cookbook-index/707144#automations-10.
Home Assistant Community
A collection of posts on how to perform common tasks and deal with common problems. This Guide is intended for those new to Home Assistant, those that are struggling for answers on some subjects, and those in troubleshooting mode. All of the Home Assistant Posts are made by Community Members and most are posted in Community Guides for your conve...
Those docs has a lot of chapters to read through! I have a spesific thing I am trying to acheive, and I want to learn these heavy programming topics bit by bit, over time
Where do you put this? I've checked the whole automation object I made
Great!, but where do you put these service calls? There must be a textbox somewhere to put it?
As an action for your button
Ok one step closer, thanks. Button-place
Ahh, no wonder why I struggle, because I don't have that choice
I was looking for some setting like that, before posting. Figured it had to be a place or a way to change the behaviour of the button/toggle somehow
Maybe there is an "expert setting" I need to activate some place first?
Yes, but I assumed that these toggles could be made to presses, very much like the two ones at the bottom. They have the "activate" function, but not the automation I made.
I was however able to do what you said on a single-button. That brings me a step closer to understanding it
You should make a script as suggested above