Hello I want only to run this automation when there are 0 people at home (zone.home). This is my automation
alias: Lampenaanuitalsniemandthuisis
description: ""
trigger:
- platform: sun
event: sunset
offset: "-00:15:00"
- platform: sun
event: sunset
offset: "03:02:00"
condition:
- condition: numeric_state
entity_id: zone.home
attribute: persons
above: -1
below: 1
action:
- if:
- condition: time
after: "20:00:00"
before: "22:00:00"
then:
- service: scene.turn_on
target:
entity_id: scene.kamer_lan_gewoon
metadata: {}
- service: scene.turn_on
target:
entity_id: scene.kamer_binh_normaal_alle
metadata: {}
- type: turn_on
device_id: 3d8f7a511f8ace443784b34f00f7ad03
entity_id: light.lamp_schouw
domain: light
- type: turn_on
device_id: 4e4ae64deecf42d31ec314aa2410641b
entity_id: light.lamp_bank
domain: light
else:
- service: scene.turn_on
target:
entity_id: scene.lampen_binh_uit
metadata: {}
- service: scene.turn_on
target:
entity_id: scene.kamer_lan_uit
metadata: {}
- type: turn_off
device_id: 3d8f7a511f8ace443784b34f00f7ad03
entity_id: light.lamp_schouw
domain: light
- type: turn_off
device_id: 4e4ae64deecf42d31ec314aa2410641b
entity_id: light.lamp_bank
domain: light
mode: single
But with this automation its always running also when there are people at home. Which condition do I need to use?