Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delay for triggered Sensor #1014

Open
2 tasks done
TheRealFalseReality opened this issue Aug 19, 2024 · 8 comments
Open
2 tasks done

Delay for triggered Sensor #1014

TheRealFalseReality opened this issue Aug 19, 2024 · 8 comments

Comments

@TheRealFalseReality
Copy link

TheRealFalseReality commented Aug 19, 2024

Checklist

  • I checked for similar existing requests (both open and closed) before posting.
  • My request is generic, other users may benefit from it too.

Proposal

It would be nice to have a delay if a binary_sensor changes state to 'on'. Like triggered alarm when sensor is on for X seconds, to prevent some false alarms (pun intended). I use a Frigate Person Occupancy sensor in hopes to only trigger the alarm when the camera detects a person, but in a certain room, a jacket can give a false positive, but only for a second or 2, but Alarmo will trigger immediately. I'm am gonna use a template helper to copy this sensor with a delay so hopefully quick state changed won't trigger the alarm.

Additional info

Now, alarm triggers as soon as sensor state is 'on'.
Requests, alarm triggers when sensor is 'on' for X seconds.

@davidtinker
Copy link

That would be a great addition. I have been trying to use the template integration to do this but haven't got it working yet. This is what I have so far but it doesn't turn on at all:

template:
  - binary_sensor:
      name: 'Back person occupancy delayed'
      delay_on: 0:00:03
      state: '{{states("sensor.back_person_occupancy")}}'
      device_class: occupancy

@davidtinker
Copy link

I fixed it. Just had to change sensor to binary_sensor in the state template and it works. Also went with 5s delay.

@TheRealFalseReality
Copy link
Author

That would be a great addition. I have been trying to use the template integration to do this but haven't got it working yet. This is what I have so far but it doesn't turn on at all:

template:
  - binary_sensor:
      name: 'Back person occupancy delayed'
      delay_on: 0:00:03
      state: '{{states("sensor.back_person_occupancy")}}'
      device_class: occupancy

Oh I was trying to use jinja template without success. I will have to give this a try

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Sep 19, 2024
@marazmarci
Copy link

I'd still like to see this feature, please don't mark it as stale

@github-actions github-actions bot removed the Stale label Sep 20, 2024
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions github-actions bot added the Stale label Nov 20, 2024
@TheRealFalseReality
Copy link
Author

Would be good feature!

@github-actions github-actions bot removed the Stale label Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants