|
ESPHome 2025.12.0-dev
|
#include <entity_base.h>
Public Member Functions | |
| ESPDEPRECATED("Use get_device_class_ref() instead for better performance (avoids string copy). Will be removed in " "ESPHome 2026.5.0", "2025.11.0") std void | set_device_class (const char *device_class) |
| Get the device class, using the manual override if set. | |
| StringRef | get_device_class_ref () const |
| Get the device class as StringRef. | |
Protected Attributes | |
| const char * | device_class_ {nullptr} |
| Device class override. | |
Definition at line 158 of file entity_base.h.
|
inline |
Get the device class as StringRef.
Definition at line 168 of file entity_base.h.
| void esphome::EntityBase_DeviceClass::set_device_class | ( | const char * | device_class | ) |
Get the device class, using the manual override if set.
Manually set the device class.
Definition at line 92 of file entity_base.cpp.
|
protected |
Device class override.
Definition at line 174 of file entity_base.h.