Skip to content

Commit 016c1de

Browse files
steinmnfrenck
authored andcommitted
Set LG Thinq energy sensor state_class as total_increasing (home-assistant#155816)
1 parent c270f31 commit 016c1de

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

homeassistant/components/lg_thinq/sensor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,7 @@ class ThinQEnergySensorEntityDescription(SensorEntityDescription):
622622
usage_period=USAGE_MONTHLY,
623623
start_date_fn=lambda today: today,
624624
end_date_fn=lambda today: today,
625+
state_class=SensorStateClass.TOTAL_INCREASING,
625626
),
626627
ThinQEnergySensorEntityDescription(
627628
key="last_month",

tests/components/lg_thinq/snapshots/test_sensor.ambr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@
477477
}),
478478
'area_id': None,
479479
'capabilities': dict({
480-
'state_class': <SensorStateClass.TOTAL: 'total'>,
480+
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
481481
}),
482482
'config_entry_id': <ANY>,
483483
'config_subentry_id': <ANY>,
@@ -516,7 +516,7 @@
516516
'attributes': ReadOnlyDict({
517517
'device_class': 'energy',
518518
'friendly_name': 'Test air conditioner Energy this month',
519-
'state_class': <SensorStateClass.TOTAL: 'total'>,
519+
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
520520
'unit_of_measurement': <UnitOfEnergy.WATT_HOUR: 'Wh'>,
521521
}),
522522
'context': <ANY>,

0 commit comments

Comments
 (0)