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

Add battery attribute to Sensibo #14735

Merged
merged 2 commits into from
Jun 1, 2018
Merged

Add battery attribute to Sensibo #14735

merged 2 commits into from
Jun 1, 2018

Conversation

michaeldavie
Copy link
Contributor

Description:

Added battery voltage attribute, which is reported by v1 pods.

Checklist:

  • The code change is tested and works locally.
  • Local tests pass with tox. Your PR cannot be merged unless tests pass

if 'batteryVoltage' in self._measurements:
return self._measurements['batteryVoltage']
else:
return None
Copy link
Member

Choose a reason for hiding this comment

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

Using return self._measurements.get('batteryVoltage') is enough.

Copy link
Contributor Author

@michaeldavie michaeldavie Jun 1, 2018

Choose a reason for hiding this comment

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

Seen. Thanks!

Copy link
Member

@fabaff fabaff left a comment

Choose a reason for hiding this comment

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

Thanks 🐦

@fabaff fabaff merged commit 4935043 into home-assistant:dev Jun 1, 2018
@balloob balloob mentioned this pull request Jun 8, 2018
girlpunk pushed a commit to girlpunk/home-assistant that referenced this pull request Sep 4, 2018
* Added battery attribute

* Simplify current_battery
@home-assistant home-assistant locked and limited conversation to collaborators Sep 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants