3 Commits

Author SHA1 Message Date
bc12b2ca4b Version 2.0.1
Updated supported sensors.
2024-06-23 10:43:40 +03:00
ec60c4d559 Removed unused data 2024-06-09 12:46:09 +03:00
caba4a0284 Updated some comments 2024-06-07 08:52:34 +03:00
2 changed files with 23 additions and 20 deletions

View File

@ -392,12 +392,17 @@ typedef enum // Enumeration of led types supported by gateway.
#define HA_SENSOR_TYPE \
DF(HAST_NONE, "") \
DF(HAST_DS18B20, "DS18B20") \
DF(HAST_DHT11, "DHT11") \
DF(HAST_DHT22, "DHT22") \
DF(HAST_DHT11, "DHT11") /* Deprecated. Will be removed soon. */ \
DF(HAST_DHT22, "DHT22") /* Deprecated. Will be removed soon. */ \
DF(HAST_GATEWAY, "") \
DF(HAST_WINDOW, "") \
DF(HAST_DOOR, "") \
DF(HAST_LEAKAGE, "") \
DF(HAST_DHT, "DHT") /* DHT11/DHT22/AM2302/AM2320 */ \
DF(HAST_BH1750, "BH1750") \
DF(HAST_BMP280, "BMP280") /* BMP180/BMP280 */ \
DF(HAST_BME280, "BME280") \
DF(HAST_BME680, "BME680") \
DF(HAST_MAX, "")
typedef enum // Enumeration of sensor / binary sensor supported by gateway.
@ -450,10 +455,10 @@ typedef struct // Structure for data exchange between ESP-NOW devices.
ha_binary_sensor_device_class_t binary_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_t payload_on; // The payload that represents ON state.
ha_on_off_type_t payload_off; // The payload that represents OFF state.
uint16_t expire_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_t off_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.
uint16_t expire_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_t off_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.
bool enabled_by_default; // Flag which defines if the entity should be enabled when first added.
bool force_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).
bool force_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_t qos; // The maximum QoS level to be used when receiving and publishing messages.
bool retain; // If the published message should have the retain flag on or not.
} binary_sensor_config_message;
@ -462,10 +467,10 @@ typedef struct // Structure for data exchange between ESP-NOW devices.
uint8_t unique_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_t sensor_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.
char unit_of_measurement[5]; // Defines the units of measurement of the sensor, if any.
uint8_t suggested_display_precision; // The number of decimals which should be used in the sensors state after rounding.
uint16_t expire_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.
uint8_t suggested_display_precision; // The number of decimals which should be used in the sensors state after rounding.
uint16_t expire_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.
bool enabled_by_default; // Flag which defines if the entity should be enabled when first added.
bool force_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).
bool force_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_t qos; // The maximum QoS level to be used when receiving and publishing messages.
bool retain; // If the published message should have the retain flag on or not.
} sensor_config_message;
@ -571,10 +576,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.
{
zh_device_type_t device_type; // ESP-NOW device type.
char app_name[32]; // Firmware application name.
char app_version[32]; // Firmware application version.
uint8_t mac_addr[6]; // ESP-NOW node MAC address.
} espnow_ota_data;
struct // Tertiary structure for transfer from ESP-NOW gateway to ESP-NOW node OTA update data.
{

View File

@ -1 +1 @@
2.0.0
2.0.1