Wifi and MQTT checks and reconnects added, forgot some variables

This commit is contained in:
2026-04-10 01:43:30 +02:00
parent 272bdf4806
commit cdad56988c

View File

@@ -586,9 +586,9 @@ def main():
info("Zero complete")
# umqtt.robust handles reconnection automatically — just connect once
client = connect_mqtt()
publish_discovery(client)
publish_state(client)
connect_mqtt()
publish_discovery(client_ref)
publish_state(client_ref)
info("Entering main loop")
info("-" * 48)
@@ -619,7 +619,7 @@ def main():
utime.sleep_ms(1000)
continue
client.check_msg()
client_ref.check_msg()
now = utime.ticks_ms()