Automation Syntax Differences

I have a section of code that is not working, it is producing an error. I cannot explain why its erroring:

- alias: Living Room Minimote Button 1 SP
  trigger:
    platform: event
    event_type: zwave.scene_activated
    event_data: 
      entity_id: remote_living_room_28
      scene_id: 1
  condition:
    condition: state
    entity_id: group.kitchen_5
    state: off
  action:
    service: homeassistant.turn_on
    entity_id: group.kitchen_5

It produces this error:

17-02-10 22:09:04 ERROR (MainThread) [homeassistant.bootstrap] Invalid config for [automation]: extra keys not allowed @ data['condition'][0]['state']. Got None
not a valid value for dictionary value @ data['condition'][0]['condition']. Got None. (See /home/homeassistant/.homeassistant/configuration.yaml, line 117). Please check the docs at https://home-assistant.io/components/automation/

So I tried many different configurations and nothing was working. So for giggles I tried the exact same syntax, but using a dictionary after the first condition

- alias: Living Room Minimote Button 1 SP
  trigger:
    platform: event
    event_type: zwave.scene_activated
    event_data: 
      entity_id: remote_living_room_28
      scene_id: 1
  condition: {"condition":"state","entity_id":"group.kitchen_5","state":"off"}
  action:
    service: homeassistant.turn_on
    entity_id: group.kitchen_5

Why does the first one produce an error where the second one works?

I’m guessing no one has input on this? It doesn’t make sense to me. I think it’s a bug in HA, unless anyone has input.

Are you sure you don’t have any odd characters (tabs instead of spaces, etc). That looks correct. Here’s a working snippet of an action condition from my config:

  condition:
      condition: state
      entity_id: input_boolean.trigger_first_morning
      state: 'on'

I’m positive, I turned on ‘show all characters’. I have a script that is identical that doesn’t use ‘group’ that is EXACTLY the same and it works. I copy that chunk of code, replace the ‘script’ with ‘group’ and it fails. Replace it back with ‘script’ and it works again.

Well, are you sure you have a group.kitchen_5?

Check the states dev tool.

yeah, I’m sure. I have 8 buttons that condition off of groups and they all produce an error if I don’t use the 2nd method.

The reason this was failing is because "off" wasn’t in quotes. e.g. this would have worked.

- alias: Living Room Minimote Button 1 SP
  trigger:
    platform: event
    event_type: zwave.scene_activated
    event_data: 
      entity_id: remote_living_room_28
      scene_id: 1
  condition:
    condition: state
    entity_id: group.kitchen_5
    state: 'off'
  action:
    service: homeassistant.turn_on
    entity_id: group.kitchen_5