mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
Return numerical value
This commit is contained in:
parent
ee339cfb20
commit
9f396b44f7
@ -147,16 +147,7 @@ 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 = 'None'
|
|
||||||
self._unit_of_measurement = ''
|
|
||||||
else:
|
|
||||||
self._state = data.precipType
|
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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user