From 5df02f3a7871724d6201181847e1723b236e05ae Mon Sep 17 00:00:00 2001 From: Fredrik Erlandsson Date: Sun, 10 Feb 2019 21:48:33 +0100 Subject: [PATCH] fix missing sensor values for Point (#20937) --- homeassistant/components/point/__init__.py | 2 +- homeassistant/components/point/sensor.py | 2 ++ requirements_all.txt | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/point/__init__.py b/homeassistant/components/point/__init__.py index 6616d6b24ec..66044678e28 100644 --- a/homeassistant/components/point/__init__.py +++ b/homeassistant/components/point/__init__.py @@ -26,7 +26,7 @@ from .const import ( CONF_WEBHOOK_URL, DOMAIN, EVENT_RECEIVED, POINT_DISCOVERY_NEW, SCAN_INTERVAL, SIGNAL_UPDATE_ENTITY, SIGNAL_WEBHOOK) -REQUIREMENTS = ['pypoint==1.0.6'] +REQUIREMENTS = ['pypoint==1.0.7'] DEPENDENCIES = ['webhook'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/point/sensor.py b/homeassistant/components/point/sensor.py index 9413cf163d9..eb320de0efd 100644 --- a/homeassistant/components/point/sensor.py +++ b/homeassistant/components/point/sensor.py @@ -67,6 +67,8 @@ class MinutPointSensor(MinutPointEntity): @property def state(self): """Return the state of the sensor.""" + if self.value is None: + return None return round(self.value, self._device_prop[1]) @property diff --git a/requirements_all.txt b/requirements_all.txt index 683f69ba29c..3d6a40a31b3 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1192,7 +1192,7 @@ pypck==0.5.9 pypjlink2==1.2.0 # homeassistant.components.point -pypoint==1.0.6 +pypoint==1.0.7 # homeassistant.components.sensor.pollen pypollencom==2.2.2