Lights off when alarm armed automation

Basically I’m trying to create an automation that will turn off any lights that are left on in the house when the alarm goes into away mode. unfortunately I keep ending up with this error

ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: required key not provided @ data['trigger'][0]['platform']. Got None. (See /config/configuration.yaml, line 63). Please check the docs at https://home-assistant.io/components/automation/

My automation looks like this

- alias: turn off lights when alarm set to armed
  trigger:
    entity_id: alarm_control_panel.abode_alarm
    platfrom: state
    to: 'armed_away'
  condition:
    condition: and
    conditions:
      - condition: state
        entity_id: alarm_control_panel.abode_alarm
        state: 'armed_home'
      - condition: state
        entity_id: alarm_control_panel.abode_alarm
        state: 'disarmed'
  action:
    service: light.turn_off
    entity_id: group.indoor_lights

Im sure I’m missing something obvious but I’m completely stumped

You condition is telling HA to only fire if the alarm is armed home and is disarmed at the same time.

Remove the condition and you should be fine.

updated to this

- alias: turn off lights when alarm set to armed
  trigger:
    entity_id: alarm_control_panel.abode_alarm
    platfrom: state
    to: 'armed_away'
  action:
    service: light.turn_off
    entity_id: group.indoor_lights

Still have same error

Did you restart HA or reload the automation?

Same exact error?

Try it like this.

- alias: turn off lights when alarm set to armed
  trigger:
    platfrom: state
    entity_id: alarm_control_panel.abode_alarm
    to: 'armed_away'
  action:
    service: light.turn_off
    entity_id: group.indoor_lights
1 Like

‘platfrom’ ?? You might wanna try ‘platform’ …

1 Like

:disappointed: Nice catch :sleeping:

Ha I knew it had to be something dumb by me. In all the time I looked at it and tried to make changes I have no idea how I missed that. Works now, thanks so much