Skip to content

Added method to return battery level#33

Merged
bradsk88 merged 3 commits intopython-wink:masterfrom
w1ll1am23:battery
May 4, 2016
Merged

Added method to return battery level#33
bradsk88 merged 3 commits intopython-wink:masterfrom
w1ll1am23:battery

Conversation

@w1ll1am23
Copy link
Collaborator

@captainnapalm was asking about this yesterday in the python-wink Gitter. It would be use to to have battery level reported into HA so notification could be sent on low battery levels. I would hate to come home to unlock my door and the battery be dead.

Only returning the battery level of the spotter if that device isn't plugged in.


@property
def battery_level(self):
return self._last_reading.get('battery', False)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably return None as a fallback

@coveralls
Copy link

coveralls commented Apr 27, 2016

Coverage Status

Coverage increased (+0.2%) to 85.461% when pulling b9f4729 on w1ll1am23:battery into e013424 on bradsk88:master.

@coveralls
Copy link

coveralls commented Apr 27, 2016

Coverage Status

Coverage increased (+0.2%) to 85.461% when pulling f4faef4 on w1ll1am23:battery into e013424 on bradsk88:master.

@bradsk88 bradsk88 merged commit d29a70f into python-wink:master May 4, 2016
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.

3 participants