hello, I have the problem with the device tracker in a snapshot automation with regard to a camera that it does not accept the status “not_home” as OK status. if I test the automation with the status “home” the condition runs on green, with “not_home” this is red.
my .yaml :
‘’’
alias: Snapshot
description: ‘’
trigger:
platform: state
entity_id:
binary_sensor.hauseingang_person_detected
binary_sensor.hauseingang_motion
to: ‘on’
condition:
condition: state
entity_id: group.all_person
state: home
action:
service: camera.snapshot
data:
filename: /config/www/cameraHof.jpg
target:
entity_id: camera.hauseingang
‘’’
the test of the condition is performed under settings → automations → and then in the automation under “Test” to the right of the condition. Here a red X appears with “not_home” and not a green hook. does anyone have an idea where the error can lie? “home” and “not_home” is not so difficult to make a mistake there.
Thou im really not sure what you try to accomplice here… IF person_detected/ + motion detected at house-entry , and IF group.all_person is “home” … Then take a snapshot ?
EDIT: above means that IF group.all_person is “not_home” the automation/condition will “fail” … Abort “Action” if “person_detected” + “motion” detected ( i.e red )
Not to mention: If one of the binary-sensors is not “on” ( at the same “very moment” ), it wont even check the condition(s) … in think you should rethink
i only want to take a snapshot when a person is detected and nobody from group,all_person is at home.
when I replace “home” with “not_home” the automation runs on red, so it doesn’t work.
Sorry, my fold. i only want to take a snapshot when a person is detected and nobody from group,all_person is at home.
when I replace “home” with “not_home” the automation runs on red, so it doesn’t work. i hope this format is correct now
- id: '1654534710909'
alias: Snapshot
description: ''
trigger:
- platform: state
entity_id:
- binary_sensor.hauseingang_person_detected
to: 'on'
condition:
- condition: state
entity_id: group.all_person
state: home
action:
- service: camera.snapshot
data:
filename: /config/www/cameraHof.jpg
If so, then that is working properly. The tester tells you whether or not the condition is currently true. If everyone is home, then not_home should return False.