mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2026-03-18 23:56:32 +03:00
fix device_class #2980
This commit is contained in:
@@ -1191,7 +1191,11 @@ void Mqtt::add_ha_classes(JsonObject doc, const uint8_t device_type, const uint8
|
||||
doc[ic_ha] = F_(iconpercent); // set icon
|
||||
}
|
||||
doc[sc_ha] = sc_ha_measurement;
|
||||
doc[dc_ha] = "power_factor";
|
||||
if (entity == FL_(airHumidity)[0] || entity == FL_(remotehum)[0]) {
|
||||
doc[dc_ha] = "humidity";
|
||||
} else if (entity == FL_(battery)[0]) {
|
||||
doc[dc_ha] = "battery";
|
||||
}
|
||||
break;
|
||||
case DeviceValueUOM::SECONDS:
|
||||
case DeviceValueUOM::MINUTES:
|
||||
|
||||
Reference in New Issue
Block a user