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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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,
),
)