We shouldn't add measurement without last_reset to metered entities (#54087)

This commit is contained in:
Paulus Schoutsen 2021-08-05 13:10:42 -07:00 committed by GitHub
parent 26cb588ee2
commit fcc3d24904
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,6 @@ from homeassistant.components.rest.data import RestData
from homeassistant.components.sensor import (
DEVICE_CLASS_ENERGY,
PLATFORM_SCHEMA,
STATE_CLASS_MEASUREMENT,
SensorEntity,
)
from homeassistant.const import (
@ -72,7 +71,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
class PvoutputSensor(SensorEntity):
"""Representation of a PVOutput sensor."""
_attr_state_class = STATE_CLASS_MEASUREMENT
_attr_device_class = DEVICE_CLASS_ENERGY
_attr_unit_of_measurement = ENERGY_WATT_HOUR