mirror of
https://github.com/home-assistant/core.git
synced 2025-07-19 19:27:45 +00:00
Use enums in wolflink (#61988)
This commit is contained in:
parent
f691b0a1da
commit
806366a0c1
@ -9,14 +9,8 @@ from wolf_smartset.models import (
|
|||||||
Temperature,
|
Temperature,
|
||||||
)
|
)
|
||||||
|
|
||||||
from homeassistant.components.sensor import SensorEntity
|
from homeassistant.components.sensor import SensorDeviceClass, SensorEntity
|
||||||
from homeassistant.const import (
|
from homeassistant.const import PRESSURE_BAR, TEMP_CELSIUS, TIME_HOURS
|
||||||
DEVICE_CLASS_PRESSURE,
|
|
||||||
DEVICE_CLASS_TEMPERATURE,
|
|
||||||
PRESSURE_BAR,
|
|
||||||
TEMP_CELSIUS,
|
|
||||||
TIME_HOURS,
|
|
||||||
)
|
|
||||||
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
from homeassistant.helpers.update_coordinator import CoordinatorEntity
|
||||||
|
|
||||||
from .const import COORDINATOR, DEVICE_ID, DOMAIN, PARAMETERS, STATES
|
from .const import COORDINATOR, DEVICE_ID, DOMAIN, PARAMETERS, STATES
|
||||||
@ -106,7 +100,7 @@ class WolfLinkTemperature(WolfLinkSensor):
|
|||||||
@property
|
@property
|
||||||
def device_class(self):
|
def device_class(self):
|
||||||
"""Return the device_class."""
|
"""Return the device_class."""
|
||||||
return DEVICE_CLASS_TEMPERATURE
|
return SensorDeviceClass.TEMPERATURE
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_unit_of_measurement(self):
|
def native_unit_of_measurement(self):
|
||||||
@ -120,7 +114,7 @@ class WolfLinkPressure(WolfLinkSensor):
|
|||||||
@property
|
@property
|
||||||
def device_class(self):
|
def device_class(self):
|
||||||
"""Return the device_class."""
|
"""Return the device_class."""
|
||||||
return DEVICE_CLASS_PRESSURE
|
return SensorDeviceClass.PRESSURE
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def native_unit_of_measurement(self):
|
def native_unit_of_measurement(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user