mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-09-14 14:14:09 +00:00
fix lint warnings from SonarQube
This commit is contained in:
@@ -195,7 +195,7 @@ StateUpdateResult WebCommands::update(JsonObject root, WebCommands & webCommands
|
||||
Command::add(
|
||||
EMSdevice::DeviceType::COMMAND,
|
||||
webCommands.commandItems.back().name,
|
||||
[name = std::string(webCommands.commandItems.back().name)](const char * value, const int8_t id, JsonObject output) {
|
||||
[name = std::string(webCommands.commandItems.back().name)](const char * value, const int8_t, JsonObject) {
|
||||
return EMSESP::webCommandService.dispatchCommand(name.c_str(), value); // value is optional
|
||||
},
|
||||
FL_(command_cmd),
|
||||
@@ -448,7 +448,7 @@ void WebCommandService::load_test_data() {
|
||||
Command::add(
|
||||
EMSdevice::DeviceType::COMMAND,
|
||||
item.name,
|
||||
[name = std::string(item.name)](const char * value, const int8_t id, JsonObject output) {
|
||||
[name = std::string(item.name)](const char * value, const int8_t, JsonObject) {
|
||||
return EMSESP::webCommandService.dispatchCommand(name.c_str(), value);
|
||||
},
|
||||
FL_(command_cmd),
|
||||
|
||||
@@ -147,7 +147,7 @@ StateUpdateResult WebCustomEntity::update(JsonObject root, WebCustomEntity & web
|
||||
Command::add(
|
||||
EMSdevice::DeviceType::CUSTOM,
|
||||
webCustomEntity.customEntityItems.back().name,
|
||||
[name = std::string(webCustomEntity.customEntityItems.back().name)](const char * value, const int8_t id, JsonObject output) {
|
||||
[name = std::string(webCustomEntity.customEntityItems.back().name)](const char * value, const int8_t id, JsonObject) {
|
||||
return EMSESP::webCustomEntityService.command_setvalue(value, id, name.c_str());
|
||||
},
|
||||
FL_(entity_cmd),
|
||||
@@ -798,7 +798,7 @@ void WebCustomEntityService::load_test_data() {
|
||||
Command::add(
|
||||
EMSdevice::DeviceType::CUSTOM,
|
||||
webCustomEntity.customEntityItems.back().name,
|
||||
[name = std::string(webCustomEntity.customEntityItems.back().name)](const char * value, const int8_t id, JsonObject output) {
|
||||
[name = std::string(webCustomEntity.customEntityItems.back().name)](const char * value, const int8_t id, JsonObject) {
|
||||
return EMSESP::webCustomEntityService.command_setvalue(value, id, name.c_str());
|
||||
},
|
||||
FL_(entity_cmd),
|
||||
@@ -834,7 +834,7 @@ void WebCustomEntityService::load_test_data() {
|
||||
Command::add(
|
||||
EMSdevice::DeviceType::CUSTOM,
|
||||
webCustomEntity.customEntityItems.back().name,
|
||||
[name = std::string(webCustomEntity.customEntityItems.back().name)](const char * value, const int8_t id, JsonObject output) {
|
||||
[name = std::string(webCustomEntity.customEntityItems.back().name)](const char * value, const int8_t id, JsonObject) {
|
||||
return EMSESP::webCustomEntityService.command_setvalue(value, id, name.c_str());
|
||||
},
|
||||
FL_(entity_cmd),
|
||||
@@ -857,7 +857,7 @@ void WebCustomEntityService::load_test_data() {
|
||||
Command::add(
|
||||
EMSdevice::DeviceType::CUSTOM,
|
||||
webCustomEntity.customEntityItems.back().name,
|
||||
[name = std::string(webCustomEntity.customEntityItems.back().name)](const char * value, const int8_t id, JsonObject output) {
|
||||
[name = std::string(webCustomEntity.customEntityItems.back().name)](const char * value, const int8_t id, JsonObject) {
|
||||
return EMSESP::webCustomEntityService.command_setvalue(value, id, name.c_str());
|
||||
},
|
||||
FL_(entity_cmd),
|
||||
|
||||
@@ -98,7 +98,7 @@ StateUpdateResult WebScheduler::update(JsonObject root, WebScheduler & webSchedu
|
||||
Command::add(
|
||||
EMSdevice::DeviceType::SCHEDULER,
|
||||
webScheduler.scheduleItems.back().name,
|
||||
[name = std::string(webScheduler.scheduleItems.back().name)](const char * value, const int8_t id, JsonObject output) {
|
||||
[name = std::string(webScheduler.scheduleItems.back().name)](const char * value, const int8_t id, JsonObject) {
|
||||
return EMSESP::webSchedulerService.command_setvalue(value, id, name.c_str());
|
||||
},
|
||||
FL_(schedule_cmd),
|
||||
@@ -464,7 +464,7 @@ void WebSchedulerService::load_test_data() {
|
||||
Command::add(
|
||||
EMSdevice::DeviceType::SCHEDULER,
|
||||
item.name,
|
||||
[name = std::string(item.name)](const char * value, const int8_t id, JsonObject output) {
|
||||
[name = std::string(item.name)](const char * value, const int8_t id, JsonObject) {
|
||||
return EMSESP::webSchedulerService.command_setvalue(value, id, name.c_str());
|
||||
},
|
||||
FL_(schedule_cmd),
|
||||
|
||||
Reference in New Issue
Block a user