|
EnigmaIOT
0.9.8
Secure sensor and gateway platform based on ESP8266 and ESP32
|
Go to the documentation of this file.
14 #if SUPPORT_HA_DISCOVERY
101 capacity = JSON_OBJECT_SIZE (10) + 250;
179 static size_t getDiscoveryJson (
char* buffer,
size_t buflen,
const char* nodeName,
const char* networkName, DynamicJsonDocument* inputJSON);
183 #endif // SUPPORT_HA_DISCOVERY
DynamicJsonDocument * entityConfig
JSON object to be sent to gateway.
Defines an entity for Home Assistant autodiscovery.
size_t capacity
JSON object memory reservation length.
void setStateOn(const char *payload)
The payload that represents the on state. Used when value that represents on state in the state_topic...
void setStateOff(const char *payload)
The payload that represents the off state. Used when value that represents off state in the state_top...
void setPayloadOff(const char *payload)
The payload that represents off state. If specified, will be used for both comparing to the value in ...
static size_t getDiscoveryJson(char *buffer, size_t buflen, const char *nodeName, const char *networkName, DynamicJsonDocument *inputJSON)
Allows Gateway to get Home Assistant discovery message using Switch template.
HASwitch()
Switch constructor.
constexpr auto ha_device_type
haDeviceType_t deviceType
HomeAssistant entity device type.
void setPayloadOn(const char *payload)
The payload that represents on state. If specified, will be used for both comparing to the value in t...
void setValueField(const char *payload)
Defines a json key to extract device’s state from the state_topic. To determine the switches’s state ...