This repository has been archived by the owner on Jul 30, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Update Battery Level and Add Audio Sensitivity #48
Merged
tchellomello
merged 2 commits into
tchellomello:master
from
jwillaz:battery_level_and_audio_detection
Oct 9, 2017
Merged
Update Battery Level and Add Audio Sensitivity #48
tchellomello
merged 2 commits into
tchellomello:master
from
jwillaz:battery_level_and_audio_detection
Oct 9, 2017
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Update get_battery_level to be inline with other camera properties. Retrieve audio detection sensitivity similar to motion detection sensitivity.
3 similar comments
tchellomello
suggested changes
Oct 8, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just fix the lint issues and consider the comments above and it looks good to be merged.
pyarlo/camera.py
Outdated
if not self.properties: | ||
return None | ||
|
||
return properties.get("batteryLevel") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how about?
def get_battery_level(self):
"""Get the camera battery level."""
return self.properties.get('batteryLevel') if self.properties else None
pyarlo/camera.py
Outdated
def get_audio_detection_sensitivity(self): | ||
"""Sensitivity level of Camera audio detection.""" | ||
triggers = self.triggers | ||
for trigger in triggers: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't need to assign triggers
. Just do the loop directly on self.triggers
.
tchellomello
approved these changes
Oct 9, 2017
Thanks for your contribution @jwillaz |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Update get_battery_level to be inline with other camera properties. Retrieve audio detection sensitivity similar to motion detection sensitivity.