This code is failing. I want to have the hallway lights turn off if
left on for more than 8 minutes
Between the hours of 06:31 until the next day morning at 06:14
Either person must be present
Error:
Invalid config for [automation]: [entity_id] is an invalid option for [automation]. Check: automation->condition->0->conditions->1->conditions->1->entity_id. (See /config/configuration.yaml, line 8).
Here is the the code in question:
- alias: 'turn hallway lights off'
trigger:
platform: state
entity_id: light.hallway
to: 'on'
for:
hours: 0
minutes: 8
condition:
condition: and
conditions:
- condition: time
after: '06:31:00'
before: '06:14:00'
- condition: or
conditions:
- condition: state
entity_id: input_boolean.duc_home
state: 'on'
- condition: time
entity_id: input_boolean.eri_home
state: 'on'
action:
service: light.turn_off
entity_id: light.hallway