From 9f396b44f77ac3341df463a85459003662ff71b1 Mon Sep 17 00:00:00 2001
From: Fabian Affolter <fabian@affolter-engineering.ch>
Date: Tue, 8 Dec 2015 10:10:32 +0100
Subject: [PATCH] Return numerical value

---
 homeassistant/components/sensor/forecast.py | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/homeassistant/components/sensor/forecast.py b/homeassistant/components/sensor/forecast.py
index c024c19b5f7..42fbe26b9cf 100644
--- a/homeassistant/components/sensor/forecast.py
+++ b/homeassistant/components/sensor/forecast.py
@@ -147,17 +147,8 @@ class ForeCastSensor(Entity):
                 self._state = data.nearestStormBearing
             elif self.type == 'precip_intensity':
                 self._state = data.precipIntensity
-                if data.precipIntensity == 0:
-                    self._state = 'None'
-                    self._unit_of_measurement = ''
-                else:
-                    self._state = data.precipIntensity
             elif self.type == 'precip_type':
-                if data.precipType is None:
-                    self._state = 'None'
-                    self._unit_of_measurement = ''
-                else:
-                    self._state = data.precipType
+                self._state = data.precipType
             elif self.type == 'precip_probability':
                 self._state = round(data.precipProbability * 100, 1)
             elif self.type == 'dew_point':
-- 
GitLab