mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
Customizations to names with more options
This commit is contained in:
@@ -106,6 +106,15 @@ void EMSESP::fetch_device_values_type(const uint8_t device_type) {
|
||||
}
|
||||
}
|
||||
|
||||
bool EMSESP::cmd_is_readonly(const uint8_t device_type, const char * cmd, const int8_t id) {
|
||||
for (const auto & emsdevice : emsdevices) {
|
||||
if (emsdevice && (emsdevice->device_type() == device_type)) {
|
||||
return emsdevice->is_readonly(cmd, id);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
// clears list of recognized devices
|
||||
void EMSESP::clear_all_devices() {
|
||||
// temporarily removed: clearing the list causes a crash, the associated commands and mqtt should also be removed.
|
||||
@@ -366,7 +375,7 @@ void EMSESP::show_device_values(uuid::console::Shell & shell) {
|
||||
DynamicJsonDocument doc(EMSESP_JSON_SIZE_XXLARGE_DYN); // use max size
|
||||
JsonObject json = doc.to<JsonObject>();
|
||||
|
||||
emsdevice->generate_values(json, DeviceValueTAG::TAG_NONE, true, EMSdevice::OUTPUT_TARGET::API_VERBOSE); // verbose mode and nested
|
||||
emsdevice->generate_values(json, DeviceValueTAG::TAG_NONE, true, EMSdevice::OUTPUT_TARGET::CONSOLE); // verbose mode and nested
|
||||
|
||||
// print line
|
||||
uint8_t id = 0;
|
||||
|
||||
Reference in New Issue
Block a user