1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-28 05:33:53 +00:00

Add new total_increasing state-class for Home Assistant 2021.9+ (#2166)

This commit is contained in:
Jesse Hills
2021-08-18 11:04:13 +12:00
committed by GitHub
parent fbd9e87b51
commit f0b14055b6
7 changed files with 13 additions and 0 deletions

View File

@@ -448,6 +448,7 @@ message LightCommandRequest {
enum SensorStateClass {
STATE_CLASS_NONE = 0;
STATE_CLASS_MEASUREMENT = 1;
STATE_CLASS_TOTAL_INCREASING = 2;
}
enum SensorLastResetType {

View File

@@ -94,6 +94,8 @@ template<> const char *proto_enum_to_string<enums::SensorStateClass>(enums::Sens
return "STATE_CLASS_NONE";
case enums::STATE_CLASS_MEASUREMENT:
return "STATE_CLASS_MEASUREMENT";
case enums::STATE_CLASS_TOTAL_INCREASING:
return "STATE_CLASS_TOTAL_INCREASING";
default:
return "UNKNOWN";
}

View File

@@ -47,6 +47,7 @@ enum ColorMode : uint32_t {
enum SensorStateClass : uint32_t {
STATE_CLASS_NONE = 0,
STATE_CLASS_MEASUREMENT = 1,
STATE_CLASS_TOTAL_INCREASING = 2,
};
enum SensorLastResetType : uint32_t {
LAST_RESET_NONE = 0,