How do I detect when all device are not in a passive zone


I have a passive zone that covers most of my home city and the surrounding countryside. This was mainly for automatically turning the thermostat into away mode when we are not home, I set up a config that is bellow

- platform: zone
  entity_id: group.all_devices
  event: leave
- service: climate.set_away_mode
    entity_id: climate.hall
    away_mode: true```

I tested this today as i was visiting family and it didnt work, so i was considering eather not doing this or using and condition and a zone condition.

The latter i cant work out how to do as i dont know what ```zone.``` not being in a zone would be, and also will i be in the city zone if i am in other zones inside the city zone.

If anyone has done something like this i would like to know how you achived it also.

I think the group.all_devices only says “home” if one device in the group is home and “away” if all devices in that group are away. You can write something that says, if everyone is away for 10 minutes then turn off the AC like this:

  - platform: state
    entity_id: group.all_devices
    to: 'away'
      minutes: '10'
  - service: climate.set_away_mode

1 Like


I should’ve said earlier that i had worked out a way to do this using input bool for each user and use a condition to see if both are off