From 5f3212afc455541e65adc8b6249516df733e102e Mon Sep 17 00:00:00 2001 From: MichaelDvP Date: Sun, 5 Mar 2023 18:17:57 +0100 Subject: [PATCH] fix domoticz setting (was ignored) --- src/mqtt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mqtt.cpp b/src/mqtt.cpp index 446ec9f24..c84c99fc1 100644 --- a/src/mqtt.cpp +++ b/src/mqtt.cpp @@ -424,6 +424,7 @@ void Mqtt::load_settings() { send_response_ = mqttSettings.send_response; discovery_prefix_ = mqttSettings.discovery_prefix.c_str(); entity_format_ = mqttSettings.entity_format; + discovery_type_ = mqttSettings.discovery_type; // convert to milliseconds publish_time_boiler_ = mqttSettings.publish_time_boiler * 1000; @@ -648,7 +649,7 @@ void Mqtt::ha_status() { // create the sensors - must match the MQTT payload keys // these are all from the heartbeat MQTT topic - if (!EMSESP::system_.ethernet_connected()) { + if (!EMSESP::system_.ethernet_connected() || WiFi.isConnected()) { publish_system_ha_sensor_config(DeviceValueType::INT, "WiFi RSSI", "rssi", DeviceValueUOM::DBM); publish_system_ha_sensor_config(DeviceValueType::INT, "WiFi strength", "wifistrength", DeviceValueUOM::PERCENT); }