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:
@@ -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"
|
||||
|
Reference in New Issue
Block a user