mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 20:57:21 +00:00
We shouldn't add measurement without last_reset to metered entities (#54087)
This commit is contained in:
parent
26cb588ee2
commit
fcc3d24904
@ -9,7 +9,6 @@ from homeassistant.components.rest.data import RestData
|
|||||||
from homeassistant.components.sensor import (
|
from homeassistant.components.sensor import (
|
||||||
DEVICE_CLASS_ENERGY,
|
DEVICE_CLASS_ENERGY,
|
||||||
PLATFORM_SCHEMA,
|
PLATFORM_SCHEMA,
|
||||||
STATE_CLASS_MEASUREMENT,
|
|
||||||
SensorEntity,
|
SensorEntity,
|
||||||
)
|
)
|
||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
@ -72,7 +71,6 @@ async def async_setup_platform(hass, config, async_add_entities, discovery_info=
|
|||||||
class PvoutputSensor(SensorEntity):
|
class PvoutputSensor(SensorEntity):
|
||||||
"""Representation of a PVOutput sensor."""
|
"""Representation of a PVOutput sensor."""
|
||||||
|
|
||||||
_attr_state_class = STATE_CLASS_MEASUREMENT
|
|
||||||
_attr_device_class = DEVICE_CLASS_ENERGY
|
_attr_device_class = DEVICE_CLASS_ENERGY
|
||||||
_attr_unit_of_measurement = ENERGY_WATT_HOUR
|
_attr_unit_of_measurement = ENERGY_WATT_HOUR
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user