mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 16:29:51 +03:00
info shows shortnames, only valid hcs
This commit is contained in:
@@ -984,14 +984,16 @@ bool EMSESP::command_info(uint8_t device_type, JsonObject & json, const int8_t i
|
||||
tag = DeviceValueTAG::TAG_HC1 + id - 1;
|
||||
} else if (id >= 9 && id <= 10) {
|
||||
tag = DeviceValueTAG::TAG_WWC1 + id - 9;
|
||||
} else {
|
||||
} else if (id == -1) {
|
||||
tag = DeviceValueTAG::TAG_NONE;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (const auto & emsdevice : emsdevices) {
|
||||
if (emsdevice && (emsdevice->device_type() == device_type)
|
||||
&& ((device_type != DeviceType::THERMOSTAT) || (emsdevice->device_id() == EMSESP::actual_master_thermostat()))) {
|
||||
has_value |= emsdevice->generate_values_json(json, tag, (id < 1), (id == -1)); // nested for id -1,0 & console for id -1
|
||||
has_value |= emsdevice->generate_values_json(json, tag, (id == -1), false); // nested for id -1,0 & console for id -1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user