Skip to content

Commit

Permalink
fix(sensor): Fixed state class for sensors to "total"
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
This fix causes long term statistics for the sensors to break. To rectify this, visit https://github.com/BottlecapDave/HomeAssistant-OctopusEnergy/issues/102
  • Loading branch information
BottlecapDave committed Dec 11, 2022
1 parent bb24518 commit fda8df6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions custom_components/octopus_energy/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ def device_class(self):
@property
def state_class(self):
"""The state class of sensor"""
return SensorStateClass.TOTAL_INCREASING
return SensorStateClass.TOTAL

@property
def unit_of_measurement(self):
Expand Down Expand Up @@ -481,7 +481,7 @@ def device_class(self):
@property
def state_class(self):
"""The state class of sensor"""
return SensorStateClass.TOTAL_INCREASING
return SensorStateClass.TOTAL

@property
def unit_of_measurement(self):
Expand Down Expand Up @@ -701,7 +701,7 @@ def device_class(self):
@property
def state_class(self):
"""The state class of sensor"""
return SensorStateClass.TOTAL_INCREASING
return SensorStateClass.TOTAL

@property
def unit_of_measurement(self):
Expand Down Expand Up @@ -789,7 +789,7 @@ def device_class(self):
@property
def state_class(self):
"""The state class of sensor"""
return SensorStateClass.TOTAL_INCREASING
return SensorStateClass.TOTAL

@property
def unit_of_measurement(self):
Expand Down

0 comments on commit fda8df6

Please sign in to comment.