mirror of
https://github.com/Threnklyn/esphome-dev.git
synced 2026-05-31 10:08:27 +02:00
Keep Device Class in Flash. (#4639)
* Keep Device Class in Flash. * Remove blank line --------- Co-authored-by: Your Name <you@example.com>
This commit is contained in:
@@ -63,4 +63,15 @@ class EntityBase {
|
||||
EntityCategory entity_category_{ENTITY_CATEGORY_NONE};
|
||||
};
|
||||
|
||||
class EntityBase_DeviceClass {
|
||||
public:
|
||||
/// Get the device class, using the manual override if set.
|
||||
std::string get_device_class();
|
||||
/// Manually set the device class.
|
||||
void set_device_class(const char *device_class);
|
||||
|
||||
protected:
|
||||
const char *device_class_{nullptr}; ///< Device class override
|
||||
};
|
||||
|
||||
} // namespace esphome
|
||||
|
||||
Reference in New Issue
Block a user