From 808df68e57602e4a3fcdddb9e62b289e55a7c293 Mon Sep 17 00:00:00 2001 From: Pascal Vizeli Date: Fri, 19 May 2017 23:18:09 +0200 Subject: [PATCH] fix panel v2 --- hassio/api/__init__.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hassio/api/__init__.py b/hassio/api/__init__.py index 5bc9ddec0..00acc71ad 100644 --- a/hassio/api/__init__.py +++ b/hassio/api/__init__.py @@ -99,10 +99,9 @@ class RestAPI(object): def register_panel(self): """Register panel for homeassistant.""" - panel_dir = Path(__file__).parents[1].joinpath('panel') + panel = Path(__file__).parents[1].joinpath('panel/hassio-main.html') - self.webapp.router.register_resource( - web.StaticResource('/panel', panel_dir)) + self.webapp.router.add_get('/panel', web.FileResponse(panel)) async def start(self): """Run rest api webserver."""