This commit is contained in:
pvizeli 2017-04-03 17:09:14 +02:00
parent 931e5f4f6b
commit 0e9fb43669
4 changed files with 5 additions and 5 deletions

View File

@ -33,4 +33,4 @@ class APIHomeAssistant(object):
body = await request.json(loads=json_loads)
version = body.get(ATTR_VERSION, self.config.current_homeassistant)
return await self.dock_hass.update(version):
return await self.dock_hass.update(version)

View File

@ -1,7 +1,7 @@
"""Init file for HassIO host rest api."""
import logging
from .util import api_process_hostcontroll
from .util import api_process_hostcontroll, json_loads
from ..const import ATTR_VERSION
_LOGGER = logging.getLogger(__name__)

View File

@ -48,9 +48,9 @@ class CoreConfig(object):
except OSError:
_LOGGER.exception("Can't store config in %s", self._filename)
async def fetch_update_infos():
async def fetch_update_infos(self):
"""Read current versions from web."""
avilable_updates = await fetch_current_versions(self.websession)
current = await fetch_current_versions(self.websession)
if avilable_updates:
self._data.update({

View File

@ -82,7 +82,7 @@ class HassIO(object):
while True:
# read homeassistant tag and install it
if not self.config.current_homeassistant:
await self.config.fetch_update_infos():
await self.config.fetch_update_infos()
tag = self.config.current_homeassistant
if tag and await self.homeassistant.install(tag):