diff --git a/homeassistant/components/geniushub/manifest.json b/homeassistant/components/geniushub/manifest.json index e1708d0e836..b2c7286a2d5 100644 --- a/homeassistant/components/geniushub/manifest.json +++ b/homeassistant/components/geniushub/manifest.json @@ -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"] diff --git a/homeassistant/components/geniushub/sensor.py b/homeassistant/components/geniushub/sensor.py index 744906b8f2d..ef148b48143 100644 --- a/homeassistant/components/geniushub/sensor.py +++ b/homeassistant/components/geniushub/sensor.py @@ -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): diff --git a/requirements_all.txt b/requirements_all.txt index 3287c6ef46e..81582926d95 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -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