diff --git a/hassio/api/__init__.py b/hassio/api/__init__.py index 8888b7de4..fd906336d 100644 --- a/hassio/api/__init__.py +++ b/hassio/api/__init__.py @@ -139,13 +139,18 @@ class RestAPI(object): def register_panel(self): """Register panel for homeassistant.""" - panel = Path(__file__).parents[1].joinpath('panel/hassio-main.html') + def create_panel_response(build_type): + """Create a function to generate a response.""" + path = Path(__file__).parents[1].joinpath( + 'panel/hassio-main-{}.html'.format(build_type)) - def get_panel(request): - """Return file response with panel.""" - return web.FileResponse(panel) + return lambda request: web.FileResponse(path) - self.webapp.router.add_get('/panel', get_panel) + # This route is for backwards compatibility with HA < 0.58 + self.webapp.router.add_get('/panel', create_panel_response('es5')) + self.webapp.router.add_get('/panel_es5', create_panel_response('es5')) + self.webapp.router.add_get( + '/panel_latest', create_panel_response('latest')) async def start(self): """Run rest api webserver.""" diff --git a/hassio/const.py b/hassio/const.py index 10bfa3413..56c7a0110 100644 --- a/hassio/const.py +++ b/hassio/const.py @@ -2,7 +2,7 @@ from pathlib import Path from ipaddress import ip_network -HASSIO_VERSION = '0.74' +HASSIO_VERSION = '0.75' URL_HASSIO_VERSION = ('https://raw.githubusercontent.com/home-assistant/' 'hassio/{}/version.json') diff --git a/hassio/dock/homeassistant.py b/hassio/dock/homeassistant.py index 1a62e6cc3..09a2d8918 100644 --- a/hassio/dock/homeassistant.py +++ b/hassio/dock/homeassistant.py @@ -52,6 +52,7 @@ class DockerHomeAssistant(DockerInterface): hostname=self.name, detach=True, privileged=True, + init=True, devices=self.devices, network_mode='host', environment={ diff --git a/hassio/panel/hassio-main-es5.html b/hassio/panel/hassio-main-es5.html new file mode 100644 index 000000000..8668928e7 --- /dev/null +++ b/hassio/panel/hassio-main-es5.html @@ -0,0 +1,75 @@ + \ No newline at end of file diff --git a/hassio/panel/hassio-main-es5.html.gz b/hassio/panel/hassio-main-es5.html.gz new file mode 100644 index 000000000..6b833732f Binary files /dev/null and b/hassio/panel/hassio-main-es5.html.gz differ diff --git a/hassio/panel/hassio-main-latest.html b/hassio/panel/hassio-main-latest.html new file mode 100644 index 000000000..37e56120e --- /dev/null +++ b/hassio/panel/hassio-main-latest.html @@ -0,0 +1,75 @@ + \ No newline at end of file diff --git a/hassio/panel/hassio-main-latest.html.gz b/hassio/panel/hassio-main-latest.html.gz new file mode 100644 index 000000000..3e0c358b9 Binary files /dev/null and b/hassio/panel/hassio-main-latest.html.gz differ diff --git a/hassio/panel/hassio-main.html b/hassio/panel/hassio-main.html deleted file mode 100644 index 221227634..000000000 --- a/hassio/panel/hassio-main.html +++ /dev/null @@ -1,75 +0,0 @@ - \ No newline at end of file diff --git a/hassio/panel/hassio-main.html.gz b/hassio/panel/hassio-main.html.gz deleted file mode 100644 index 7dc6392cc..000000000 Binary files a/hassio/panel/hassio-main.html.gz and /dev/null differ diff --git a/setup.py b/setup.py index 179b6831d..9625b45af 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( url='https://home-assistant.io/', description=('Open-source private cloud os for Home-Assistant' ' based on ResinOS'), - long_description=('A maintenainless private cloud operator system that' + long_description=('A maintainless private cloud operator system that' 'setup a Home-Assistant instance. Based on ResinOS'), classifiers=[ 'Intended Audience :: End Users/Desktop', diff --git a/version.json b/version.json index 5a480944f..428c41403 100644 --- a/version.json +++ b/version.json @@ -1,5 +1,5 @@ { - "hassio": "0.74", + "hassio": "0.75", "homeassistant": "0.57.3", "resinos": "1.1", "resinhup": "0.3",