Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Merge pull request #251 from Thomas55555/add-state_class-to-statistics
Browse files Browse the repository at this point in the history
add state_class to statistics
  • Loading branch information
Thomas55555 authored Jun 13, 2022
2 parents 138e5e9 + 24108b8 commit 63812b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions custom_components/husqvarna_automower/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
SensorDeviceClass,
SensorEntity,
SensorEntityDescription,
SensorStateClass,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import PERCENTAGE
Expand Down Expand Up @@ -189,6 +190,7 @@ class AutomowerStatisticsSensor(SensorEntity, AutomowerEntity):

_attr_entity_category = EntityCategory.DIAGNOSTIC
_attr_entity_registry_enabled_default = False
_attr_state_class = SensorStateClass.TOTAL

def __init__(self, session, idx, description: SensorEntityDescription):
super().__init__(session, idx)
Expand Down

0 comments on commit 63812b5

Please sign in to comment.