Skip to content

Commit 96b6fa7

Browse files
Danielhiversenfabaff
authored andcommitted
Update automation-create-first.markdown (home-assistant#1211)
1 parent 3bb17aa commit 96b6fa7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

source/getting-started/automation-create-first.markdown

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ In this example, we are defining a trigger to track the sunset and tell it to fi
1717
# Example configuration.yaml entry
1818
automation:
1919
alias: Turn on light when sun sets
20+
initial_state: True
2021
hide_entity: False
2122
trigger:
2223
platform: sun
@@ -25,7 +26,7 @@ automation:
2526
service: light.turn_on
2627
```
2728
28-
Starting with 0.28 automation rules can be reloaded from the [frontend](/components/automation/) and are shown by default. With [`hide_entity:`](/components/automation/) you can control this behaviour. It's is very handy if you are working on your rules but when a rule is finished and you don't want to see that rule in your frontend, you can set `hide_entity:` to `True`.
29+
Starting with 0.28 automation rules can be reloaded from the [frontend](/components/automation/) and are shown by default. With [`hide_entity:`](/components/automation/) you can control this behaviour. It's is very handy if you are working on your rules but when a rule is finished and you don't want to see that rule in your frontend, you can set `hide_entity:` to `True`. To set an automation to be disabled when HASS starts set `initial_state:` to `False`.
2930

3031
After a few days of running this automation rule you come to realize that this automation rule is not good enough. It was already dark when the lights went on and the one day you weren't home, the lights turned on anyway. Time for some tweaking. Let's add an offset to the sunset trigger and a condition to only turn on the lights if anyone is home.
3132

0 commit comments

Comments
 (0)