|
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
139 static size_t getDiscoveryJson (
char* buffer,
size_t buflen,
const char* nodeName,
const char* networkName, DynamicJsonDocument* inputJSON);
150 #endif // SUPPORT_HA_DISCOVERY
152 #endif // _HA_COVER_h
DynamicJsonDocument * entityConfig
JSON object to be sent to gateway.
Defines an entity for Home Assistant autodiscovery.
void setValueField(const char *payload)
Defines a json key that defines sensor value. When setting this, setValueTemplate () should not be ca...
void setDeviceClass(haSensorClass_t devClass)
Define sensor class as haSensorClass_t https://www.home-assistant.io/integrations/sensor....
static String deviceClassStr(haSensorClass_t sensorClass)
Gets sensor class name from haSensorClass_t https://www.home-assistant.io/integrations/sensor....
size_t capacity
JSON object memory reservation length.
void setUnitOfMeasurement(const char *payload)
Set unit of measure https://www.home-assistant.io/integrations/sensor.mqtt/#unit_of_measurement.
constexpr auto ha_device_type
haDeviceType_t deviceType
HomeAssistant entity device type.
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 Sensor template.
HASensor()
Sensor constructor.
void setExpireTime(uint payload)
Defines the number of seconds after the sensor’s state expires, if it’s not updated....
void setValueTemplate(const char *payload)
Defines a template that defines sensor value. When setting this you should not call setValueField () ...