We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ef69323 commit cdec5d7Copy full SHA for cdec5d7
custom_components/monta/sensor.py
@@ -13,6 +13,7 @@
13
SensorDeviceClass,
14
SensorEntity,
15
SensorEntityDescription,
16
+ SensorStateClass,
17
)
18
from homeassistant.config_entries import ConfigEntry
19
from homeassistant.const import (
@@ -30,7 +31,6 @@
30
31
ATTRIBUTION,
32
DOMAIN,
33
ChargerStatus,
- WalletStatus,
34
35
from .coordinator import MontaDataUpdateCoordinator
36
from .entity import MontaEntity
@@ -152,6 +152,7 @@ def _parse_date(chargedate: str):
152
icon="mdi:wallet",
153
device_class=SensorDeviceClass.ENERGY,
154
native_unit_of_measurement=UnitOfEnergy.KILO_WATT_HOUR,
155
+ state_class=SensorStateClass.TOTAL_INCREASING,
156
value_fn=lambda data: data["lastMeterReadingKwh"],
157
extra_state_attributes_fn=None,
158
),
0 commit comments