feat: expose camera person status
Add two properties to Person class: out_of_sight & last_seen that we retrieve from home status call
Summary by Sourcery
This pull request introduces new properties out_of_sight and last_seen to the Person class, allowing for tracking of a person's visibility status and last seen timestamp. It also includes updates to the Person class to support these properties and extends existing tests to cover the new functionality.
- New Features:
- Added
out_of_sightandlast_seenproperties to the Person class to track visibility and last seen timestamp.
- Added
- Enhancements:
- Updated the Person class to include a new
updatemethod for refreshing person data.
- Updated the Person class to include a new
- Tests:
- Extended test cases in
test_camera.pyto validate the newout_of_sightandlast_seenproperties.
- Extended test cases in
Reviewer's Guide by Sourcery
This pull request introduces two new properties, out_of_sight and last_seen, to the Person class in the pyatmo library. These properties are retrieved from the home status call and are used to update the person's status. The changes include modifications to the Person class, updates to the Home class to handle the new properties, and corresponding test updates.
File-Level Changes
| Files | Changes |
|---|---|
src/pyatmo/person.pysrc/pyatmo/home.py |
Added and updated properties out_of_sight and last_seen in the Person class and ensured they are updated in the Home class. |
tests/test_camera.py |
Extended tests to validate the new out_of_sight and last_seen properties in the Person class. |
Tips
- Trigger a new Sourcery review by commenting
@sourcery-ai reviewon the pull request. - Continue your discussion with Sourcery by replying directly to review comments.
- You can change your review settings at any time by accessing your dashboard:
- Enable or disable the Sourcery-generated pull request summary or reviewer's guide;
- Change the review language;
- You can always contact us if you have any questions or feedback.