1
mirror of https://github.com/home-assistant/core synced 2024-08-06 09:34:49 +02:00

Remove last_reset attribute from keba energy sensors (#54828)

This commit is contained in:
Erik Montnemery 2021-08-18 16:45:30 +02:00 committed by GitHub
parent 6eba04c454
commit 09fbc38baa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,9 +1,12 @@
"""Support for KEBA charging station sensors.""" """Support for KEBA charging station sensors."""
from __future__ import annotations
from homeassistant.components.sensor import ( from homeassistant.components.sensor import (
DEVICE_CLASS_CURRENT, DEVICE_CLASS_CURRENT,
DEVICE_CLASS_ENERGY, DEVICE_CLASS_ENERGY,
DEVICE_CLASS_POWER, DEVICE_CLASS_POWER,
STATE_CLASS_MEASUREMENT, STATE_CLASS_MEASUREMENT,
STATE_CLASS_TOTAL_INCREASING,
SensorEntity, SensorEntity,
SensorEntityDescription, SensorEntityDescription,
) )
@ -12,7 +15,6 @@ from homeassistant.const import (
ENERGY_KILO_WATT_HOUR, ENERGY_KILO_WATT_HOUR,
POWER_KILO_WATT, POWER_KILO_WATT,
) )
from homeassistant.util import dt
from . import DOMAIN from . import DOMAIN
@ -74,8 +76,7 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
name="Total Energy", name="Total Energy",
native_unit_of_measurement=ENERGY_KILO_WATT_HOUR, native_unit_of_measurement=ENERGY_KILO_WATT_HOUR,
device_class=DEVICE_CLASS_ENERGY, device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_MEASUREMENT, state_class=STATE_CLASS_TOTAL_INCREASING,
last_reset=dt.utc_from_timestamp(0),
), ),
), ),
] ]