I have an automation that is supposed to turn on the driveway light when the driveway camera sees a car. That much works fine, but my problem is that shortly after the light turns off, Frigate detects the car again. I thought that the
to: "on"
from: "off"
would prevent this retrigger.
Is my problem my automation or how Frigate detects objects?
alias: Driveway car Presence
description: Turns on driveway light for 15-minutes when a car is detected in the driveway.
mode: single
triggers:
- entity_id:
- binary_sensor.driveway_car_occupancy
to: "on"
from: "off"
trigger: state
conditions:
- condition: sun
before: sunrise
after: sunset
actions:
- target:
entity_id: light.driveway_light_light
data: {}
action: light.turn_on
- delay:
hours: 0
minutes: 15
seconds: 0
milliseconds: 0
- metadata: {}
data: {}
target:
entity_id: switch.driveway_light
action: switch.turn_off
I usually just move these to where they belong, but you are here long enough that you may have it in uncatagorized for a reason? Anyway just letting you know if you didn’t already that it’s in an unusual category…
If you mean the car gets continuously redetected (which in turn unnecessarily switches the driveway light) although the car has been parked you should tune the stationary behavior within Frigate for the camera in question.
Once an object becomes stationary, object detection will not be continually run on that object. This serves to reduce resource usage and redundant detections when there has been no motion near the tracked object. This also means that Frigate is contextually aware, and can for example filter out recording segments to only when the object is considered active. Motion alone does not determine if an object is “active” for active_objects segment retention. Lighting changes for a parked car won’t make an object active.
For deeper insights how Frigate handles stationary objects look HERE.