Use UnitOfPower in integrations [a-g] (#83812)
This commit is contained in:
parent
431df618c3
commit
4fe025b297
23 changed files with 88 additions and 91 deletions
|
@ -18,7 +18,7 @@ from homeassistant.const import (
|
|||
CONF_PASSWORD,
|
||||
CONF_USERNAME,
|
||||
ENERGY_KILO_WATT_HOUR,
|
||||
POWER_WATT,
|
||||
UnitOfPower,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
import homeassistant.helpers.config_validation as cv
|
||||
|
@ -262,7 +262,7 @@ class AtomeSensor(SensorEntity):
|
|||
|
||||
if sensor_type == LIVE_TYPE:
|
||||
self._attr_device_class = SensorDeviceClass.POWER
|
||||
self._attr_native_unit_of_measurement = POWER_WATT
|
||||
self._attr_native_unit_of_measurement = UnitOfPower.WATT
|
||||
self._attr_state_class = SensorStateClass.MEASUREMENT
|
||||
else:
|
||||
self._attr_device_class = SensorDeviceClass.ENERGY
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue