mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
fix publish_ha_config, and add clear
This commit is contained in:
@@ -770,8 +770,17 @@ void EMSdevice::publish_mqtt_ha_sensor() {
|
||||
dv.ha |= DeviceValueHA::HA_DONE;
|
||||
}
|
||||
}
|
||||
// bool ok = publish_ha_config();
|
||||
// ha_config_done(ok); // see if it worked
|
||||
if (!ha_config_done()) {
|
||||
bool ok = publish_ha_config();
|
||||
ha_config_done(ok); // see if it worked
|
||||
}
|
||||
}
|
||||
|
||||
void EMSdevice::ha_config_clear() {
|
||||
for (auto & dv : devicevalues_) {
|
||||
dv.ha &= ~DeviceValueHA::HA_DONE;
|
||||
}
|
||||
ha_config_done(false);
|
||||
}
|
||||
|
||||
// return the name of the telegram type
|
||||
|
||||
Reference in New Issue
Block a user