mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 00:09:51 +03:00
fix info/values command with circuit api/device/circuit/values
This commit is contained in:
@@ -318,15 +318,17 @@ uint8_t Command::call(const uint8_t device_type, const char * cmd, const char *
|
|||||||
|
|
||||||
// determine flags based on id (which is the tag)
|
// determine flags based on id (which is the tag)
|
||||||
uint8_t flag = CommandFlag::CMD_FLAG_DEFAULT;
|
uint8_t flag = CommandFlag::CMD_FLAG_DEFAULT;
|
||||||
int8_t tag = id;
|
// info and values works with all tags, keep it default
|
||||||
if (tag >= DeviceValueTAG::TAG_HC1 && tag <= DeviceValueTAG::TAG_HC8) {
|
if (std::string(cmd) != F_(values) && std::string(cmd) != F_(info)) {
|
||||||
flag = CommandFlag::CMD_FLAG_HC;
|
if (id >= DeviceValueTAG::TAG_HC1 && id <= DeviceValueTAG::TAG_HC8) {
|
||||||
} else if (tag >= DeviceValueTAG::TAG_DHW1 && tag <= DeviceValueTAG::TAG_DHW10) {
|
flag = CommandFlag::CMD_FLAG_HC;
|
||||||
flag = CommandFlag::CMD_FLAG_DHW;
|
} else if (id >= DeviceValueTAG::TAG_DHW1 && id <= DeviceValueTAG::TAG_DHW10) {
|
||||||
} else if (tag >= DeviceValueTAG::TAG_HS1 && tag <= DeviceValueTAG::TAG_HS16) {
|
flag = CommandFlag::CMD_FLAG_DHW;
|
||||||
flag = CommandFlag::CMD_FLAG_HS;
|
} else if (id >= DeviceValueTAG::TAG_HS1 && id <= DeviceValueTAG::TAG_HS16) {
|
||||||
} else if (tag >= DeviceValueTAG::TAG_AHS1 && tag <= DeviceValueTAG::TAG_AHS1) {
|
flag = CommandFlag::CMD_FLAG_HS;
|
||||||
flag = CommandFlag::CMD_FLAG_AHS;
|
} else if (id >= DeviceValueTAG::TAG_AHS1 && id <= DeviceValueTAG::TAG_AHS1) {
|
||||||
|
flag = CommandFlag::CMD_FLAG_AHS;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// first see if there is a command registered and it's valid
|
// first see if there is a command registered and it's valid
|
||||||
|
|||||||
Reference in New Issue
Block a user