Automations: Corrects documentation to match codebase

This commit is contained in:
Franck Nijhof 2019-06-08 19:15:54 +02:00
parent 574542a549
commit de2a2e28a6
No known key found for this signature in database
GPG Key ID: D62583BA8AB11CA3
2 changed files with 5 additions and 4 deletions

View File

@ -26,6 +26,7 @@ Starting with 0.28 your automation rules can be controlled with the frontend.
This allows one to reload the automation without restarting Home Assistant
itself. If you don't want to see the automation rule in your frontend use
`hide_entity: true` to hide it.
You can also use `initial_state: 'false'` so that the automation
is not automatically turned on after a Home Assistant reboot.
@ -33,7 +34,7 @@ is not automatically turned on after a Home Assistant reboot.
automation:
- alias: Door alarm
hide_entity: true
initial_state: 'true'
initial_state: true
trigger:
- platform: state
...

View File

@ -49,14 +49,14 @@ Actions are all about calling services. To explore the available services open t
### {% linkable_title Automation initial state %}
When you create a new automation, it will be disabled (and therefore won't trigger) unless you explicitly add `initial_state: true` to it or turn it on manually via UI/another automation/developer tools.
When you create a new automation, it will be enabled unless you explicitly add `initial_state: false` to it or turn it off manually via UI/another automation/developer tools. In case automations need to be always enabled or disabled upon Home Assistant start, then you can set the `initial_state` in your automations. Otherwise, the previous state will be restored.
In case automations need to be enabled or disabled upon Home Assistant restart, then you have to set the `initial_state` in your automations. Otherwise, the previous state will be restored. Please note that if for some reason Home Assistant cannot restore the previous state, e.g., because of an interrupted or failed startup, it will result in the automation being disabled on the next Home Assistant startup.
Please note that if for some reason Home Assistant cannot restore the previous state, it will result in the automation being enabled.
```text
automation:
- alias: Automation Name
initial_state: true
initial_state: false
trigger:
...
```