Skip to content

Commit

Permalink
fix not showing dv is UOM is NONE
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Sep 22, 2021
1 parent 8523cdf commit 80fedf3
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/emsdevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,9 +719,7 @@ bool EMSdevice::get_value_info(JsonObject & root, const char * cmd, const int8_t

// search device value with this tag
for (auto & dv : devicevalues_) {
// ignore any device values which have a uom of NONE as we use this to hide them
if ((dv.uom != DeviceValueUOM::NONE)
&& (strcmp(cmd, Helpers::toLower(uuid::read_flash_string(dv.short_name)).c_str()) == 0 && (tag <= 0 || tag == dv.tag))) {
if (dv_is_visible(dv) && (strcmp(cmd, Helpers::toLower(uuid::read_flash_string(dv.short_name)).c_str()) == 0 && (tag <= 0 || tag == dv.tag))) {
uint8_t divider = 0;
uint8_t factor = 1;
if (dv.options_size == 1) {
Expand Down

0 comments on commit 80fedf3

Please sign in to comment.