mirror of
https://github.com/home-assistant/core.git
synced 2025-07-23 13:17:32 +00:00
commit
28de2d6f75
@ -175,10 +175,13 @@ def async_setup(hass, config):
|
||||
if data is None:
|
||||
data = {}
|
||||
|
||||
refresh_token = None
|
||||
if 'hassio_user' in data:
|
||||
user = yield from hass.auth.async_get_user(data['hassio_user'])
|
||||
refresh_token = list(user.refresh_tokens.values())[0]
|
||||
else:
|
||||
if user:
|
||||
refresh_token = list(user.refresh_tokens.values())[0]
|
||||
|
||||
if refresh_token is None:
|
||||
user = yield from hass.auth.async_create_system_user('Hass.io')
|
||||
refresh_token = yield from hass.auth.async_create_refresh_token(user)
|
||||
data['hassio_user'] = user.id
|
||||
|
@ -2,7 +2,7 @@
|
||||
"""Constants used by Home Assistant components."""
|
||||
MAJOR_VERSION = 0
|
||||
MINOR_VERSION = 75
|
||||
PATCH_VERSION = '2'
|
||||
PATCH_VERSION = '3'
|
||||
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
|
||||
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
|
||||
REQUIRED_PYTHON_VER = (3, 5, 3)
|
||||
|
Loading…
x
Reference in New Issue
Block a user