From 7fa083fc737f73e95ff64e0941e9e53d0f423a90 Mon Sep 17 00:00:00 2001 From: Federico Leoni Date: Tue, 3 Nov 2020 13:03:08 -0300 Subject: [PATCH] Stupid error fix --- tasmota/xdrv_12_home_assistant.ino | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tasmota/xdrv_12_home_assistant.ino b/tasmota/xdrv_12_home_assistant.ino index 34a8ef762..f10ee7f74 100644 --- a/tasmota/xdrv_12_home_assistant.ino +++ b/tasmota/xdrv_12_home_assistant.ino @@ -285,7 +285,6 @@ void NewHAssDiscovery(void) HassDiscoveryRelays(Hass); #ifdef ESP8266 - if (i == 0 && (SONOFF_DUAL == TasmotaGlobal.module_type )) { SerialButton = true; } if (TUYA_DIMMER == TasmotaGlobal.module_type || SK03_TUYA == TasmotaGlobal.module_type) { TuyaMod = true; } if (SONOFF_IFAN02 == TasmotaGlobal.module_type || SONOFF_IFAN03 == TasmotaGlobal.module_type) { iFanMod = true; } #endif // ESP8266 @@ -309,6 +308,9 @@ void NewHAssDiscovery(void) stemp5[0] = '\0'; // Enable Discovery for Buttons only if SetOption73 is enabled for (uint32_t i = 0; i < MAX_KEYS; i++) { +#ifdef ESP8266 + if (i == 0 && (SONOFF_DUAL == TasmotaGlobal.module_type )) { SerialButton = true; } +#endif // ESP8266 snprintf_P(stemp5, sizeof(stemp5), PSTR("%s%s%d"), stemp5, (i > 0 ? "," : ""), (SerialButton ? 1 : (PinUsed(GPIO_KEY1, i)) & Settings.flag3.mqtt_buttons)); SerialButton = false; }