mirror of
https://github.com/home-assistant/core.git
synced 2025-07-08 05:47:10 +00:00
Use new enums in nexia (#61952)
This commit is contained in:
parent
f72b2e71ee
commit
c49d59bf54
@ -2,14 +2,8 @@
|
|||||||
|
|
||||||
from nexia.const import UNIT_CELSIUS
|
from nexia.const import UNIT_CELSIUS
|
||||||
|
|
||||||
from homeassistant.components.sensor import SensorEntity
|
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
|
||||||
from homeassistant.const import (
|
from homeassistant.const import PERCENTAGE, TEMP_CELSIUS, TEMP_FAHRENHEIT
|
||||||
DEVICE_CLASS_HUMIDITY,
|
|
||||||
DEVICE_CLASS_TEMPERATURE,
|
|
||||||
PERCENTAGE,
|
|
||||||
TEMP_CELSIUS,
|
|
||||||
TEMP_FAHRENHEIT,
|
|
||||||
)
|
|
||||||
|
|
||||||
from .const import DOMAIN
|
from .const import DOMAIN
|
||||||
from .coordinator import NexiaDataUpdateCoordinator
|
from .coordinator import NexiaDataUpdateCoordinator
|
||||||
@ -86,7 +80,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||||||
thermostat,
|
thermostat,
|
||||||
"get_outdoor_temperature",
|
"get_outdoor_temperature",
|
||||||
"Outdoor Temperature",
|
"Outdoor Temperature",
|
||||||
DEVICE_CLASS_TEMPERATURE,
|
SensorDeviceClass.TEMPERATURE,
|
||||||
unit,
|
unit,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -98,7 +92,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||||||
thermostat,
|
thermostat,
|
||||||
"get_relative_humidity",
|
"get_relative_humidity",
|
||||||
"Relative Humidity",
|
"Relative Humidity",
|
||||||
DEVICE_CLASS_HUMIDITY,
|
SensorDeviceClass.HUMIDITY,
|
||||||
PERCENTAGE,
|
PERCENTAGE,
|
||||||
percent_conv,
|
percent_conv,
|
||||||
)
|
)
|
||||||
@ -119,7 +113,7 @@ async def async_setup_entry(hass, config_entry, async_add_entities):
|
|||||||
zone,
|
zone,
|
||||||
"get_temperature",
|
"get_temperature",
|
||||||
"Temperature",
|
"Temperature",
|
||||||
DEVICE_CLASS_TEMPERATURE,
|
SensorDeviceClass.TEMPERATURE,
|
||||||
unit,
|
unit,
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user