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:
@@ -191,7 +191,7 @@ async def handle_root(request):
|
|||||||
async def handle_state(request):
|
async def handle_state(request):
|
||||||
"""Handler for the /state GET request."""
|
"""Handler for the /state GET request."""
|
||||||
state = get_derived_state()
|
state = get_derived_state()
|
||||||
return web.Response(text=state)
|
return web.json_response({'door': [state]})
|
||||||
|
|
||||||
async def on_startup(app):
|
async def on_startup(app):
|
||||||
"""Actions to perform on application startup."""
|
"""Actions to perform on application startup."""
|
||||||
|
Reference in New Issue
Block a user