mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
sync tag and id, add RC30 vacation #1712
This commit is contained in:
@@ -635,7 +635,7 @@ void EMSESP::publish_device_values(uint8_t device_type) {
|
||||
bool nested = (Mqtt::is_nested());
|
||||
|
||||
// group by device type
|
||||
for (uint8_t tag = DeviceValueTAG::TAG_DEVICE_DATA; tag <= DeviceValueTAG::TAG_HS16; tag++) {
|
||||
for (int8_t tag = DeviceValueTAG::TAG_DEVICE_DATA; tag <= DeviceValueTAG::TAG_HS16; tag++) {
|
||||
JsonObject json_tag = json;
|
||||
bool nest_created = false;
|
||||
for (const auto & emsdevice : emsdevices) {
|
||||
@@ -647,7 +647,7 @@ void EMSESP::publish_device_values(uint8_t device_type) {
|
||||
need_publish |= emsdevice->generate_values(json_tag, tag, false, EMSdevice::OUTPUT_TARGET::MQTT);
|
||||
}
|
||||
}
|
||||
if (need_publish && (!nested && tag >= DeviceValueTAG::TAG_DEVICE_DATA)) {
|
||||
if (need_publish && !nested) {
|
||||
Mqtt::queue_publish(Mqtt::tag_to_topic(device_type, tag), json);
|
||||
json = doc.to<JsonObject>();
|
||||
need_publish = false;
|
||||
|
||||
Reference in New Issue
Block a user