Move temperature utility to unit_conversion (#78960)
This commit is contained in:
parent
090d004122
commit
ddf56baf7a
6 changed files with 166 additions and 70 deletions
|
@ -19,11 +19,12 @@ from homeassistant.const import (
|
|||
from homeassistant.core import HomeAssistant, callback, valid_entity_id
|
||||
from homeassistant.helpers import config_validation as cv
|
||||
from homeassistant.helpers.json import JSON_DUMP
|
||||
from homeassistant.util import dt as dt_util, temperature as temperature_util
|
||||
from homeassistant.util import dt as dt_util
|
||||
from homeassistant.util.unit_conversion import (
|
||||
EnergyConverter,
|
||||
PowerConverter,
|
||||
PressureConverter,
|
||||
TemperatureConverter,
|
||||
)
|
||||
|
||||
from .const import MAX_QUEUE_BACKLOG
|
||||
|
@ -123,7 +124,7 @@ async def ws_handle_get_statistics_during_period(
|
|||
vol.Optional("energy"): vol.In(EnergyConverter.VALID_UNITS),
|
||||
vol.Optional("power"): vol.In(PowerConverter.VALID_UNITS),
|
||||
vol.Optional("pressure"): vol.In(PressureConverter.VALID_UNITS),
|
||||
vol.Optional("temperature"): vol.In(temperature_util.VALID_UNITS),
|
||||
vol.Optional("temperature"): vol.In(TemperatureConverter.VALID_UNITS),
|
||||
vol.Optional("volume"): vol.Any(VOLUME_CUBIC_FEET, VOLUME_CUBIC_METERS),
|
||||
}
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue