Remove last_reset_type and convert all those sensors to TOTAL_INCREASING (#2233)

This commit is contained in:
Jesse Hills
2021-09-06 08:30:47 +12:00
committed by GitHub
parent f9b0666adf
commit ff6bed54c6
22 changed files with 60 additions and 191 deletions
+2 -3
View File
@@ -18,8 +18,8 @@ from esphome.const import (
DEVICE_CLASS_ENERGY,
DEVICE_CLASS_POWER,
DEVICE_CLASS_VOLTAGE,
LAST_RESET_TYPE_AUTO,
STATE_CLASS_MEASUREMENT,
STATE_CLASS_TOTAL_INCREASING,
UNIT_VOLT,
UNIT_AMPERE,
UNIT_WATT,
@@ -78,8 +78,7 @@ CONFIG_SCHEMA = cv.Schema(
unit_of_measurement=UNIT_WATT_HOURS,
accuracy_decimals=1,
device_class=DEVICE_CLASS_ENERGY,
state_class=STATE_CLASS_MEASUREMENT,
last_reset_type=LAST_RESET_TYPE_AUTO,
state_class=STATE_CLASS_TOTAL_INCREASING,
),
cv.Optional(CONF_CURRENT_RESISTOR, default=0.001): cv.resistance,
cv.Optional(CONF_VOLTAGE_DIVIDER, default=2351): cv.positive_float,