Add in-app settings menu and fix settings API

Move WiFi and device name configuration into a modal menu, reuse existing settings endpoints, and harden settings serialization and startup for MicroPython.
This commit is contained in:
2026-01-29 00:54:20 +13:00
parent cf1d831b5a
commit 00514f0525
6 changed files with 444 additions and 5 deletions

View File

@@ -9,7 +9,9 @@ settings = Settings()
@controller.get('')
async def get_settings(request):
"""Get all settings."""
return json.dumps(dict(settings)), 200, {'Content-Type': 'application/json'}
# Settings is already a dict subclass; avoid dict() wrapper which can
# trigger MicroPython's "dict update sequence has wrong length" quirk.
return json.dumps(settings), 200, {'Content-Type': 'application/json'}
@controller.get('/wifi/station')
async def get_station_status(request):