Merge pull request #593 from home-assistant/dev

Release 118
This commit is contained in:
Pascal Vizeli 2018-07-23 12:59:15 +02:00 committed by GitHub
commit efe95f7bab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 4 additions and 10 deletions

1
API.md
View File

@ -381,6 +381,7 @@ Output is the raw Docker log.
"port": "port for access hass",
"ssl": "bool",
"password": "",
"refresh_token": "",
"watchdog": "bool",
"startup_time": 600
}

View File

@ -123,7 +123,7 @@ class APIHomeAssistant(CoreSysAttributes):
@api_process
def start(self, request):
"""Start homeassistant."""
asyncio.shield(self.sys_homeassistant.start())
return asyncio.shield(self.sys_homeassistant.start())
@api_process
def restart(self, request):

View File

@ -1,6 +1,5 @@
"""Init file for HassIO util for rest api."""
import json
import hashlib
import logging
from aiohttp import web
@ -94,9 +93,3 @@ async def api_validate(schema, request):
raise RuntimeError(humanize_error(data, ex)) from None
return data
def hash_password(password):
"""Hash and salt our passwords."""
key = ")*()*SALT_HASSIO2123{}6554547485HSKA!!*JSLAfdasda$".format(password)
return hashlib.sha256(key.encode()).hexdigest()

View File

@ -2,7 +2,7 @@
from pathlib import Path
from ipaddress import ip_network
HASSIO_VERSION = '117'
HASSIO_VERSION = '118'
URL_HASSIO_ADDONS = "https://github.com/home-assistant/hassio-addons"
URL_HASSIO_VERSION = \

View File

@ -393,7 +393,7 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
headers[hdrs.AUTHORIZATION] = f'Bearer {self.access_token}'
async with getattr(self.sys_websession_ssl, method)(
url, timeout=timeout, json=json, headers=headers
url, data=data, timeout=timeout, json=json, headers=headers
) as resp:
# Access token expired
if resp.status == 401 and self.refresh_token: