Add a TUI.

This commit is contained in:
2026-06-09 09:45:55 +02:00
parent d25104b8a1
commit f3b5cd40fb
2 changed files with 122 additions and 0 deletions

View File

@ -253,8 +253,10 @@ HTML = HTML.replace("{max_budget}", str(int(config.BUDGET_S / 60)))
if __name__ == "__main__":
from devices import start_timer
from tui import start_tui
port = int(__import__("os").environ.get("PORT", "10000"))
start_timer()
start_tui(config.TICK_INTERVAL)
server = HTTPServer(("0.0.0.0", port), Handler)
print(f"🚀 Open http://localhost:{port}")
print(f"⏱️ Budget timer running (checks every {config.TICK_INTERVAL}s, reset at 7:00 AM)")