diff --git a/homeassistant/components/saj/sensor.py b/homeassistant/components/saj/sensor.py index 795823b9e9f..8e59899de27 100644 --- a/homeassistant/components/saj/sensor.py +++ b/homeassistant/components/saj/sensor.py @@ -10,6 +10,7 @@ import voluptuous as vol from homeassistant.components.sensor import ( PLATFORM_SCHEMA, STATE_CLASS_MEASUREMENT, + STATE_CLASS_TOTAL_INCREASING, SensorEntity, ) from homeassistant.const import ( @@ -34,7 +35,6 @@ from homeassistant.core import CALLBACK_TYPE, callback from homeassistant.exceptions import PlatformNotReady import homeassistant.helpers.config_validation as cv from homeassistant.helpers.event import async_call_later -from homeassistant.util import dt as dt_util _LOGGER = logging.getLogger(__name__) @@ -177,10 +177,10 @@ class SAJsensor(SensorEntity): self._serialnumber = serialnumber self._state = self._sensor.value - if pysaj_sensor.name in ("current_power", "total_yield", "temperature"): + if pysaj_sensor.name in ("current_power", "temperature"): self._attr_state_class = STATE_CLASS_MEASUREMENT if pysaj_sensor.name == "total_yield": - self._attr_last_reset = dt_util.utc_from_timestamp(0) + self._attr_state_class = STATE_CLASS_TOTAL_INCREASING @property def name(self):