From 5de9255526b897f18317ad4066d7b93c5e94dc4b Mon Sep 17 00:00:00 2001 From: floristhebeast Date: Mon, 30 Jun 2025 20:43:00 +0200 Subject: [PATCH] voeg een else toe voor als de contitions niet kloppen --- dht11.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dht11.py b/dht11.py index 3b7b8a9..1211199 100644 --- a/dht11.py +++ b/dht11.py @@ -58,6 +58,11 @@ def check_data(): fan_timer_start = 0 sensor_data['fan'] = False GPIO.output(FAN_PIN, GPIO.LOW) + else: + fan_timer_actief = False + fan_timer_start = 0 + sensor_data['fan'] = False + GPIO.output(FAN_PIN, GPIO.LOW) class handler_class(http.server.BaseHTTPRequestHandler): def do_GET (self):