mirror of
https://github.com/esphome/esphome.git
synced 2025-10-26 20:53:50 +00:00
[sensor] Change state_class_to_string() to return const char* to avoid allocations (#10533)
This commit is contained in:
@@ -33,7 +33,7 @@ enum StateClass : uint8_t {
|
||||
STATE_CLASS_TOTAL = 3,
|
||||
};
|
||||
|
||||
std::string state_class_to_string(StateClass state_class);
|
||||
const char *state_class_to_string(StateClass state_class);
|
||||
|
||||
/** Base-class for all sensors.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user