From 188136dbb3ad0b9c9dc5539f1eb610b371ac14cc Mon Sep 17 00:00:00 2001 From: Frank <91616163+softhack007@users.noreply.github.com> Date: Mon, 22 May 2023 11:11:20 +0200 Subject: [PATCH] MQTT bugfix for SHT usermod typo in macro name (MM specific code) caused MQTT to be disabled even when MQTT was supported in the buildenv. --- usermods/sht/usermod_sht.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/usermods/sht/usermod_sht.h b/usermods/sht/usermod_sht.h index 3c0d96b7..bf99afd2 100644 --- a/usermods/sht/usermod_sht.h +++ b/usermods/sht/usermod_sht.h @@ -158,7 +158,7 @@ void ShtUsermod::cleanup() * @return void */ void ShtUsermod::publishTemperatureAndHumidityViaMqtt() { -#ifdef WLED_ENABLED_MQTT +#ifdef WLED_ENABLE_MQTT if (!WLED_MQTT_CONNECTED) return; char buf[128]; @@ -179,7 +179,7 @@ void ShtUsermod::publishTemperatureAndHumidityViaMqtt() { * @return void */ void ShtUsermod::publishHomeAssistantAutodiscovery() { -#ifdef WLED_ENABLED_MQTT +#ifdef WLED_ENABLE_MQTT if (!WLED_MQTT_CONNECTED) return; char json_str[1024], buf[128]; @@ -225,7 +225,7 @@ void ShtUsermod::publishHomeAssistantAutodiscovery() { * * @return void */ -#ifdef WLED_ENABLED_MQTT +#ifdef WLED_ENABLE_MQTT void ShtUsermod::appendDeviceToMqttDiscoveryMessage(JsonDocument& root) { JsonObject device = root.createNestedObject(F("dev")); device[F("ids")] = escapedMac.c_str(); @@ -339,7 +339,7 @@ void ShtUsermod::loop() * @return void */ void ShtUsermod::onMqttConnect(bool sessionPresent) { -#ifdef WLED_ENABLED_MQTT +#ifdef WLED_ENABLE_MQTT if (haMqttDiscovery && !haMqttDiscoveryDone) publishHomeAssistantAutodiscovery(); #endif }