Use UnitOfTemperature in integrations (a-d) (#84304)
This commit is contained in:
parent
82efbee443
commit
d89ba40010
24 changed files with 73 additions and 63 deletions
|
@ -9,7 +9,7 @@ from homeassistant.components.sensor import (
|
|||
SensorEntityDescription,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import SIGNAL_STRENGTH_DECIBELS_MILLIWATT, TEMP_FAHRENHEIT
|
||||
from homeassistant.const import SIGNAL_STRENGTH_DECIBELS_MILLIWATT, UnitOfTemperature
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import DeviceInfo, EntityCategory
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -22,7 +22,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
|
|||
SensorEntityDescription(
|
||||
key=TYPE_TEMPERATURE,
|
||||
name="Temperature",
|
||||
native_unit_of_measurement=TEMP_FAHRENHEIT,
|
||||
native_unit_of_measurement=UnitOfTemperature.FAHRENHEIT,
|
||||
device_class=SensorDeviceClass.TEMPERATURE,
|
||||
entity_category=EntityCategory.DIAGNOSTIC,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue