#include <haEntity.h>
Definition at line 132 of file haEntity.h.
◆ HAEntity()
Default constructor. Needed for inheritance.
Definition at line 143 of file haEntity.h.
◆ allowSendAttributes()
void HAEntity::allowSendAttributes |
( |
| ) |
|
|
inline |
Enables registering entity attributes as a json object.
Definition at line 209 of file haEntity.h.
◆ deviceTypeStr()
◆ getAnounceMessage()
size_t HAEntity::getAnounceMessage |
( |
int |
bufferlen, |
|
|
uint8_t * |
buffer |
|
) |
| |
|
inline |
Gets entity anounce message to be sent over EnigmaIOT message.
- Parameters
-
bufferlen | Buffer length. Needed legth can be got using measureMessage () |
buffer | Buffer to put the payload in |
- Returns
- Amount of data written to buffer
Definition at line 153 of file haEntity.h.
◆ getDiscoveryTopic()
static String HAEntity::getDiscoveryTopic |
( |
const char * |
hassPrefix, |
|
|
const char * |
nodeName, |
|
|
haDeviceType_t |
entityType, |
|
|
const char * |
nameSuffix = NULL |
|
) |
| |
|
inlinestatic |
Allows Gateway to get discovery message MQTT topic.
- Parameters
-
hassPrefix | HomeAssistant topic prefix. Usually it is "homeassistant" |
nodeName | Name of the node |
entityType | Entity type. Used to differentiate discovery message template |
nameSuffix | This is used to allow a single node to have different HomeAssistant entities. For instance, a smart switch may behave as a power, voltage and current sensor too. |
- Returns
- MQTT topic
Definition at line 277 of file haEntity.h.
◆ measureMessage()
size_t HAEntity::measureMessage |
( |
| ) |
|
|
inline |
Gets needed buffer size for discovery message.
- Returns
- Minimum buffer size
Definition at line 217 of file haEntity.h.
◆ setNameSufix()
void HAEntity::setNameSufix |
( |
const char * |
payload | ) |
|
|
inline |
Sets name suffix. Used for multi entity nodes.
- Parameters
-
Definition at line 200 of file haEntity.h.
◆ capacity
size_t HAEntity::capacity |
|
protected |
JSON object memory reservation length.
Definition at line 134 of file haEntity.h.
◆ deviceType
HomeAssistant entity device type.
Definition at line 135 of file haEntity.h.
◆ entityConfig
DynamicJsonDocument* HAEntity::entityConfig |
|
protected |
JSON object to be sent to gateway.
Definition at line 138 of file haEntity.h.
The documentation for this class was generated from the following file: