Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions homeassistant/components/keba/sensor.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
"""Support for KEBA charging station sensors."""
from __future__ import annotations

from homeassistant.components.sensor import (
DEVICE_CLASS_CURRENT,
DEVICE_CLASS_ENERGY,
DEVICE_CLASS_POWER,
STATE_CLASS_MEASUREMENT,
STATE_CLASS_TOTAL_INCREASING,
SensorEntity,
SensorEntityDescription,
)
Expand All @@ -12,7 +15,6 @@
ENERGY_KILO_WATT_HOUR,
POWER_KILO_WATT,
)
from homeassistant.util import dt

from . import DOMAIN

Expand Down Expand Up @@ -74,8 +76,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
name="Total Energy",
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_MEASUREMENT,
last_reset=dt.utc_from_timestamp(0),
state_class=STATE_CLASS_TOTAL_INCREASING,
),
),
]
Expand Down