by the way if you want to check that John OR Cath OR Elisabeth are home, this is how you should do it:
condition:
- condition: or
conditions:
- condition: state
entity_id: person.john
state: home
- condition: state
entity_id: person.cath
state: home
- condition: state
entity_id: person.elizabeth
state: home
To make things easier to test - I’ve set up a dummy automation to test the principle:
- id: '1584530593752'
alias: AA Test automation of for
description: ''
trigger:
- entity_id: ' switch.lounge_lamp'
for: 'minutes: 2'
from: 'off'
platform: state
to: 'on'
condition:
- condition: state
entity_id: person.john
state: home
action:
- data: {}
entity_id: switch.play_room_christmas_lights
service: switch.turn_on
However, the action is never executed. John is home, and the switch.lounge_lamp has been left on for greater than 2 minutes. switch.play_room_christmas_lights never turns on. If I fire the automation manually then switch.play_room_christmas_lights does turn on.
Glad it helped, but one of @lolouk44’s answers should really be marked as the solution since they provided the solution (and because I just restated something they already said).
@truxntrax,
Glad you got it all sorted, note that your entity_id: does not need quoting and this ‘used’ to stop execution but the automation editor now seems to insert random quotes all over the place.
Also the time does need quoting as per Tediore’s post (though again, subject to the vagueuries of the editor).
To assist others searching for similar solutions can you please post your final working solution ?
It just ties everything up in a neat parcel
@Mutt - no problem. To help anyone else who may need to see the complete automation here it is
- id: '1584391345377'
alias: Heating Night Mode
description: ''
trigger:
- entity_id: binary_sensor.alarm_set_status_2
for: 00:04:00
from: 'off'
platform: state
to: 'on'
condition:
- condition: or
conditions:
- condition: state
entity_id: person.john
state: home
- condition: state
entity_id: person.cath
state: home
- condition: state
entity_id: person.elizabeth
state: home
action:
- data:
hvac_mode: auto
temperature: 16
entity_id: climate.wiser_central_heating_zone
service: climate.set_temperature
- data:
hvac_mode: auto
temperature: 16
entity_id: climate.wiser_lounge
service: climate.set_temperature
Thanks all for assistance. The best automated house just does it’s thing. I am sure there will be some corner cases I will need to iron out, but for now, all is good.