mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-18 14:56:53 +00:00
Merge pull request #9585 from home-assistant/frenck-2019-0065
Automations: Corrects documentation to match codebase
This commit is contained in:
commit
1c4ef8cfb0
@ -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
|
||||
...
|
||||
|
@ -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 when Home Assistant starts, 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:
|
||||
...
|
||||
```
|
||||
|
Loading…
x
Reference in New Issue
Block a user