typedefenum// Enumeration of sensor / binary sensor supported by gateway.
@ -450,10 +466,10 @@ typedef struct // Structure for data exchange between ESP-NOW devices.
ha_binary_sensor_device_class_tbinary_sensor_device_class;// Binary sensor type supported by the Home Assistant. @note Used to prepare a correct configuration message for Home Assistant MQTT discovery. For details see https://www.home-assistant.io/integrations/binary_sensor.
ha_on_off_type_tpayload_on;// The payload that represents ON state.
ha_on_off_type_tpayload_off;// The payload that represents OFF state.
uint16_texpire_after;// If set, it defines the number of seconds after the sensor’s state expires, if it’s not updated. After expiry, the sensor’s state becomes unavailable.
uint16_toff_delay;// For sensors that only send on state updates (like PIRs), this variable sets a delay in seconds after which the sensor’s state will be updated back to off.
uint16_texpire_after;// If set, it defines the number of seconds after the sensors state expires, if its not updated. After expiry, the sensors state becomes unavailable.
uint16_toff_delay;// For sensors that only send on state updates (like PIRs), this variable sets a delay in seconds after which the sensors state will be updated back to off.
boolenabled_by_default;// Flag which defines if the entity should be enabled when first added.
boolforce_update;// Sends update events (which results in update of state object’s last_changed) even if the sensor’s state hasn’t changed. Useful if you want to have meaningful value graphs in history or want to create an automation that triggers on every incoming state message (not only when the sensor’s new state is different to the current one).
boolforce_update;// Sends update events (which results in update of state objects last_changed) even if the sensors state hasnt changed. Useful if you want to have meaningful value graphs in history or want to create an automation that triggers on every incoming state message (not only when the sensors new state is different to the current one).
uint8_tqos;// The maximum QoS level to be used when receiving and publishing messages.
boolretain;// If the published message should have the retain flag on or not.
}binary_sensor_config_message;
@ -462,10 +478,10 @@ typedef struct // Structure for data exchange between ESP-NOW devices.
uint8_tunique_id;// An ID that uniquely identifies this sensor device. @note The ID will look like this - "MAC-X" (for example 64-B7-08-31-00-A8-1). @attention If two sensors have the same unique ID, Home Assistant will raise an exception.
ha_sensor_device_class_tsensor_device_class;// Sensor type supported by the Home Assistant. @note Used to prepare a correct configuration message for Home Assistant MQTT discovery. For details see https://www.home-assistant.io/integrations/sensor.
charunit_of_measurement[5];// Defines the units of measurement of the sensor, if any.
uint8_tsuggested_display_precision;// The number of decimals which should be used in the sensor’s state after rounding.
uint16_texpire_after;// If set, it defines the number of seconds after the sensor’s state expires, if it’s not updated. After expiry, the sensor’s state becomes unavailable.
uint8_tsuggested_display_precision;// The number of decimals which should be used in the sensors state after rounding.
uint16_texpire_after;// If set, it defines the number of seconds after the sensors state expires, if its not updated. After expiry, the sensors state becomes unavailable.
boolenabled_by_default;// Flag which defines if the entity should be enabled when first added.
boolforce_update;// Sends update events (which results in update of state object’s last_changed) even if the sensor’s state hasn’t changed. Useful if you want to have meaningful value graphs in history or want to create an automation that triggers on every incoming state message (not only when the sensor’s new state is different to the current one).
boolforce_update;// Sends update events (which results in update of state objects last_changed) even if the sensors state hasnt changed. Useful if you want to have meaningful value graphs in history or want to create an automation that triggers on every incoming state message (not only when the sensors new state is different to the current one).
uint8_tqos;// The maximum QoS level to be used when receiving and publishing messages.
boolretain;// If the published message should have the retain flag on or not.
}sensor_config_message;
@ -491,7 +507,7 @@ typedef struct // Structure for data exchange between ESP-NOW devices.
}led_config_message;
struct// Tertiary structure of zh_espnow_led node hardware configuration message. @note Used for change hardware configuration / publish at MQTT zh_espnow_led node hardware configuration message.
{
ha_led_type_tled_type;// Led types. @note Used in zh_espnow_led firmware only.
ha_led_type_tled_type;// Led type.
uint8_tfirst_white_pin;// First white GPIO number.
uint8_tsecond_white_pin;// Second white GPIO number (if present).
uint8_tred_pin;// Red GPIO number (if present).
@ -537,20 +553,40 @@ typedef struct // Structure for data exchange between ESP-NOW devices.
ha_on_off_type_treserved_3;// Reserved for future development.
ha_on_off_type_treserved_4;// Reserved for future development.
ha_on_off_type_treserved_5;// Reserved for future development.
ha_on_off_type_treserved_6;// Reserved for future development.
ha_on_off_type_treserved_7;// Reserved for future development.
ha_on_off_type_treserved_8;// Reserved for future development.
ha_on_off_type_treserved_9;// Reserved for future development.
ha_on_off_type_treserved_10;// Reserved for future development.
ha_on_off_type_treserved_11;// Reserved for future development.
ha_on_off_type_treserved_12;// Reserved for future development.
ha_on_off_type_treserved_13;// Reserved for future development.
ha_on_off_type_treserved_14;// Reserved for future development.
ha_on_off_type_treserved_15;// Reserved for future development.
}binary_sensor_status_message;
struct// Tertiary structure of zh_espnow_sensor node status message.
{
ha_sensor_type_tsensor_type;// Sensor types. @note Used to identify the sensor type by ESP-NOW gateway and send the appropriate sensor status messages to MQTT.
floattemperature;// Temperature value (if present).
floathumidity;// Humidity value (if present).
floatpressure;// Pressure value (if present).
floatquality;// Quality value (if present).
floatatmospheric_pressure;// Atmospheric pressure value (if present).
floataqi;// Air quality index (if present).
floatvoltage;// Voltage value (if present).
floatreserved_1;// Reserved for future development.
floatreserved_2;// Reserved for future development.
floatilluminance;// Light level (if present).
floatuv_index;// UV index (if present).
floatreserved_3;// Reserved for future development.
floatreserved_4;// Reserved for future development.
floatreserved_5;// Reserved for future development.
floatreserved_6;// Reserved for future development.
floatreserved_7;// Reserved for future development.
floatreserved_8;// Reserved for future development.
floatreserved_9;// Reserved for future development.
floatreserved_10;// Reserved for future development.
floatreserved_11;// Reserved for future development.
floatreserved_12;// Reserved for future development.
floatreserved_13;// Reserved for future development.
floatreserved_14;// Reserved for future development.
floatreserved_15;// Reserved for future development.
}sensor_status_message;
struct// Tertiary structure of zh_espnow_led node status message.
{
@ -571,10 +607,8 @@ typedef struct // Structure for data exchange between ESP-NOW devices.
{
struct// Tertiary structure for transfer from ESP-NOW node to ESP-NOW gateway system information for OTA update initialization.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.