mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-23 09:17:06 +00:00
Remove initial_state attributes from the examples (#10119)
Recently I had an extensive discussion about the pros and cons of using the `initial_state` attribute in automations and in the end I had to admit, that there are good arguments against using it unless absolutely necessary and only if one really knows what he or she is doing. In the examples above I can't see a good reason for using `initial_state` and thus I'd propose to delete it from both examples. ...and they were inkonsistent in both examples anyways. ;-) One of them used 'on' and the other used true.
This commit is contained in:
parent
5c945feb9a
commit
d713c7ad8b
@ -86,7 +86,6 @@ Set a theme at the startup of Home Assistant:
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Set theme at startup'
|
||||
initial_state: 'on'
|
||||
trigger:
|
||||
- platform: homeassistant
|
||||
event: start
|
||||
@ -101,7 +100,6 @@ To enable "night mode":
|
||||
```yaml
|
||||
automation:
|
||||
- alias: 'Set dark theme for the night'
|
||||
initial_state: true
|
||||
trigger:
|
||||
- platform: time
|
||||
at: '21:00:00'
|
||||
|
Loading…
x
Reference in New Issue
Block a user