Typehints and refactor

This commit is contained in:
Jonas Zeunert
2024-08-22 20:29:23 +02:00
parent 550eeb4945
commit f9b3bcd9a8

View File

@@ -6,6 +6,7 @@ from micropyserver import MicroPyServer
from micropyserver_utils import send_response, get_request_post_params
import ntptime
import os
import io
DHT_PIN = 26
RELAY_PIN = 4
@@ -13,11 +14,11 @@ UPDATE_INTERVAL_S = 60
MAX_LOG_SIZE = 3 * 1024 * 1024 # MegaByte
name = "Test Sensor"
humidity_limit_path = 'humidity_limit'
sensor_log_path = 'sensors.log'
sensor_log_path = 'sensors.log'
log_file = None
log_cursor_file = None
log_file: io.TextIOWrapper
log_cursor_file: io.TextIOWrapper
server = MicroPyServer()
dht = dht.DHT22(Pin(DHT_PIN))