File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
custom_components/uhomeuponor Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1111from requests .exceptions import RequestException
1212
1313from homeassistant .exceptions import PlatformNotReady
14- from homeassistant .components .sensor import (PLATFORM_SCHEMA , SensorDeviceClass )
14+ from homeassistant .components .sensor import (PLATFORM_SCHEMA , SensorDeviceClass , SensorStateClass )
1515from homeassistant .const import (CONF_HOST , CONF_PREFIX , ATTR_ATTRIBUTION , UnitOfTemperature )
1616import homeassistant .helpers .config_validation as cv
1717from logging import getLogger
@@ -120,6 +120,10 @@ def unit_of_measurement(self):
120120 def device_class (self ):
121121 return SensorDeviceClass .TEMPERATURE
122122
123+ @property
124+ def state_class (self ):
125+ return SensorStateClass .MEASUREMENT
126+
123127 # ** State **
124128 @property
125129 def state (self ):
@@ -184,6 +188,10 @@ def unit_of_measurement(self):
184188 def device_class (self ):
185189 return SensorDeviceClass .HUMIDITY
186190
191+ @property
192+ def state_class (self ):
193+ return SensorStateClass .MEASUREMENT
194+
187195 # ** State **
188196 @property
189197 def state (self ):
You can’t perform that action at this time.
0 commit comments