Update automation-create-first.markdown (#1211)

This commit is contained in:
Daniel Høyer Iversen 2016-10-11 14:25:09 +02:00 committed by Fabian Affolter
parent 3bb17aa23f
commit 96b6fa7ca2

View File

@ -17,6 +17,7 @@ In this example, we are defining a trigger to track the sunset and tell it to fi
# Example configuration.yaml entry
automation:
alias: Turn on light when sun sets
initial_state: True
hide_entity: False
trigger:
platform: sun
@ -25,7 +26,7 @@ automation:
service: light.turn_on
```
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`.
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`.
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.