1
0
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:
J. Nick Koston
2025-09-02 21:24:16 -05:00
committed by GitHub
parent 83fbd77c4a
commit d2b23ba3a7
2 changed files with 4 additions and 4 deletions

View File

@@ -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.
*