Von English mit KI übersetzt ·
Funktioniert. Schaltkarte auf der Supervisor-Platine, der Lüfter klickt, und der Status kommt als fan.on zurück.Zwei Dinge hatte ich falsch. Ich hatte es zuerst als fan.toggle umgesetzt und es nach Tylers Beitrag geändert. Außerdem habe ich das Abonnement nur einmal in setup() ausgeführt, daher funktionierten Befehle bis zum ersten WLAN-Abbruch und danach nie wieder. Ich habe das Abonnement in die Reconnect-Funktion verschoben, und jetzt übersteht es Verbindungsabbrüche.
Working. Switch card on the supervisor board, fan clicks, state comes back as fan.on.
Two things I had wrong. I first made it fan.toggle, changed it after Tyler’s post. And I only subscribed once in setup(), so commands worked until the first WiFi drop and then never again. Moved the subscribe into the reconnect function and it survives now.

