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

Add Per Camera Snooze Functionality #975

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

austinc3030
Copy link

@austinc3030 austinc3030 commented Aug 5, 2024

Description:

Implements a per camera snooze function as present here: MattTW/BlinkMonitorProtocol#67

Currently supports:

  • Getting the remaining snooze time for the camera in the format of "this time stamp is when snoozing will expire".
  • Setting the camera to snooze notifications
    • I was unable to find a value other than "240" minutes (4 hours) that worked.

There is more than can be implemented, such as snoozing an entire sync module's cameras.

As far as testing:

  • Currently blocked by another PR (Fix tests with aiohttp >= 3.10.0 #974)
  • I have tried writing tests for this PR but just not familiar enough with tox/mock testing. Seems like only 3 tests are needed:
    • "snooze_till" property
    • "snooze" function
    • "request_camera_snooze" request

Reason for removing my previous PR: Somehow messed up the git history while trying to squash to a single commit.

Related issue (if applicable): fixes #

Checklist:

  • Local tests with tox run successfully PR cannot be meged unless tests pass
  • Changes tested locally to ensure platform still works as intended
  • Tests added to verify new code works

@fronzbot
Copy link
Owner

fronzbot commented Aug 8, 2024

Just merged #974 so you should be able to pull those changes in and retrigger the tests. I'm hoping to be able to review this PR over the weekend. Been super busy, sorry for the delay!

@austinc3030
Copy link
Author

I have added, but not manually tested, per sync module snooze. The api is documented in a comment on MattTW/BlinkMonitorProtocol#67.

I have not added automated testing for my methods yet, but will take another stab at it now that the aiohttp PR has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants