mirror of https://github.com/home-assistant/core
geniushub: fix sensor battery level, and bump client (#24123)
* Initial commit * bump client
This commit is contained in:
parent
afeb13d980
commit
96b7bb625d
|
@ -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"]
|
||||
|
|
|
@ -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):
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue