Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Update Battery Level and Add Audio Sensitivity #48

Merged
merged 2 commits into from
Oct 9, 2017
Merged

Update Battery Level and Add Audio Sensitivity #48

merged 2 commits into from
Oct 9, 2017

Conversation

jwillaz
Copy link
Collaborator

@jwillaz jwillaz commented Oct 7, 2017

Update get_battery_level to be inline with other camera properties. Retrieve audio detection sensitivity similar to motion detection sensitivity.

Update get_battery_level to be inline with other camera properties.   Retrieve audio detection sensitivity similar to motion detection sensitivity.
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.1%) to 79.736% when pulling 3ce76d0 on jwillaz:battery_level_and_audio_detection into 2d8b535 on tchellomello:master.

3 similar comments
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.1%) to 79.736% when pulling 3ce76d0 on jwillaz:battery_level_and_audio_detection into 2d8b535 on tchellomello:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.1%) to 79.736% when pulling 3ce76d0 on jwillaz:battery_level_and_audio_detection into 2d8b535 on tchellomello:master.

@coveralls
Copy link

Coverage Status

Coverage decreased (-1.1%) to 79.736% when pulling 3ce76d0 on jwillaz:battery_level_and_audio_detection into 2d8b535 on tchellomello:master.

Copy link
Owner

@tchellomello tchellomello left a 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")
Copy link
Owner

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:
Copy link
Owner

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.

@coveralls
Copy link

coveralls commented Oct 9, 2017

Coverage Status

Coverage decreased (-0.9%) to 80.0% when pulling 7dbe8a8 on jwillaz:battery_level_and_audio_detection into 2d8b535 on tchellomello:master.

@tchellomello
Copy link
Owner

Thanks for your contribution @jwillaz

@tchellomello tchellomello merged commit af3fc74 into tchellomello:master Oct 9, 2017
@jwillaz jwillaz deleted the battery_level_and_audio_detection branch October 11, 2017 04:48
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants