Automation problem after upgrade to 0.50.1

Hi!

Is just upgraded to 0.50.1 and now get the following error which didn’t appear in the previous version:
ERROR (MainThread) [homeassistant.config] Invalid config for [automation]: [state] is an invalid option for [automation]. Check: automation->trigger->0->state. (See /home/homeassistant/.homeassistant/configuration.yaml, line 131). Please check the docs at https://home-assistant.io/components/automation/

Does anyone have a solution for that?

Thanks!

Breaking Changes

Automations: The state trigger keyword state and the time trigger keyword after were deprecated in 0.46. They have now been removed. Use to and at instead. (@amelchio - #8510) (automation.state docs) (automation.time docs) (breaking change)

3 Likes

Thanks, so in

- alias: Trigger alarm while armed away
  trigger:
    - platform: state
      entity_id: sensor.motion_lf_entry_burglar
      to: '8'
    - platform: state
      entity_id: sensor.motion_lf_livingroom_burglar
      to: '8'
    - platform: state
      entity_id: sensor.motion_uf_hallway_burglar
      to: '8'
  condition:
    - condition: state
      entity_id: alarm_control_panel.ha_alarm
      state: 'armed_away'
  action:
    - service: alarm_control_panel.alarm_trigger

I’d just need to change state: 'armed_away' to from: 'armed_away'?

Or in a trigger:

- alias: Activate Sirene after Alarm Trigger
  hide_entity: true
  trigger:
    platform: state
    entity_id: alarm_control_panel.ha_alarm
    state: 'triggered'
  action:

Change to to: 'triggered'?

Thanks!

In trigger, yep that’s my understanding, not sure about condition as it doesn’t mention it, you may be able to leave it as is.

Thanks, according to the automatic config approval only changing the trigger worked.

  condition:
    condition: time
    after: '08:00:00'
    before: '18:00:00'

Like this should be how to write?

I changed all my trigger from something like

trigger:
  - platform: state
    entity_id: binary_sensor.bedroom_multi_sensor_sensor
    state: 'off'

to something like

trigger:
  - platform: state
    entity_id: binary_sensor.bedroom_multi_sensor_sensor
    to: 'off'

But i still get errors about trigger state. But there is no automation with the old state anymore.

Found it: it missed some state lines