#Issue with custom automation.yaml

1 messages · Page 1 of 1 (latest)

final sierra
#

I've put the file through a YAML validator and it passes, i used YAML from the automation in the UI doing what i'm looking to do, and duplicated the code.

I've got the attached file imported in configuration.yaml as:
automation chores: !include chores/automation.yaml

but i'm getting the following errors when it tries to load, i've truncated it due to length:
Unnamed automation could not be validated and has been disabled: extra keys not allowed @ data['chore_charley_clean_car_seats']. Got {'alias': 'chore_charley_clean_car_seats', 'trigger': [{'platform': 'state', 'entity_id': ['input_boolean.chore_charley_clean_car_seats'], 'to': 'on'}], 'condition': [{'condition': 'state', 'entity_id': ['input_boolean.chore_charley_clean_car_seats_completed_today'], 'state': 'off'}], 'action': [{'action': 'script.chore_charley_clean_car_seats'}, {'action': 'input_boolean.turn_on', 'target': {'entity_id': ['input_boolean.chore_charley_clean_car_seats_completed_today']}}], 'mode': 'single'} extra keys not allowed @ data['chore_charley_gather_garbages']. Got {'alias': 'chore_charley_gather_garbages', 'trigger': [{'platform': 'state', 'entity_id': ['input_boolean.chore_charley_gather_garbages'], 'to': 'on'}], 'condition': [{'condition': 'state', 'entity_id': ['input_boolean.chore_charley_gather_garbages_completed_today'], 'state': 'off'}], 'action': [{'action': 'script.chore_charley_gather_garbages'}, {'action': 'input_boolean.turn_on', 'target': {'entity_id': ['input_boolean.chore_charley_gather_garbages_completed_today']}}], 'mode': 'single'} extra keys not allowed @ data['chore_charley_laundry_clothes_in_hamper']. Got {'alias': 'chore_charley_laundry_clothes_in_hamper', 'trigger': [{'platform': 'state', 'entity_id': ['input_boolean.chore_charley_laundry_clothes_in_hamper'], 'to': 'on'}], 'condition': [{'condition': 'state', 'entity_id': ['input_boolean.chore_charley

finite pawn
#

try removing the first line: chore_charley_make_bed:

open lark
#

More like

- alias: chore_charley_make_bed
  trigger: 
    - platform: state
      entity_id: 
        - input_boolean.chore_charley_make_bed
      to: "on"
  condition: 
    - condition: state
      entity_id: 
        - input_boolean.chore_charley_make_bed_completed_today
      state: "off"
  action:
    - action: script.chore_charley_make_bed
    - action: input_boolean.turn_on
      target:
        entity_id:
          - input_boolean.chore_charley_make_bed_completed_today
  mode: single
- alias: chore_henry_make_bed
  trigger: 
    - platform: state
      entity_id: 
        - input_boolean.chore_henry_make_bed
      to: "on"
  condition: 
    - condition: state
      entity_id: 
        - input_boolean.chore_henry_make_bed_completed_today
      state: "off"
  action:
    - action: script.chore_henry_make_bed
    - action: input_boolean.turn_on
      target:
        entity_id:
          - input_boolean.chore_henry_make_bed_completed_today
  mode: single
#

For an included file

final sierra
#

i'll give that a try. i'm generating the yaml with a python script due to the number of automations i'm building

open lark
#

You can look how the automatically generated automations.yaml is structured.

#

Your own ones have to be basically the same

final sierra
#

There was a bunch of extra stuff in those i didn't know where it came from

#

that change with the - alias fixed it

#

thank you @open lark