diff --git a/TasmotaManager.py b/TasmotaManager.py index 5517012..6c87b15 100755 --- a/TasmotaManager.py +++ b/TasmotaManager.py @@ -1640,10 +1640,15 @@ class TasmotaDiscovery: self.logger.error(f"{name}: Failed to set {setting}") except requests.exceptions.RequestException as e: self.logger.error(f"{name}: Error updating {setting}: {str(e)}") - + + # Add delay after MQTT configuration to allow device to process changes + if mqtt_updated: + self.logger.debug(f"{name}: Waiting for device to process MQTT changes...") + time.sleep(1.0) + # Apply console settings console_updated = self.apply_console_settings(ip, name, with_retry) - + # Reboot the device if requested if reboot: save_url = f"http://{ip}/cm?cmnd=Restart%201"