geniushub: fix sensor battery level, and bump client (#24123)

* Initial commit

* bump client
This commit is contained in:
David Bonnes 2019-05-26 13:01:29 +01:00 committed by Pascal Vizeli
parent afeb13d980
commit 96b7bb625d
3 changed files with 4 additions and 3 deletions

View File

@ -3,7 +3,7 @@
"name": "Genius Hub",
"documentation": "https://www.home-assistant.io/components/geniushub",
"requirements": [
"geniushub-client==0.4.9"
"geniushub-client==0.4.11"
],
"dependencies": [],
"codeowners": ["@zxdavb"]

View File

@ -76,7 +76,8 @@ class GeniusDevice(Entity):
@property
def state(self):
"""Return the state of the sensor."""
return self._device.state['batteryLevel']
level = self._device.state['batteryLevel']
return level if level != 255 else 0
@property
def device_state_attributes(self):

View File

@ -487,7 +487,7 @@ gearbest_parser==1.0.7
geizhals==0.0.9
# homeassistant.components.geniushub
geniushub-client==0.4.9
geniushub-client==0.4.11
# homeassistant.components.geo_json_events
# homeassistant.components.nsw_rural_fire_service_feed