diff --git a/src/NukiNetwork.cpp b/src/NukiNetwork.cpp index cdff697..f564089 100644 --- a/src/NukiNetwork.cpp +++ b/src/NukiNetwork.cpp @@ -930,7 +930,7 @@ void NukiNetwork::publishHASSConfig(char* deviceType, const char* baseTopic, cha json["name"] = nullptr; json["unique_id"] = String(uidString) + "_lock"; json["cmd_t"] = String("~") + String(mqtt_topic_lock_action); - json["avty"]["t"] = availabilityTopic; + json["avty"][0]["t"] = availabilityTopic; json["pl_lock"] = lockAction; json["pl_unlk"] = unlockAction; @@ -939,7 +939,7 @@ void NukiNetwork::publishHASSConfig(char* deviceType, const char* baseTopic, cha if((int)aclPrefs[2]) json["pl_open"] = openAction; json["stat_t"] = String("~") + mqtt_topic_lock_ha_state; - json["stat_jammed"] = "jammed"; + json["stat_jam"] = "jammed"; json["stat_locked"] = "locked"; json["stat_locking"] = "locking"; json["stat_unlocked"] = "unlocked"; diff --git a/src/WebCfgServer.cpp b/src/WebCfgServer.cpp index 14caa77..6f665b1 100644 --- a/src/WebCfgServer.cpp +++ b/src/WebCfgServer.cpp @@ -3190,9 +3190,15 @@ esp_err_t WebCfgServer::buildGpioConfigHtml(PsychicRequest *request) { String pinStr = String(pin); String pinDesc = "Gpio " + pinStr; - printDropDown(&response, pinStr.c_str(), pinDesc.c_str(), "", options, "gpioselect"); - if(std::find(disabledPins.begin(), disabledPins.end(), pin) != disabledPins.end()) gpiopreselects.concat("gpio[" + pinStr + "] = '21';"); - else gpiopreselects.concat("gpio[" + pinStr + "] = '" + getPreselectionForGpio(pin) + "';"); + printDropDown(pinStr.c_str(), pinDesc.c_str(), "", options, "gpioselect"); + if(std::find(disabledPins.begin(), disabledPins.end(), pin) != disabledPins.end()) + { + gpiopreselects.concat("gpio[" + pinStr + "] = '21';"); + } + else + { + gpiopreselects.concat("gpio[" + pinStr + "] = '" + getPreselectionForGpio(pin) + "';"); + } } response.print(""); @@ -4094,11 +4100,16 @@ void WebCfgServer::printDropDown(PsychicStreamResponse *response, const char *to response->print("