Skip to content

Commit

Permalink
Quick fix for HA 21.9 -- not tested
Browse files Browse the repository at this point in the history
  • Loading branch information
TimSoethout committed Sep 5, 2021
1 parent ee632db commit 3bcef2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions custom_components/sems/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
DataUpdateCoordinator,
UpdateFailed,
)
from homeassistant.components.sensor import STATE_CLASS_MEASUREMENT, SensorEntity
from homeassistant.components.sensor import STATE_CLASS_TOTAL_INCREASING, SensorEntity
from homeassistant.const import (
DEVICE_CLASS_POWER,
POWER_WATT,
Expand Down Expand Up @@ -275,7 +275,7 @@ def last_reset(self):
@property
def state_class(self):
"""used by Metered entities / Long Term Statistics"""
return STATE_CLASS_MEASUREMENT
return STATE_CLASS_TOTAL_INCREASING

async def async_added_to_hass(self):
"""When entity is added to hass."""
Expand Down

0 comments on commit 3bcef2e

Please sign in to comment.