yes, i was thinking so, i donât know how these sensors actually works and are âplacedâ, as the trigger is âmotionâ it then checks (state of âperson detectedâ), but what if this sensor has not finished/changed yet ?, i guess itâs not ârespondsâ as fast as motion, it has to âverify what it sees firstâ ⌠and you rightly has it as first in your condition ⌠so maybe this should be the first trigger
⌠or try with sun.sun as trigger, not sure it works, never tried
trigger:
- platform: state
entity_id: sun.sun
state: below_horizon
⌠Nope i donât think this works as trigger,
Add âperson detectionâ as first trigger, actually i donât know why you need 2, if âperson detectionâ sees a person, there have to be some âmotionâ prior to this , right ?, so i think i would skip the motion-detection(i.e what if someone sneaks up to the âperson-detectionâ then there will be no motion
yes, but he has 2, 1 motion-sensor, and 1 person-detection.sensor, ⌠so if the motion triggers, and in split seconds checks state of âperson-detectionâ this might not have changed yet, and automation stops
because person-detection is a condition, and if this is still of, flow breaks, nothing happens, i donât believe the âTriggerâ waits for the conditions to change, either they are true or false
Yes you are right. I donât think my suggested simplifcation of the trigger affects this. If there is a delay in the two detections then you might need to use a script and put a delay in the sequence then a choose to pick if the second motion detector is activated.
Great i think i would have done the same, as i also have âspecificâ sensors for Near-entry-door vs driveway, garage front(so 1 sensor(front) turns on âlead-lightâ so people can see where they go, or some cat or Deer can trigger with out disturbing , and light up the house :), near-entry-sensor(close) can only be triggered by person walking by, so this i get notified about by, thou i have never tested car/person detection, as it seems like an âsubscriptionâ service for garage frontcam, maybe i find some âexternalâ software for that eventually, also got a few tips from Oz to test. And on some cams i disabled Motion or ânarrowedâ down the âdetection fieldâ to avoid âfalseâ detections
alias: FRONT DOOR LIGHTS ON
description: ''
trigger:
- platform: state
entity_id: sensor.unifi_doorbell_detected_object
from: clear
to: person
condition:
- alias: Sun down
condition: state
entity_id: sun.sun
state: below_horizon
action:
- type: turn_on
device_id: 45e6aaaf4286ace2e84832326b105452
entity_id: switch.sonoff_minir2
domain: switch
- service: notify.mobile_app_mi_iphony
data:
message: SOMEONE OUTSIDE
title: LIGHTS ON
mode: single
should be something like that? correct? btw the sun codition comes with error test! weird.
Yes looks good. If that sensor only has the states of clear and person then you wouldnât need the from line but either way that should work. Although you might need quotes around the clear and person. See here Automation Trigger - Home Assistant
yes, the sun.sun shows error yes, because itâs not supported by the GUI, only in YALM, but it works fine, 2 of my motion-sensors using this( as you cant use sunset/sunrice in same 1 condition)
i appreciate your help, im very surprised how helpful you are, most of the time i get answers such search the forum. it seems its working fine but sometimes the automation has some delay to turns the lights on.