ESPHome  2024.12.0
Public Member Functions | Protected Attributes
esphome::EntityBase_DeviceClass Class Reference

#include <entity_base.h>

Inheritance diagram for esphome::EntityBase_DeviceClass:
esphome::binary_sensor::BinarySensor esphome::button::Button esphome::cover::Cover esphome::event::Event esphome::number::NumberTraits esphome::sensor::Sensor esphome::switch_::Switch esphome::text_sensor::TextSensor esphome::update::UpdateEntity esphome::valve::Valve

Public Member Functions

std::string get_device_class ()
 Get the device class, using the manual override if set. More...
 
void set_device_class (const char *device_class)
 Manually set the device class. More...
 

Protected Attributes

const char * device_class_ {nullptr}
 Device class override. More...
 

Detailed Description

Definition at line 66 of file entity_base.h.

Member Function Documentation

◆ get_device_class()

std::string esphome::EntityBase_DeviceClass::get_device_class ( )

Get the device class, using the manual override if set.

Definition at line 78 of file entity_base.cpp.

◆ set_device_class()

void esphome::EntityBase_DeviceClass::set_device_class ( const char *  device_class)

Manually set the device class.

Definition at line 85 of file entity_base.cpp.

Field Documentation

◆ device_class_

const char* esphome::EntityBase_DeviceClass::device_class_ {nullptr}
protected

Device class override.

Definition at line 74 of file entity_base.h.


The documentation for this class was generated from the following files: