Hi there,
I have 1 motion sensor and 1 light in the hall way below and 1 of each in the hall way above.
Both motion sensors trigger all lamps and once there is no motion sensed for 4 minutes in either all lights should switch off.
But here I’m having a little trouble configuring this. This is what I have;
- alias: 'Turn off hall way lights after last movement'
trigger:
- platform: state
entity_id: binary_sensor.presence_9
to: 'off'
for:
minutes: 4
condition:
- condition: template
value_template: '{{ not is_state("input_select.house_mode","Jazz home alone") }}'
- condition: state
entity_id: binary_sensor.presence_11
to: 'off'
for:
minutes: 4
action:
- service: light.turn_off
entity_id: light.hall_way
This is what I would like to have; check if downstairs motion sensor didn’t have movement for 4 minutes AND upstairs doesn’t have motion for 4 minutes and THEN switch off lights
But here I’m getting a Invalid config for [automation]: extra keys not allowed @ data[‘condition’][1][‘for’] so apparently a FOR is not allowed which I find a bit weird because the documentation mentions them https://www.home-assistant.io/docs/scripts/conditions/
An alternative would be that I could specifiy two triggers with an AND but I know this it not supported.
What am I doing wrong or do you guys know an alternative way of getting this done?
Thanks