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.