Fix unit of illuminance in Plugwise illuminance sensor (#85392)
This commit is contained in:
parent
ecaec0332d
commit
da51765f5c
2 changed files with 4 additions and 3 deletions
|
@ -20,7 +20,6 @@ PW_TYPE: Final = "plugwise_type"
|
|||
SMILE: Final = "smile"
|
||||
STRETCH: Final = "stretch"
|
||||
STRETCH_USERNAME: Final = "stretch"
|
||||
UNIT_LUMEN: Final = "lm"
|
||||
|
||||
PLATFORMS_GATEWAY: Final[list[str]] = [
|
||||
Platform.BINARY_SENSOR,
|
||||
|
|
|
@ -9,6 +9,7 @@ from homeassistant.components.sensor import (
|
|||
)
|
||||
from homeassistant.config_entries import ConfigEntry
|
||||
from homeassistant.const import (
|
||||
LIGHT_LUX,
|
||||
PERCENTAGE,
|
||||
UnitOfEnergy,
|
||||
UnitOfPower,
|
||||
|
@ -20,7 +21,7 @@ from homeassistant.core import HomeAssistant
|
|||
from homeassistant.helpers.entity import EntityCategory
|
||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||
|
||||
from .const import DOMAIN, UNIT_LUMEN
|
||||
from .const import DOMAIN
|
||||
from .coordinator import PlugwiseDataUpdateCoordinator
|
||||
from .entity import PlugwiseEntity
|
||||
|
||||
|
@ -257,7 +258,8 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||
SensorEntityDescription(
|
||||
key="illuminance",
|
||||
name="Illuminance",
|
||||
native_unit_of_measurement=UNIT_LUMEN,
|
||||
native_unit_of_measurement=LIGHT_LUX,
|
||||
device_class=SensorDeviceClass.ILLUMINANCE,
|
||||
state_class=SensorStateClass.MEASUREMENT,
|
||||
),
|
||||
SensorEntityDescription(
|
||||
|
|
Loading…
Add table
Reference in a new issue