Skip to content
Snippets Groups Projects
Commit 9f396b44 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

Return numerical value

parent ee339cfb
No related branches found
No related tags found
No related merge requests found
...@@ -147,17 +147,8 @@ class ForeCastSensor(Entity): ...@@ -147,17 +147,8 @@ class ForeCastSensor(Entity):
self._state = data.nearestStormBearing self._state = data.nearestStormBearing
elif self.type == 'precip_intensity': elif self.type == 'precip_intensity':
self._state = data.precipIntensity 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': elif self.type == 'precip_type':
if data.precipType is None: self._state = data.precipType
self._state = 'None'
self._unit_of_measurement = ''
else:
self._state = data.precipType
elif self.type == 'precip_probability': elif self.type == 'precip_probability':
self._state = round(data.precipProbability * 100, 1) self._state = round(data.precipProbability * 100, 1)
elif self.type == 'dew_point': elif self.type == 'dew_point':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment