Change name of entity within WebUI #612

This commit is contained in:
Proddy
2022-09-09 17:04:31 +02:00
parent 9ae81779ff
commit 5845c37672
18 changed files with 100 additions and 72 deletions

View File

@@ -1052,25 +1052,25 @@ bool EMSESP::add_device(const uint8_t device_id, const uint8_t product_id, const
[device_type](const char * value, const int8_t id, JsonObject & output) {
return command_info(device_type, output, id, EMSdevice::OUTPUT_TARGET::API_VERBOSE);
},
F_(info_cmd));
uuid::read_flash_string(F_(info_cmd)));
Command::add(
device_type,
F("values"),
[device_type](const char * value, const int8_t id, JsonObject & output) {
return command_info(device_type, output, id, EMSdevice::OUTPUT_TARGET::API_SHORTNAMES); // HIDDEN command showing short names, used in e.g. /api/boiler
},
nullptr,
"",
CommandFlag::HIDDEN); // this command is hidden
Command::add(
device_type,
F_(commands),
[device_type](const char * value, const int8_t id, JsonObject & output) { return command_commands(device_type, output, id); },
F_(commands_cmd));
uuid::read_flash_string(F_(commands_cmd)));
Command::add(
device_type,
F_(entities),
[device_type](const char * value, const int8_t id, JsonObject & output) { return command_entities(device_type, output, id); },
F_(entities_cmd));
uuid::read_flash_string(F_(entities_cmd)));
// MQTT subscribe to the device e.g. "ems-esp/boiler/#"
Mqtt::subscribe(device_type, EMSdevice::device_type_2_device_name(device_type) + "/#", nullptr);