1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-04 04:12:23 +01:00

Adding last_reset_type to sensors that should support it. (#2039)

This commit is contained in:
Jesse Hills
2021-07-21 09:20:20 +12:00
committed by GitHub
parent fc0deb642a
commit 3b3297d269
14 changed files with 153 additions and 15 deletions

View File

@@ -297,6 +297,7 @@ CONF_KEY = "key"
CONF_LAMBDA = "lambda"
CONF_LAST_CONFIDENCE = "last_confidence"
CONF_LAST_FINGER_ID = "last_finger_id"
CONF_LAST_RESET_TYPE = "last_reset_type"
CONF_LATITUDE = "latitude"
CONF_LENGTH = "length"
CONF_LEVEL = "level"
@@ -785,3 +786,10 @@ STATE_CLASS_NONE = ""
# The state represents a measurement in present time
STATE_CLASS_MEASUREMENT = "measurement"
# This sensor does not support resetting. ie, it is not accumulative
LAST_RESET_TYPE_NONE = ""
# This sensor is expected to never reset its value
LAST_RESET_TYPE_NEVER = "never"
# This sensor may reset and Home Assistant will watch for this
LAST_RESET_TYPE_AUTO = "auto"