How to make scenes / routines for home, away, night, vacation etc triggered with a Button

I have recently got my HA up and running using virtualbox. It’s now time to get the house back up and running. Our family prefers scenes / modes / routines (whatever you prefer to call them) like mentioned in the title which we activate with the press of a button.

The only automation I have managed so far is to turn on and of the porch light after the sun, and to raise and lower the thermostat temperature on the bathroom based on time. This has been done using the GUI.

I have read quite a bit, and tried a couple of different things, but I don’t know where to start.
Could anyone get me started on the modes?

Can I still use the GUI for this? I get a bunch of errors when trying to copy/paste automations examples from others in IDE.

To give a simple example:
I press a button in Lovelace called Good Night. This button turns of (lets say) these entities:
light.livingroom1
light.livingroom2
light.kitchen1
light.kitchen2

Screenshots of the GUI would be really nice!

I think it’s best to start to think about what you want.

There are a lot of different automations which suits the needs of the ones that made them, so they are not applicable to you. So therefor you need to know what kind of triggers, conditions and actions you want to activate.

examples for wall switches, door sensors can be found at the bottom of the following page https://www.home-assistant.io/components/binary_sensor.xiaomi_aqara/

I thought i knew what I wanted, but I have a lot of reading and learing to do.
This is what I want, I will try this: https://community.home-assistant.io/t/manual-home-away-mode/92506

It looks like Im better off ditching the GUI and just using IDE since nearly all examples are done this way?

1 Like

GUI and IDE are two different things as how you describe them. GUI is in this case your frontend (Lovelace) where you will make your graphic interface.

The IDE as how you like to call them is the configuration.yaml files. Here you define all the entities (which are not automatically discovered) ,configurations, sensors etc.

Read this, maybe you’ll understand it more.

Perhaps Im using the terms the wrong way.
I was thinking about the difference of using the GUI to create an automation vs. writing the automation directly in the .YAML.file.

Thanks.

It depends on what you like, i would suggest using the automation editor in your GUI if you’re just getting started. Chances of errors are smaller