I’m using this one also as an automation and works great:
entity_id:
- binary_sensor.0x00158d00031cd4ef_contact
- binary_sensor.0x00158d0003139e42_contact
to: 'on'
Getting this error:
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
value should be a string for dictionary value @ data[‘condition’][0][‘entity_id’]. Got None. (See /config/configuration.yaml, line 12). Please check the docs at https://home-assistant.io/integrations/automation/
I don’t believe you can list multiple entities in a condition like that. Make that single condition two separate state conditions (one for each entity). Conditions are AND by default so listing two conditions will limit the automation to executing only if both conditions are true.
@icaman004 Believe it or not, either of those two indentation styles with a list will work. My entire config has indentation like this:
Right, but that’s in a trigger, not in a condition. You can list entity IDs in a trigger like that. Also, triggers are always OR, while conditions are always AND (when just you list them without specifying condition: or of course).
Your error says
value should be a string for dictionary value @ data[‘condition’][0][‘entity_id’].
Which means it’s expecting a string, not a list, for entity_id: in your condition.