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
+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"