mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 07:17:14 +00:00
Automations: Corrects documentation to match codebase
This commit is contained in:
parent
574542a549
commit
de2a2e28a6
@ -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
|
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
|
itself. If you don't want to see the automation rule in your frontend use
|
||||||
`hide_entity: true` to hide it.
|
`hide_entity: true` to hide it.
|
||||||
|
|
||||||
You can also use `initial_state: 'false'` so that the automation
|
You can also use `initial_state: 'false'` so that the automation
|
||||||
is not automatically turned on after a Home Assistant reboot.
|
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:
|
automation:
|
||||||
- alias: Door alarm
|
- alias: Door alarm
|
||||||
hide_entity: true
|
hide_entity: true
|
||||||
initial_state: 'true'
|
initial_state: true
|
||||||
trigger:
|
trigger:
|
||||||
- platform: state
|
- platform: state
|
||||||
...
|
...
|
||||||
|
@ -49,14 +49,14 @@ Actions are all about calling services. To explore the available services open t
|
|||||||
|
|
||||||
### {% linkable_title Automation initial state %}
|
### {% 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
|
```text
|
||||||
automation:
|
automation:
|
||||||
- alias: Automation Name
|
- alias: Automation Name
|
||||||
initial_state: true
|
initial_state: false
|
||||||
trigger:
|
trigger:
|
||||||
...
|
...
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user