From 09a7d0b4a5b5fe31db1e8b0186c6b49e21a6f79e Mon Sep 17 00:00:00 2001 From: Adrian Scillato <35405447+ascillato@users.noreply.github.com> Date: Sat, 28 Aug 2021 17:20:10 -0300 Subject: [PATCH] Fix compilation if undef USE_LIGHT and def USE_HOME_ASSISTANT --- tasmota/xdrv_12_home_assistant.ino | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasmota/xdrv_12_home_assistant.ino b/tasmota/xdrv_12_home_assistant.ino index 38ce11a41..ddfb29923 100644 --- a/tasmota/xdrv_12_home_assistant.ino +++ b/tasmota/xdrv_12_home_assistant.ino @@ -507,9 +507,12 @@ void HAssAnnounceRelayLight(void) } else if ((i < Light.device) && !RelayX) { err_flag = true; AddLog(LOG_LEVEL_ERROR, PSTR("%s"), kHAssError2); -#endif //USE_LIGHT } else { if (Settings->flag.hass_discovery && (RelayX || (Light.device > 0) && (max_lights > 0)) && !err_flag ) +#else + } else { + if (Settings->flag.hass_discovery && RelayX ) +#endif //USE_LIGHT { // SetOption19 - Control Home Assistant automatic discovery (See SetOption59) char name[TOPSZ]; // friendlyname(33) + " " + index char value_template[33];