Add state_class MEASUREMENT to lacrosse temperature and humidity sensors (#79379)

This commit is contained in:
Jan-Philipp Litza
2022-09-30 22:37:50 +02:00
committed by GitHub
parent 2ce837f588
commit 2a45738d97

View File

@@ -13,6 +13,7 @@ from homeassistant.components.sensor import (
PLATFORM_SCHEMA,
SensorDeviceClass,
SensorEntity,
SensorStateClass,
)
from homeassistant.const import (
CONF_DEVICE,
@@ -185,6 +186,7 @@ class LaCrosseTemperature(LaCrosseSensor):
"""Implementation of a Lacrosse temperature sensor."""
_attr_device_class = SensorDeviceClass.TEMPERATURE
_attr_state_class = SensorStateClass.MEASUREMENT
_attr_native_unit_of_measurement = TEMP_CELSIUS
@property
@@ -197,6 +199,7 @@ class LaCrosseHumidity(LaCrosseSensor):
"""Implementation of a Lacrosse humidity sensor."""
_attr_native_unit_of_measurement = PERCENTAGE
_attr_state_class = SensorStateClass.MEASUREMENT
_attr_icon = "mdi:water-percent"
@property