Support new panel generation (#487)

* Support new panel generation

* fix lint
This commit is contained in:
Pascal Vizeli 2018-05-29 17:53:09 +02:00 committed by GitHub
parent f361916a60
commit 124e487ef7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -202,8 +202,14 @@ class RestAPI(CoreSysAttributes):
web.get('/panel_latest', create_response('hassio-main-latest')),
])
# This route is for HA > 0.61
self.webapp.add_routes([web.static('/app-es5', panel_dir)])
# This route is for backwards compatibility with HA 0.62 - 0.70
self.webapp.add_routes([
web.get('/app-es5/index.html', create_response('index')),
web.get('/app-es5/hassio-app.html', create_response('hassio-app')),
])
# This route is for HA > 0.70
self.webapp.add_routes([web.static('/app', panel_dir)])
async def start(self):
"""Run rest api webserver."""