Version 1.1

Fixed one minor bug.
This commit is contained in:
Alexey Zholtikov 2023-01-06 13:00:46 +03:00
parent 4bb27bf816
commit 5d9784c9ae

View File

@ -21,7 +21,7 @@ void sendKeepAliveMessage(void);
void sendConfigMessage(void); void sendConfigMessage(void);
void sendStatusMessage(void); void sendStatusMessage(void);
const String firmware{"1.0"}; const String firmware{"1.1"};
String espnowNetName{"DEFAULT"}; String espnowNetName{"DEFAULT"};
@ -353,8 +353,8 @@ void sendConfigMessage()
StaticJsonDocument<sizeof(esp_now_payload_data_t::message)> json; StaticJsonDocument<sizeof(esp_now_payload_data_t::message)> json;
json["name"] = deviceName; json["name"] = deviceName;
json["unit"] = 1; json["unit"] = 1;
json["type"] = getValueName(HACT_SWITCH); json["type"] = HACT_SWITCH;
json["class"] = getValueName(HASWDC_SWITCH); json["class"] = HASWDC_SWITCH;
json["reverse"] = "false"; json["reverse"] = "false";
char buffer[sizeof(esp_now_payload_data_t::message)]{0}; char buffer[sizeof(esp_now_payload_data_t::message)]{0};
serializeJsonPretty(json, buffer); serializeJsonPretty(json, buffer);