Skip to content

Commit

Permalink
fix: Fixed state class for current total consumption sensors (5 minut…
Browse files Browse the repository at this point in the history
…es dev time)
  • Loading branch information
BottlecapDave committed Dec 25, 2024
1 parent 7c3596c commit 9af97a5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def device_class(self):
@property
def state_class(self):
"""The state class of sensor"""
return SensorStateClass.TOTAL
return SensorStateClass.TOTAL_INCREASING

@property
def native_unit_of_measurement(self):
Expand All @@ -82,11 +82,6 @@ def extra_state_attributes(self):
"""Attributes of the sensor."""
return self._attributes

@property
def last_reset(self):
"""Return the time when the sensor was last reset, if any."""
return self._last_reset

@property
def native_value(self):
return self._state
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def device_class(self):
@property
def state_class(self):
"""The state class of sensor"""
return SensorStateClass.TOTAL
return SensorStateClass.TOTAL_INCREASING

@property
def native_unit_of_measurement(self):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def device_class(self):
@property
def state_class(self):
"""The state class of sensor"""
return SensorStateClass.TOTAL
return SensorStateClass.TOTAL_INCREASING

@property
def native_unit_of_measurement(self):
Expand Down

0 comments on commit 9af97a5

Please sign in to comment.