From daa9c8d8566144a2a0cc170c2527e20f304d77a2 Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Mon, 30 Aug 2021 11:07:05 -0600 Subject: [PATCH] Add -term statistics for Notion sensors (#55414) --- homeassistant/components/notion/sensor.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/homeassistant/components/notion/sensor.py b/homeassistant/components/notion/sensor.py index 803cfce3360..204074ed884 100644 --- a/homeassistant/components/notion/sensor.py +++ b/homeassistant/components/notion/sensor.py @@ -1,5 +1,9 @@ """Support for Notion sensors.""" -from homeassistant.components.sensor import SensorEntity, SensorEntityDescription +from homeassistant.components.sensor import ( + STATE_CLASS_MEASUREMENT, + SensorEntity, + SensorEntityDescription, +) from homeassistant.config_entries import ConfigEntry from homeassistant.const import DEVICE_CLASS_TEMPERATURE, TEMP_CELSIUS from homeassistant.core import HomeAssistant, callback @@ -14,6 +18,7 @@ SENSOR_DESCRIPTIONS = ( name="Temperature", device_class=DEVICE_CLASS_TEMPERATURE, native_unit_of_measurement=TEMP_CELSIUS, + state_class=STATE_CLASS_MEASUREMENT, ), )