1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-30 06:33:51 +00:00

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

View File

@@ -15,8 +15,8 @@ from esphome.const import (
DEVICE_CLASS_POWER,
DEVICE_CLASS_ENERGY,
ICON_CURRENT_AC,
LAST_RESET_TYPE_AUTO,
STATE_CLASS_MEASUREMENT,
STATE_CLASS_TOTAL_INCREASING,
UNIT_HERTZ,
UNIT_VOLT,
UNIT_AMPERE,
@@ -55,8 +55,7 @@ CONFIG_SCHEMA = (
unit_of_measurement=UNIT_WATT_HOURS,
accuracy_decimals=0,
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_FREQUENCY): sensor.sensor_schema(
unit_of_measurement=UNIT_HERTZ,