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

Properly handle snapshots if camera added to bridge #311

Merged
merged 3 commits into from
Feb 12, 2021

Conversation

bdraco
Copy link
Contributor

@bdraco bdraco commented Feb 12, 2021

Updated version of #306 pull request to work correctly with 3.2.0, add coverage, and timeout.

The handle_resource method from HAPServer class does not support situation when camera added to bridge and fails with Got a request for snapshot, but the Accessory does not define a "get_snapshot" method error. This is because it tries to check if bridge itself has the get_snapshot method.

This pull request fixes this problem.

@codecov-io
Copy link

codecov-io commented Feb 12, 2021

Codecov Report

Merging #311 (40fd5b4) into dev (f028be7) will increase coverage by 0.00%.
The diff coverage is 91.66%.

@@           Coverage Diff           @@
##              dev     #311   +/-   ##
=======================================
  Coverage   82.78%   82.78%           
=======================================
  Files          19       19           
  Lines        1847     1853    +6     
  Branches      208      210    +2     
=======================================
+ Hits         1529     1534    +5     
  Misses        250      250           
- Partials       68       69    +1     
Impacted Files Coverage Δ
pyhap/hap_handler.py 73.36% <91.66%> (+0.16%) ⬆️

@ikalchev ikalchev merged commit 16b036c into ikalchev:dev Feb 12, 2021
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.

4 participants