Fix rule mqtt#connected trigger

Fix rule mqtt#connected trigger when mqtt is disabled (#4149)
This commit is contained in:
Theo Arends 2018-10-25 14:16:46 +02:00
parent eefad54be7
commit f58f3c2d31
2 changed files with 5 additions and 1 deletions

View File

@ -1,6 +1,7 @@
/* 6.2.1.19 20181023 /* 6.2.1.19 20181023
* Fix header file execution order by renaming user_config.h to my_user_config.h * Fix header file execution order by renaming user_config.h to my_user_config.h
* Fix invalid JSON floating point result from nan (Not a Number) and inf (Infinity) into null (#4147) * Fix invalid JSON floating point result from nan (Not a Number) and inf (Infinity) into null (#4147)
* Fix rule mqtt#connected trigger when mqtt is disabled (#4149)
* *
* 6.2.1.18 20181019 * 6.2.1.18 20181019
* Add more API callbacks and document API.md * Add more API callbacks and document API.md

View File

@ -398,8 +398,11 @@ void MqttConnected()
XdrvCall(FUNC_MQTT_INIT); XdrvCall(FUNC_MQTT_INIT);
} }
mqtt_initial_connection_state = 0; mqtt_initial_connection_state = 0;
rules_flag.mqtt_connected = 1;
global_state.mqtt_down = 0; global_state.mqtt_down = 0;
if (Settings.flag.mqtt_enabled) {
rules_flag.mqtt_connected = 1;
}
} }
#ifdef USE_MQTT_TLS #ifdef USE_MQTT_TLS