Skip to content

Commit

Permalink
removed DeviceValueUOM::TEXT
Browse files Browse the repository at this point in the history
  • Loading branch information
proddy committed Sep 21, 2021
1 parent 4d88c6a commit 54199af
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ void Mqtt::publish_ha_sensor(uint8_t type, // EMSdevice::Dev
bool set_state_class = false;

// unit of measure and map the HA icon
if ((uom != DeviceValueUOM::NONE) && (uom != DeviceValueUOM::TEXT)) {
if (uom != DeviceValueUOM::NONE) {
doc["unit_of_meas"] = EMSdevice::uom_to_string(uom);
}

Expand Down Expand Up @@ -1060,7 +1060,6 @@ void Mqtt::publish_ha_sensor(uint8_t type, // EMSdevice::Dev
doc["ic"] = F_(iconnum);
break;
case DeviceValueUOM::NONE:
case DeviceValueUOM::TEXT:
default:
break;
}
Expand Down

0 comments on commit 54199af

Please sign in to comment.