Amend error message for RConfigSwingMode
@@ -1820,7 +1820,10 @@ int DeRestPluginPrivate::changeSensorConfig(const ApiRequest &req, ApiResponse &
else if (modeSet == "smart") { mode = 0x06; }
else
{
- rspItemState[QString("error unknown fan mode for %1").arg(sensor->modelId())] = map[pi.key()];
+ rsp.list.append(errorToMap(ERR_INVALID_VALUE, QString("/sensors/%1/config/%2").arg(id).arg(pi.key()).toHtmlEscaped(),
+ QString("invalid value, %1, for parameter %2").arg(map[pi.key()].toString()).arg(pi.key()).toHtmlEscaped()));
+ rsp.httpStatus = HttpStatusBadRequest;
+ return REQ_READY_SEND;
}
if (mode < 7)
