mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 02:07:09 +00:00
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",
|
"name": "Genius Hub",
|
||||||
"documentation": "https://www.home-assistant.io/components/geniushub",
|
"documentation": "https://www.home-assistant.io/components/geniushub",
|
||||||
"requirements": [
|
"requirements": [
|
||||||
"geniushub-client==0.4.9"
|
"geniushub-client==0.4.11"
|
||||||
],
|
],
|
||||||
"dependencies": [],
|
"dependencies": [],
|
||||||
"codeowners": ["@zxdavb"]
|
"codeowners": ["@zxdavb"]
|
||||||
|
@ -76,7 +76,8 @@ class GeniusDevice(Entity):
|
|||||||
@property
|
@property
|
||||||
def state(self):
|
def state(self):
|
||||||
"""Return the state of the sensor."""
|
"""Return the state of the sensor."""
|
||||||
return self._device.state['batteryLevel']
|
level = self._device.state['batteryLevel']
|
||||||
|
return level if level != 255 else 0
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def device_state_attributes(self):
|
def device_state_attributes(self):
|
||||||
|
@ -487,7 +487,7 @@ gearbest_parser==1.0.7
|
|||||||
geizhals==0.0.9
|
geizhals==0.0.9
|
||||||
|
|
||||||
# homeassistant.components.geniushub
|
# homeassistant.components.geniushub
|
||||||
geniushub-client==0.4.9
|
geniushub-client==0.4.11
|
||||||
|
|
||||||
# homeassistant.components.geo_json_events
|
# homeassistant.components.geo_json_events
|
||||||
# homeassistant.components.nsw_rural_fire_service_feed
|
# homeassistant.components.nsw_rural_fire_service_feed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user