diff --git a/homeassistant/components/solarlog/const.py b/homeassistant/components/solarlog/const.py index 3ee767f1513..0e9e5e8e5e0 100644 --- a/homeassistant/components/solarlog/const.py +++ b/homeassistant/components/solarlog/const.py @@ -5,7 +5,7 @@ from dataclasses import dataclass from homeassistant.components.sensor import ( STATE_CLASS_MEASUREMENT, - STATE_CLASS_TOTAL_INCREASING, + STATE_CLASS_TOTAL, SensorEntityDescription, ) from homeassistant.const import ( @@ -19,7 +19,6 @@ from homeassistant.const import ( PERCENTAGE, POWER_WATT, ) -from homeassistant.util import dt DOMAIN = "solarlog" @@ -102,7 +101,7 @@ SENSOR_TYPES: tuple[SolarLogSensorEntityDescription, ...] = ( name="yield total", icon="mdi:solar-power", native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, - state_class=STATE_CLASS_TOTAL_INCREASING, + state_class=STATE_CLASS_TOTAL, factor=0.001, ), SolarLogSensorEntityDescription( @@ -145,8 +144,7 @@ SENSOR_TYPES: tuple[SolarLogSensorEntityDescription, ...] = ( name="consumption total", native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, device_class=DEVICE_CLASS_ENERGY, - state_class=STATE_CLASS_MEASUREMENT, - last_reset=dt.utc_from_timestamp(0), + state_class=STATE_CLASS_TOTAL, factor=0.001, ), SolarLogSensorEntityDescription(