Legacy Syntax error for trigger

I have this code from the Home Assistant Auto-update v2024.9.30.0 blueprint:

trigger:
- id: HA Schedule based
  platform: state
  entity_id: !input schedule_entity
- id: HA Start
  platform: homeassistant
  event: start
- id: New update
  platform: template
  value_template: "{{\n  states.update\n  | default([])\n  | selectattr(\"state\",
    \"eq\", \"on\")\n  | rejectattr(\"entity_id\", \"in\", input_update_exclusions)\n
    \ | list | count | int(0) > 0\n}}"
- id: New day
  platform: time
  at: 00:00:01
- id: Automations reloaded
  platform: event
  event_type: automation_reloaded
- id: Pause entities changed
  platform: state
  entity_id: !input pause_entities

That gives me these LEGACY_SYNTAX errors:

CrapGPT is unable to correct this code… Can someone point me in the right direction?

Replace all instances of the word platform: with trigger:

On line 328, replace the word trigger: with its plural form triggers:

If elsewhere in the blueprint there is a line containing the word action: replace it with its plural form actions:

If there are instances of the word service: then replace them with action:

Old style

alias: example
trigger:
  - platform: state
    entity_id: binary_sensor.foo
condition: []
action:
  - service: switch.turn_on
    target:
      entity_id: switch.bar

New style

alias: example
triggers:
  - trigger: state
    entity_id: binary_sensor.foo
conditions: []
actions:
  - action: switch.turn_on
    target:
      entity_id: switch.bar

It is not an error.
It’s a notification that you are using old syntax.

Contact the author of the blueprint about this but it will work fine as is, assuming you don’t want to take control of the blueprint or edit it yourself.

If you do want to edit the blueprint, 123 has instructions above.

Thank you both!

I’ll try to reach out to the owner of the blueprint.
And yes, I plan to mess around with it :slight_smile:

1 Like