Skip to content

Commit

Permalink
bugfix: send HA discovery again after reconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausMu committed Sep 21, 2024
1 parent 5bb2ff4 commit e20e0c3
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/mqtt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ bool checkMQTTconnection() {
#endif
#if defined(useHomeassistantMQTTDiscovery)
mqttClient.subscribe(HASSSTATUSTOPIC);
// if we successfully connected or reconnected to the mqtt server, send HA discovery
timerStartForHAdiscovery = millis();
#endif
} else {
Log.printf(" MQTT connection failed (but WiFi is available). Will try later ...\r\n");
Expand Down

0 comments on commit e20e0c3

Please sign in to comment.