2.6 KiB
title | description |
---|---|
Automating Home Assistant | A quick intro on getting your first automation going. |
Once your {% term devices %} are set up, it's time to put the cherry on the pie: {% term automation %}. We're going to create a simple automation to turn on the lights when the sun sets. Of course, this assumes that you have set up an integration that provides a light at this point.
Automatically turn on the lights before sunset
-
Go to {% my automations title="Settings > Automations & scenes" %} and in the lower right corner, select the Create Automation button.
-
The first step is defining what should {% term trigger %} the automation to run.
-
Select Sunset.
- We want the automation to be triggered a little before that, so let's add
-00:30
as the offset. This indicates that the automation will be triggered 30 minutes before sunset. Neat!
- We want the automation to be triggered a little before that, so let's add
-
Once we have defined our trigger, we need to define what should happen.
- Select Add action.
- Type
Ser
and select Call service
-
Select Light > Turn on or directly enter
light.turn_on
.- For this automation, we're going to turn on all lights in the living room, so let's select the Area.
- This only works if your lights are assigned to an {% term area %}.
-
To save the automation, select Save, give the automation a name and Save again.
- Now wait till it's 30 minutes until the sun sets and see your automation magic!
{% include getting-started/next_step.html step="Presence detection" link="/getting-started/presence-detection/" %}
If after completing this getting started you are interested in reading more about automations, we recommend the following pages:
Please note, these pages may require a bit more experience with Home Assistant than you probably have at this point of this tutorial.