Set state class in JuiceNet component (#57870)

This commit is contained in:
b-pass
2021-10-16 17:52:30 -04:00
committed by GitHub
parent 0dcb8ca270
commit c09c8f424f

View File

@@ -3,6 +3,7 @@ from __future__ import annotations
from homeassistant.components.sensor import (
STATE_CLASS_MEASUREMENT,
STATE_CLASS_TOTAL_INCREASING,
SensorEntity,
SensorEntityDescription,
)
@@ -66,6 +67,7 @@ SENSOR_TYPES: tuple[SensorEntityDescription, ...] = (
name="Energy added",
native_unit_of_measurement=ENERGY_WATT_HOUR,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_TOTAL_INCREASING,
),
)