Virtual switch/button to use as trigger?

I may not be thinking of this right; while I wait for Zwave scene support, I’d like to make a page in my interface of buttons which will be used to trigger automations.

I.e. click a button on ‘scenes’ view (group) labeled “dinner time”; that would trigger an automation that turns on dining room lights, dims the kitchen lights, kicks on the sonos with a specific station, etc.

What’s the right way to do this?

Thanks!

I would make this a script, you can add a script the front end and there is a activate “button” to press when you want it to run.

If you already have the automation written, scripts follow the same formatting so you can just move it over to your scripts section.

Other options are to have a input boolean or input select that your automation monitors the state of, when you change the state it activates your automation.

1 Like

Thanks for the quick response. I was just starting down the path of writing a script without any idea that they would show up as buttons. Cool!

Note that they won’t automatically show up on the front end. You will need to add it manually.

Also, it won’t show up as a button, it shows up with the name and “activate” next to it. See below for an example.

Got it. Thanks again.

I had a similar question. I’m trying to use input booleans to give me a button on home assistant that starts an automation. Can you see any problems with doing that instead of a script?

Nope, I do the same thing.

There is even an example in the docs (which you linked) that shows how to do it.

1 Like

I just got my automation setup using input booleans and realized I don’t like the switch, I just want a button. I’m trying to lock my car doors. I haven’t found any documentation for buttons…could you point me in the right direction?

@Cade_Dopp Did you ever found a solution for this? I’m also looking for a button input. In short; I want to use some buttons to control move a camera (up, down, left and right) by calling specific URL’s.

1 Like