fix enable button stop function
This commit is contained in:
parent
be329733bd
commit
0874c212dc
@ -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))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user