mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 05:07:41 +00:00
Fix unit of illuminance in Plugwise illuminance sensor (#85392)
This commit is contained in:
parent
ecaec0332d
commit
da51765f5c
@ -20,7 +20,6 @@ PW_TYPE: Final = "plugwise_type"
|
|||||||
SMILE: Final = "smile"
|
SMILE: Final = "smile"
|
||||||
STRETCH: Final = "stretch"
|
STRETCH: Final = "stretch"
|
||||||
STRETCH_USERNAME: Final = "stretch"
|
STRETCH_USERNAME: Final = "stretch"
|
||||||
UNIT_LUMEN: Final = "lm"
|
|
||||||
|
|
||||||
PLATFORMS_GATEWAY: Final[list[str]] = [
|
PLATFORMS_GATEWAY: Final[list[str]] = [
|
||||||
Platform.BINARY_SENSOR,
|
Platform.BINARY_SENSOR,
|
||||||
|
@ -9,6 +9,7 @@ from homeassistant.components.sensor import (
|
|||||||
)
|
)
|
||||||
from homeassistant.config_entries import ConfigEntry
|
from homeassistant.config_entries import ConfigEntry
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
|
LIGHT_LUX,
|
||||||
PERCENTAGE,
|
PERCENTAGE,
|
||||||
UnitOfEnergy,
|
UnitOfEnergy,
|
||||||
UnitOfPower,
|
UnitOfPower,
|
||||||
@ -20,7 +21,7 @@ from homeassistant.core import HomeAssistant
|
|||||||
from homeassistant.helpers.entity import EntityCategory
|
from homeassistant.helpers.entity import EntityCategory
|
||||||
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
from homeassistant.helpers.entity_platform import AddEntitiesCallback
|
||||||
|
|
||||||
from .const import DOMAIN, UNIT_LUMEN
|
from .const import DOMAIN
|
||||||
from .coordinator import PlugwiseDataUpdateCoordinator
|
from .coordinator import PlugwiseDataUpdateCoordinator
|
||||||
from .entity import PlugwiseEntity
|
from .entity import PlugwiseEntity
|
||||||
|
|
||||||
@ -257,7 +258,8 @@ SENSORS: tuple[SensorEntityDescription, ...] = (
|
|||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
key="illuminance",
|
key="illuminance",
|
||||||
name="Illuminance",
|
name="Illuminance",
|
||||||
native_unit_of_measurement=UNIT_LUMEN,
|
native_unit_of_measurement=LIGHT_LUX,
|
||||||
|
device_class=SensorDeviceClass.ILLUMINANCE,
|
||||||
state_class=SensorStateClass.MEASUREMENT,
|
state_class=SensorStateClass.MEASUREMENT,
|
||||||
),
|
),
|
||||||
SensorEntityDescription(
|
SensorEntityDescription(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user