[state] is an invalid option for [automation]

Hi,
i am currently trying to streamline my hand written automations for the new automations editor. I have a problem with the following error during startup:[state] is an invalid option for [automation]. Check: automation->trigger->0->state.

This is the automation which causes this error:

- id: '1'
  alias: Schalte in Kinomodus
  hide_entity: true
  initial_state: true
  trigger:
  - platform: state
    entity_id: media_player.yamaha_amp
    state: 'on'
  condition:
  - condition: or
    conditions:
      - condition: template
        value_template: '{{ states.media_player.yamaha_amp.attributes.source == "FireTV"}}'
      - condition: template
        value_template: '{{ states.media_player.yamaha_amp.attributes.source == "Chromecast"}}'
  action:
  - service: script.turn_on
    data:
      entity_id: script.kino_start

This worked perfectly for HASS < 0.5, and i can’t explain this error. Where am i wrong?

i’m experience the same error too. I tried a multiple combination and so far no lucks

1 Like

https://home-assistant.io/blog/2017/07/29/release-50/#breaking-changes explains the issue. In your trigger section, change state: 'on' to to: 'on'.

3 Likes

Before you upgrade, you need to read the release notes. There are almost always Breaking Changes.

CMon, really? Why do we allow these breaking changes?

1 Like

I don’t know if this is articulated very well anywhere, but, the main idea is that Home Assistant isn’t even at version 1.0 yet. It’s being developed so fast, and components are being added so quickly, that occasionally breaking changes have to be made so that the system can be improved, or so that awkward designs aren’t programmed into it for all eternity. It’s the trade-off we have for having cutting edge features!

3 Likes

@happydutch all development is done by volunteers who actually “ALLOW” us to use their code.

@zarthan The users of the platform are volunteering their time as well reporting bugs and debugging the code. It’s not really a decent argument anyway for an open source platform. At some point you need to decide to lock down the core.

1 Like

And that’ll happen nearer version 1.0. Until then it’s up to you to read the change log and the highlighted Breaking Changes section before you blindly update.

Running with a platform that’s under heavy development isn’t for everybody, but complaining that it’s under heavy development and that things change is like complaining that water is wet. If you don’t like it, nobody’s forcing you to use Home Assistant - though maybe it’s the only one out there that meets your needs :wink:

5 Likes

Thank you for this. I need to ‘RTFM’! This solved my problem.