Subscribe to HA MQTT topic

Subscribe to HA MQTT topic
This commit is contained in:
Deb 2018-02-12 16:33:08 -05:00 committed by GitHub
parent 6b787ac1cc
commit 0c98a1c16b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -732,6 +732,7 @@ void mqtt_reconnect() {
mqtt_client.publish(mqtt_outtopic, message); mqtt_client.publish(mqtt_outtopic, message);
// ... and resubscribe // ... and resubscribe
mqtt_client.subscribe(mqtt_intopic); mqtt_client.subscribe(mqtt_intopic);
mqtt_client.subscribe(String(mqtt_ha + "#").c_str());
DBG_OUTPUT_PORT.printf("MQTT topic in: %s\n", mqtt_intopic); DBG_OUTPUT_PORT.printf("MQTT topic in: %s\n", mqtt_intopic);
DBG_OUTPUT_PORT.printf("MQTT topic out: %s\n", mqtt_outtopic); DBG_OUTPUT_PORT.printf("MQTT topic out: %s\n", mqtt_outtopic);