mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-08 16:59:50 +03:00
DHW tags/nests for all devices, remove ww prefix from mqtt
This commit is contained in:
@@ -102,8 +102,8 @@ void WebAPIService::parse(AsyncWebServerRequest * request, JsonObject input) {
|
||||
if (request->hasParam(F_(hc))) {
|
||||
input["hc"] = Helpers::atoint(request->getParam(F_(hc))->value().c_str());
|
||||
}
|
||||
if (request->hasParam(F_(wwc))) {
|
||||
input["wwc"] = Helpers::atoint(request->getParam(F_(wwc))->value().c_str());
|
||||
if (request->hasParam(F_(dhw))) {
|
||||
input["dhw"] = Helpers::atoint(request->getParam(F_(dhw))->value().c_str());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -236,9 +236,9 @@ void WebDataService::write_device_value(AsyncWebServerRequest * request, JsonVar
|
||||
// using the unique ID from the web find the real device type
|
||||
for (const auto & emsdevice : EMSESP::emsdevices) {
|
||||
if (emsdevice->unique_id() == unique_id) {
|
||||
// parse the command as it could have a hc or wwc prefixed, e.g. hc2/seltemp
|
||||
// parse the command as it could have a hc or dhw prefixed, e.g. hc2/seltemp
|
||||
int8_t id = -1; // default
|
||||
cmd = Command::parse_command_string(cmd, id); // extract hc or wwc
|
||||
cmd = Command::parse_command_string(cmd, id); // extract hc or dhw
|
||||
|
||||
// create JSON for output
|
||||
auto * response = new AsyncJsonResponse(false);
|
||||
@@ -278,7 +278,7 @@ void WebDataService::write_device_value(AsyncWebServerRequest * request, JsonVar
|
||||
|
||||
// special check for custom entities (which have a unique id of 99)
|
||||
if (unique_id == 99) {
|
||||
// parse the command as it could have a hc or wwc prefixed, e.g. hc2/seltemp
|
||||
// parse the command as it could have a hc or dhw prefixed, e.g. hc2/seltemp
|
||||
int8_t id = -1;
|
||||
cmd = Command::parse_command_string(cmd, id);
|
||||
auto * response = new AsyncJsonResponse(false);
|
||||
|
||||
Reference in New Issue
Block a user