mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
check tags
This commit is contained in:
@@ -911,7 +911,7 @@ bool EMSdevice::get_value_info(JsonObject & output, const char * cmd, const int8
|
|||||||
int8_t tag = id;
|
int8_t tag = id;
|
||||||
|
|
||||||
// check if we have hc or wwc or hs
|
// check if we have hc or wwc or hs
|
||||||
if (id >= 1 && id <= 34) {
|
if (id >= 1 && id <= (1 + DeviceValueTAG::TAG_HS16 - DeviceValueTAG::TAG_HC1)) {
|
||||||
tag = DeviceValueTAG::TAG_HC1 + id - 1;
|
tag = DeviceValueTAG::TAG_HC1 + id - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1100,7 +1100,7 @@ bool EMSESP::command_commands(uint8_t device_type, JsonObject & output, const in
|
|||||||
bool EMSESP::command_info(uint8_t device_type, JsonObject & output, const int8_t id, const uint8_t output_target) {
|
bool EMSESP::command_info(uint8_t device_type, JsonObject & output, const int8_t id, const uint8_t output_target) {
|
||||||
bool has_value = false;
|
bool has_value = false;
|
||||||
uint8_t tag;
|
uint8_t tag;
|
||||||
if (id >= 1 && id <= 34) {
|
if (id >= 1 && id <= (1 + DeviceValueTAG::TAG_HS16 - DeviceValueTAG::TAG_HC1)) {
|
||||||
tag = DeviceValueTAG::TAG_HC1 + id - 1; // this sets also WWC and HS
|
tag = DeviceValueTAG::TAG_HC1 + id - 1; // this sets also WWC and HS
|
||||||
} else if (id == -1 || id == 0) {
|
} else if (id == -1 || id == 0) {
|
||||||
tag = DeviceValueTAG::TAG_NONE;
|
tag = DeviceValueTAG::TAG_NONE;
|
||||||
|
|||||||
Reference in New Issue
Block a user