Skip to content

Commit

Permalink
chore(auto_configure): set state class to total for energy device_class
Browse files Browse the repository at this point in the history
related: #479
  • Loading branch information
xZetsubou committed Jan 18, 2025
1 parent 801bd9e commit 5880939
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion custom_components/localtuya/core/ha_entities/sensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -788,7 +788,7 @@ def localtuya_sensor(unit_of_measurement=None, scale_factor: float = 1) -> dict:
id=DPCode.CHARGE_ELECTRIC_QUANTITY,
name="Charge Electric Quantity",
device_class=SensorDeviceClass.ENERGY,
state_class=SensorStateClass.MEASUREMENT,
state_class=SensorStateClass.TOTAL,
custom_configs=localtuya_sensor(UnitOfEnergy.KILO_WATT_HOUR, 0.01),
),
LocalTuyaEntity(
Expand Down

0 comments on commit 5880939

Please sign in to comment.