Compare commits

..

No commits in common. "9e2674187ccc0f47838ca26d78057618db88a558" and "5d162f39719753553e3daca962350ddbc96d2d9e" have entirely different histories.

2 changed files with 2 additions and 12 deletions

View File

@ -241,7 +241,6 @@ class TempWebServer:
def _get_status_page(self, sensors, ac_monitor, heater_monitor, show_success=False):
"""Generate HTML status page."""
print("DEBUG: Generating status page...")
try:
# Get current temperatures
inside_temps = sensors['inside'].read_all_temps(unit='F')
@ -321,10 +320,7 @@ class TempWebServer:
inside_temp_str = "{:.1f}".format(inside_temp) if isinstance(inside_temp, float) else str(inside_temp)
outside_temp_str = "{:.1f}".format(outside_temp) if isinstance(outside_temp, float) else str(outside_temp)
# ===== START: Add HOLD mode banner =====
# Check if in HOLD mode (schedules exist but are disabled)
is_hold_mode = not config.get('schedule_enabled', False) and len(config.get('schedules', [])) > 0
# **NEW: Add HOLD mode banner**
hold_banner = ""
if is_hold_mode:
hold_banner = """
@ -332,7 +328,7 @@ class TempWebServer:
HOLD MODE ACTIVE - Manual settings in use (Schedule paused)
</div>
"""
# ===== END: Add HOLD mode banner =====
html = """
<!DOCTYPE html>
<html>

View File

@ -2,7 +2,6 @@ from machine import Pin
import time
import network
import json
import gc # ADD THIS - for garbage collection
# Initialize pins (LED light onboard)
led = Pin("LED", Pin.OUT)
@ -250,11 +249,6 @@ while True:
# Pass schedule_monitor so web interface can reload config when schedules change
web_server.check_requests(sensors, ac_monitor, heater_monitor, schedule_monitor)
# ===== START: Garbage Collection =====
# Free up unused memory to prevent fragmentation
gc.collect()
# ===== END: Garbage Collection =====
# Small delay to prevent CPU overload (0.1 seconds = 10 loops per second)
time.sleep(0.1)
# ===== END: Main Loop =====