DrZz's Holiday LEDs automation not working for me, Help needed

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

@walrus_parka It is one Automation.yaml file, with 3 other automations, that work. And yes all spaces, not using Tabs for spacing.

Anyone one else, have any ideas???

post your whole file if possible, or the whole automation section.

@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…

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.

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 }}'

Is there a Breaking Change, with Automations, that I may have missed???

I’ll grab this one for you @petro. :wink:

@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

@finity Thanks for seeing that, the Check Config, PASSED. I have been staring at that code for 3 days, and missed that

This is why you should be cautious when copying/pasting into your own code.