remove HA config for excluded entity, dev.9

This commit is contained in:
MichaelDvP
2026-09-13 08:06:16 +02:00
parent c31bc9054a
commit 65aca1b9c1
3 changed files with 9 additions and 1 deletions
+1
View File
@@ -15,6 +15,7 @@ This release is based on the latest Espressif/Arduino core version 3. It brings
- added eth_10mbit to Network Settings, which forces 10BASE-T half-duplex & autonegotiation off, halving the PHYs power draw. Its off by default as it will cause issues on managed switches with a port forced to 100Mb [#3213](https://github.com/emsesp/EMS-ESP32/pull/3213)
- cleaner MD5 and firmware uploading in WebUI [#3222](https://github.com/emsesp/EMS-ESP32/issues/3222)
- pc0Flow in l/min [#3224](https://github.com/emsesp/EMS-ESP32/issues/3224)
- remove HA config for excluded entities [#3229](https://github.com/emsesp/EMS-ESP32/issues/3229)
## Fixed
+7
View File
@@ -2173,6 +2173,13 @@ void EMSdevice::mqtt_ha_entity_config_create() {
}
}
if (dv.has_state(DeviceValueState::DV_API_MQTT_EXCLUDE) && dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED)) {
// remove HA config for excluded entities
if (Mqtt::publish_ha_sensor_config_dv(dv, name().c_str(), brand_to_cstr(), to_string_version().c_str(), true, false)) {
dv.remove_state(DeviceValueState::DV_HA_CONFIG_CREATED);
}
}
if (!dv.has_state(DeviceValueState::DV_HA_CONFIG_CREATED) && dv.has_state(DeviceValueState::DV_ACTIVE)
&& !dv.has_state(DeviceValueState::DV_API_MQTT_EXCLUDE)) {
// create_device_config is only done once for the EMS device. It can added to any entity, so we take the first
+1 -1
View File
@@ -1 +1 @@
#define EMSESP_APP_VERSION "3.9.0-dev.8"
#define EMSESP_APP_VERSION "3.9.0-dev.9"