Skip to content

Commit

Permalink
Version 1.43
Browse files Browse the repository at this point in the history
Minor changes.
  • Loading branch information
aZholtikov committed Feb 19, 2023
1 parent 69cb07f commit 894eed5
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ typedef enum : uint8_t
ESP_NOW_LAN
} work_mode_t;

const String firmware{"1.42"};
const String firmware{"1.43"};

String espnowNetName{"DEFAULT"};

Expand Down Expand Up @@ -304,7 +304,11 @@ void onEspnowMessage(const char *data, const uint8_t *sender)
jsonConfig["force_update"] = "true";
jsonConfig["retain"] = "true";
if (type == HACT_SENSOR)
{
jsonConfig["device_class"] = getValueName(json["class"].as<ha_sensor_device_class_t>());
jsonConfig["unit_of_measurement"] = json["meas"];
jsonConfig["expire_after"] = json["time"];
}
if (type == HACT_BINARY_SENSOR)
{
ha_binary_sensor_device_class_t deviceClass = json["class"].as<ha_binary_sensor_device_class_t>();
Expand Down

0 comments on commit 894eed5

Please sign in to comment.