Add state_class MEASUREMENT to lacrosse temperature and humidity sensors (#79379)
This commit is contained in:
parent
2ce837f588
commit
2a45738d97
1 changed files with 3 additions and 0 deletions
|
@ -13,6 +13,7 @@ from homeassistant.components.sensor import (
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
SensorDeviceClass,
|
SensorDeviceClass,
|
||||||
SensorEntity,
|
SensorEntity,
|
||||||
|
SensorStateClass,
|
||||||
)
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
CONF_DEVICE,
|
CONF_DEVICE,
|
||||||
|
@ -185,6 +186,7 @@ class LaCrosseTemperature(LaCrosseSensor):
|
||||||
"""Implementation of a Lacrosse temperature sensor."""
|
"""Implementation of a Lacrosse temperature sensor."""
|
||||||
|
|
||||||
_attr_device_class = SensorDeviceClass.TEMPERATURE
|
_attr_device_class = SensorDeviceClass.TEMPERATURE
|
||||||
|
_attr_state_class = SensorStateClass.MEASUREMENT
|
||||||
_attr_native_unit_of_measurement = TEMP_CELSIUS
|
_attr_native_unit_of_measurement = TEMP_CELSIUS
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -197,6 +199,7 @@ class LaCrosseHumidity(LaCrosseSensor):
|
||||||
"""Implementation of a Lacrosse humidity sensor."""
|
"""Implementation of a Lacrosse humidity sensor."""
|
||||||
|
|
||||||
_attr_native_unit_of_measurement = PERCENTAGE
|
_attr_native_unit_of_measurement = PERCENTAGE
|
||||||
|
_attr_state_class = SensorStateClass.MEASUREMENT
|
||||||
_attr_icon = "mdi:water-percent"
|
_attr_icon = "mdi:water-percent"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
|
Loading…
Add table
Reference in a new issue