Set SmartThings power energy state class to Total (#144395)

This commit is contained in:
Joost Lekkerkerker 2025-05-07 13:06:53 +02:00 committed by GitHub
parent f7d8e4e7b9
commit ed1eea9b50
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 29 additions and 29 deletions

View File

@ -631,7 +631,7 @@ CAPABILITY_TO_SENSORS: dict[
SmartThingsSensorEntityDescription(
key="powerEnergy_meter",
translation_key="power_energy",
state_class=SensorStateClass.TOTAL_INCREASING,
state_class=SensorStateClass.TOTAL,
device_class=SensorDeviceClass.ENERGY,
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
value_fn=lambda value: value["powerEnergy"] / 1000,

View File

@ -1364,7 +1364,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -1402,7 +1402,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'AC Office Granit Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -1793,7 +1793,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -1831,7 +1831,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Office AirFree Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -2222,7 +2222,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -2260,7 +2260,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Aire Dormitorio Principal Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -4000,7 +4000,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -4038,7 +4038,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Refrigerator Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -4277,7 +4277,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -4315,7 +4315,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Refrigerator Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -4554,7 +4554,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -4592,7 +4592,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Frigo Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -5128,7 +5128,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -5166,7 +5166,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Eco Heating System Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -5637,7 +5637,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -5675,7 +5675,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Dishwasher Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -6104,7 +6104,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -6142,7 +6142,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'AirDresser Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -6571,7 +6571,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -6609,7 +6609,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Dryer Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -7038,7 +7038,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -7076,7 +7076,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Seca-Roupa Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -7507,7 +7507,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -7545,7 +7545,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Washer Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -7976,7 +7976,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -8014,7 +8014,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Washing Machine Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,
@ -8445,7 +8445,7 @@
}),
'area_id': None,
'capabilities': dict({
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
}),
'config_entry_id': <ANY>,
'config_subentry_id': <ANY>,
@ -8483,7 +8483,7 @@
'attributes': ReadOnlyDict({
'device_class': 'energy',
'friendly_name': 'Machine à Laver Power energy',
'state_class': <SensorStateClass.TOTAL_INCREASING: 'total_increasing'>,
'state_class': <SensorStateClass.TOTAL: 'total'>,
'unit_of_measurement': <UnitOfEnergy.KILO_WATT_HOUR: 'kWh'>,
}),
'context': <ANY>,