mirror of
https://github.com/home-assistant/core.git
synced 2025-12-24 12:59:34 +00:00
Correct celcius to celsius (#1860)
This commit is contained in:
@@ -6,7 +6,7 @@ import voluptuous as vol
|
||||
|
||||
from homeassistant.loader import get_platform
|
||||
from homeassistant.const import (
|
||||
CONF_PLATFORM, CONF_SCAN_INTERVAL, TEMP_CELCIUS, TEMP_FAHRENHEIT)
|
||||
CONF_PLATFORM, CONF_SCAN_INTERVAL, TEMP_CELSIUS, TEMP_FAHRENHEIT)
|
||||
from homeassistant.helpers.entity import valid_entity_id
|
||||
import homeassistant.util.dt as dt_util
|
||||
from homeassistant.util import slugify
|
||||
@@ -156,7 +156,7 @@ def temperature_unit(value):
|
||||
"""Validate and transform temperature unit."""
|
||||
value = str(value).upper()
|
||||
if value == 'C':
|
||||
return TEMP_CELCIUS
|
||||
return TEMP_CELSIUS
|
||||
elif value == 'F':
|
||||
return TEMP_FAHRENHEIT
|
||||
raise vol.Invalid('invalid temperature unit (expected C or F)')
|
||||
|
||||
Reference in New Issue
Block a user