From 43cfa90728138b915363ea9db2cabfc233140448 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Seux?= Date: Wed, 29 May 2024 20:37:33 +0200 Subject: [PATCH] Add measurement state_class to 1wire sensors Fix #206 --- custom_components/aquarea/sensor.py | 1 + 1 file changed, 1 insertion(+) diff --git a/custom_components/aquarea/sensor.py b/custom_components/aquarea/sensor.py index 6a302dd..d5c14f5 100644 --- a/custom_components/aquarea/sensor.py +++ b/custom_components/aquarea/sensor.py @@ -423,6 +423,7 @@ def message_received(message): name=f"HeishaMon 1wire {device_id}", native_unit_of_measurement="°C", # we assume everything will be temperature device_class=SensorDeviceClass.TEMPERATURE, + state_class=SensorStateClass.MEASUREMENT, device=DeviceType.HEISHAMON, ) sensor = HeishaMonSensor(self.hass, description, self.config_entry)