feat: Return door state as JSON

Co-authored-by: aider (gemini/gemini-2.5-pro-preview-05-06) <aider@aider.chat>
This commit is contained in:
2025-08-01 17:03:33 +00:00
parent 2556858912
commit 7a26f91cf1

View File

@@ -191,7 +191,7 @@ async def handle_root(request):
async def handle_state(request):
"""Handler for the /state GET request."""
state = get_derived_state()
return web.Response(text=state)
return web.json_response({'door': [state]})
async def on_startup(app):
"""Actions to perform on application startup."""