mirror of
https://github.com/home-assistant/core.git
synced 2025-07-14 00:37:13 +00:00
commit
c423a51315
@ -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