dCon0ne
(Don Con)
April 18, 2019, 1:39am
1
I have an issue with Dr.Zz “Holiday LEDs”, effects automation(s). When I run the “Check Config”, I get the following error/message;
Invalid config for [automation]: [initial_state] is an invalid option for [automation]. Check: automation->action->1->initial_state. (See /config/configuration.yaml, line 158). Please check the docs at https://home-assistant.io/components/automation/
This is the code that I am using;
- alias: "Holiday Input Effect"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: input_select.holiday_led_effect
action:
- service: mqtt.publish
data_template:
topic: "bruh/mqttstrip/seteffect"
payload: '{{ trigger.to_state.state | string }}'
If I remove “initial_state: True” , I get the same error for the next line, “hide_entity: False” …
Spacing seems okay from the example you’ve given, but I have a feeling it isn’t lining up with the others. Is it one automation.yaml file? Split automations?
Edit: make sure they are spaces, not tabs
dCon0ne
(Don Con)
April 18, 2019, 2:28am
3
@walrus_parka It is one Automation.yaml file, with 3 other automations, that work. And yes all spaces, not using Tabs for spacing.
dCon0ne
(Don Con)
April 18, 2019, 1:36pm
4
Anyone one else, have any ideas???
petro
(Petro)
April 18, 2019, 2:28pm
5
post your whole file if possible, or the whole automation section.
dCon0ne
(Don Con)
April 18, 2019, 8:16pm
6
@petro You can find the file, in DrZz’s Github repository for the Holiday LEDs, located HERE .
The only thing, that I changed in the file was the WiFi & MQTT info…
petro
(Petro)
April 18, 2019, 9:42pm
7
so that whole file is copy/paste into your configuration? I know that yaml is correct, so the error is in yours. You need to post yours.
dCon0ne
(Don Con)
April 18, 2019, 9:56pm
8
Ok, here is what I have in my automation.yaml file. If I remove the last section(Holiday LEDs), the “Config Check”, passes.
- id: 408bb08095d14bef98493b2fe9e27577
alias: Restart HA
trigger:
- at: 02:00:00
platform: time
condition: []
action:
- service: homeassistant.restart
- alias: Create Snapshot
trigger:
- platform: time
at: 02:15:00
condition:
condition: time
weekday:
- mon
- wed
- fri
action:
- service: hassio.snapshot_full
data_template:
name: Backup {{ now().strftime('%Y-%m-%d') }}
id: 276dd0cda4754b1cbc364b13cfcedaff
- alias: Backup To Dropbox
trigger:
- platform: time
at: 03:15:00
condition:
condition: time
weekday:
- mon
- wed
- fri
action:
- service: hassio.addon_stdin
data_template:
addon: ########_dropbox_sync
input:
command: upload
#============================================================
#========================= LED Poles ========================
#============================================================
- alias: "Holiday Input Effect"
initial_state: True
hide_entity: False
trigger:
- platform: state
entity_id: input_select.holiday_led_effect
action:
- service: mqtt.publish
data_template:
topic: "bruh/mqttstrip/seteffect"
payload: '{{ trigger.to_state.state | string }}'
dCon0ne
(Don Con)
April 18, 2019, 10:16pm
9
Is there a Breaking Change, with Automations, that I may have missed???
finity
April 19, 2019, 12:35am
10
I’ll grab this one for you @petro .
@dCon0ne
You need to move the entire holiday input effect automation section to the left two spaces. “- alias:” there needs to line up with the other “- alias:” entries along with everything below.
2 Likes
dCon0ne
(Don Con)
April 19, 2019, 1:36am
11
@finity Thanks for seeing that, the Check Config, PASSED. I have been staring at that code for 3 days, and missed that
petro
(Petro)
April 19, 2019, 11:34am
12
This is why you should be cautious when copying/pasting into your own code.