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 support for motion detection switch #241

Merged
merged 5 commits into from
Apr 27, 2022

Conversation

NickM-27
Copy link
Sponsor Collaborator

@NickM-27 NickM-27 commented Apr 19, 2022

This adds support for blakeblackshear/frigate#3117

Concerns

Only concern is the req motion detection toggle to off will fail if detect is enabled. Assuming this req is what is merged, if in HA we call publish motion OFF and it fails on frigate side, will the switch here get set back to the correct state or will it show OFF incorrectly?

Basically: do we need to implement this restriction here as well?

@codecov
Copy link

codecov bot commented Apr 19, 2022

Codecov Report

Merging #241 (f2705b0) into master (18022f7) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master      #241   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines         1373      1373           
=========================================
  Hits          1373      1373           
Impacted Files Coverage Δ
custom_components/frigate/switch.py 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18022f7...f2705b0. Read the comment docs.

@blakeblackshear
Copy link
Owner

As long as we are handling the state topic correctly in frigate, I think it will just toggle back to on by itself.

@dermotduffy
Copy link
Collaborator

This looks good to me (awaiting parent PR to be merged).

@NickM-27
Copy link
Sponsor Collaborator Author

@dermotduffy parent PR has been merged 👍

@dermotduffy dermotduffy added enhancement New feature or request and removed pending labels Apr 27, 2022
@dermotduffy dermotduffy merged commit 5ad9ab1 into blakeblackshear:master Apr 27, 2022
@dermotduffy
Copy link
Collaborator

Thanks @NickM-27 !

@NickM-27 NickM-27 deleted the motion-switch branch April 27, 2022 04:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants