Use UnitOfPower in integrations [s-z] (#83826)
This commit is contained in:
parent
eb6310f7bb
commit
52d4a358a0
22 changed files with 69 additions and 70 deletions
|
@ -15,10 +15,10 @@ from homeassistant.config_entries import ConfigEntry
|
|||
from homeassistant.const import (
|
||||
LIGHT_LUX,
|
||||
PERCENTAGE,
|
||||
POWER_WATT,
|
||||
TEMP_CELSIUS,
|
||||
TEMP_FAHRENHEIT,
|
||||
Platform,
|
||||
UnitOfPower,
|
||||
)
|
||||
from homeassistant.core import HomeAssistant
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
@ -90,7 +90,7 @@ class VeraSensor(VeraDevice[veraApi.VeraSensor], SensorEntity):
|
|||
if self.vera_device.category == veraApi.CATEGORY_HUMIDITY_SENSOR:
|
||||
return PERCENTAGE
|
||||
if self.vera_device.category == veraApi.CATEGORY_POWER_METER:
|
||||
return POWER_WATT
|
||||
return UnitOfPower.WATT
|
||||
return None
|
||||
|
||||
def update(self) -> None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue