Correct celcius to celsius (#1860)
This commit is contained in:
1 parent
9090672146
commit
2e79e9d5bb
43 files changed
+128
-109
No files matched your search
@@ -7,7 +7,7 @@ https://home-assistant.io/components/sensor.openweathermap/
|
||||
import logging
|
||||
from datetime import timedelta
|
||||
|
||||
from homeassistant.const import CONF_API_KEY, TEMP_CELCIUS, TEMP_FAHRENHEIT
|
||||
from homeassistant.const import CONF_API_KEY, TEMP_CELSIUS, TEMP_FAHRENHEIT
|
||||
from homeassistant.helpers.entity import Entity
|
||||
from homeassistant.util import Throttle
|
||||
|
||||
@@ -106,7 +106,7 @@ class OpenWeatherMapSensor(Entity):
|
||||
if self.type == 'weather':
|
||||
self._state = data.get_detailed_status()
|
||||
elif self.type == 'temperature':
|
||||
if self.temp_unit == TEMP_CELCIUS:
|
||||
if self.temp_unit == TEMP_CELSIUS:
|
||||
self._state = round(data.get_temperature('celsius')['temp'],
|
||||
1)
|
||||
elif self.temp_unit == TEMP_FAHRENHEIT:
|
||||
|
||||
Reference in new issue
Block a user