Use UnitOfMass in integrations (#83930)
This commit is contained in:
parent
c0a7934828
commit
ae9506d0bb
4 changed files with 8 additions and 8 deletions
|
@ -16,7 +16,7 @@ from homeassistant.components.sensor import (
|
|||
SensorStateClass,
|
||||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import MASS_POUNDS, PERCENTAGE
|
||||
from homeassistant.const import PERCENTAGE, UnitOfMass
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -140,7 +140,7 @@ ROBOT_SENSOR_MAP: dict[type[Robot], list[RobotSensorEntityDescription]] = {
|
|||
RobotSensorEntityDescription[LitterRobot4](
|
||||
key="pet_weight",
|
||||
name="Pet weight",
|
||||
native_unit_of_measurement=MASS_POUNDS,
|
||||
native_unit_of_measurement=UnitOfMass.POUNDS,
|
||||
device_class=SensorDeviceClass.WEIGHT,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue