Rebase and squash, add ALERT to CHT831X (#1259)

This commit is contained in:
NonPIayerCharacter
2024-07-28 14:24:24 +03:00
committed by GitHub
parent de84034584
commit 8a7a68cb09
11 changed files with 261 additions and 112 deletions

View File

@ -273,8 +273,8 @@ static int http_tasmota_json_SENSOR(void* request, jsonCb_t printer) {
// close ENERGY block
printer(request, "},");
}
if (DRV_IsRunning("CHT8305")) {
g_pin_1 = PIN_FindPinIndexForRole(IOR_CHT8305_DAT, g_pin_1);
if (DRV_IsRunning("CHT83XX")) {
g_pin_1 = PIN_FindPinIndexForRole(IOR_CHT83XX_DAT, g_pin_1);
channel_1 = g_cfg.pins.channels[g_pin_1];
channel_2 = g_cfg.pins.channels2[g_pin_1];
@ -282,7 +282,7 @@ static int http_tasmota_json_SENSOR(void* request, jsonCb_t printer) {
chan_val2 = CHANNEL_GetFloat(channel_2);
// writer header
printer(request, "\"CHT8305\":");
printer(request, "\"CHT83XX\":");
// following check will clear NaN values
printer(request, "{");
printer(request, "\"Temperature\": %.1f,", chan_val1);

View File

@ -441,8 +441,8 @@ const char* htmlPinRoleNames[] = {
"DHT12",
"DHT21",
"DHT22",
"CHT8305_SDA",
"CHT8305_SCK",
"CHT83XX_SDA",
"CHT83XX_SCK",
"SHT3X_SDA",
"SHT3X_SCK",
"SoftSDA",