diff --git a/server.py b/server.py index 599e68b..83f2c03 100644 --- a/server.py +++ b/server.py @@ -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."""