diff --git a/pymhcgui.py b/pymhcgui.py index 7395d05..d10a8a1 100644 --- a/pymhcgui.py +++ b/pymhcgui.py @@ -19,7 +19,7 @@ def toggle_heating_state(heating_button): port = 4623 # Port du serveur btcolor = heating_button.cget("bg") - current_state = 0 if btcolor == "gray" else 0 + current_state = 0 if btcolor == "gray" else 1 # Si la chauffe est active (vert), envoyer la commande "stop" if current_state == 1: @@ -32,7 +32,6 @@ def toggle_heating_state(heating_button): command = "start" heating_button.config(bg="green", text="Chauffe active") - # Créer la commande à envoyer au serveur with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: s.connect((server_ip, port))