mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 09:17:46 +01:00
add STATE_CLASS_TOTAL_INCREASING to bl0940 and bl0942 (#6090)
This commit is contained in:
parent
59e7c52341
commit
b8b6462844
2 changed files with 4 additions and 0 deletions
|
@ -18,6 +18,7 @@ from esphome.const import (
|
|||
UNIT_KILOWATT_HOURS,
|
||||
UNIT_VOLT,
|
||||
UNIT_WATT,
|
||||
STATE_CLASS_TOTAL_INCREASING,
|
||||
)
|
||||
|
||||
DEPENDENCIES = ["uart"]
|
||||
|
@ -54,6 +55,7 @@ CONFIG_SCHEMA = (
|
|||
unit_of_measurement=UNIT_KILOWATT_HOURS,
|
||||
accuracy_decimals=0,
|
||||
device_class=DEVICE_CLASS_ENERGY,
|
||||
state_class=STATE_CLASS_TOTAL_INCREASING,
|
||||
),
|
||||
cv.Optional(CONF_INTERNAL_TEMPERATURE): sensor.sensor_schema(
|
||||
unit_of_measurement=UNIT_CELSIUS,
|
||||
|
|
|
@ -19,6 +19,7 @@ from esphome.const import (
|
|||
UNIT_VOLT,
|
||||
UNIT_WATT,
|
||||
UNIT_HERTZ,
|
||||
STATE_CLASS_TOTAL_INCREASING,
|
||||
)
|
||||
|
||||
DEPENDENCIES = ["uart"]
|
||||
|
@ -52,6 +53,7 @@ CONFIG_SCHEMA = (
|
|||
unit_of_measurement=UNIT_KILOWATT_HOURS,
|
||||
accuracy_decimals=0,
|
||||
device_class=DEVICE_CLASS_ENERGY,
|
||||
state_class=STATE_CLASS_TOTAL_INCREASING,
|
||||
),
|
||||
cv.Optional(CONF_FREQUENCY): sensor.sensor_schema(
|
||||
unit_of_measurement=UNIT_HERTZ,
|
||||
|
|
Loading…
Reference in a new issue