mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-12 03:36:31 +00:00
Force auto API password (#1065)
This commit is contained in:
parent
a234006de2
commit
6970cebf80
@ -106,6 +106,7 @@ class APIHomeAssistant(CoreSysAttributes):
|
|||||||
|
|
||||||
if ATTR_REFRESH_TOKEN in body:
|
if ATTR_REFRESH_TOKEN in body:
|
||||||
self.sys_homeassistant.refresh_token = body[ATTR_REFRESH_TOKEN]
|
self.sys_homeassistant.refresh_token = body[ATTR_REFRESH_TOKEN]
|
||||||
|
self.sys_homeassistant.api_password = None
|
||||||
|
|
||||||
self.sys_homeassistant.save_data()
|
self.sys_homeassistant.save_data()
|
||||||
|
|
||||||
|
@ -463,7 +463,7 @@ class HomeAssistant(JsonConfig, CoreSysAttributes):
|
|||||||
headers[hdrs.CONTENT_TYPE] = content_type
|
headers[hdrs.CONTENT_TYPE] = content_type
|
||||||
|
|
||||||
# Set old API Password
|
# Set old API Password
|
||||||
if self.api_password:
|
if not self.refresh_token and self.api_password:
|
||||||
headers[HEADER_HA_ACCESS] = self.api_password
|
headers[HEADER_HA_ACCESS] = self.api_password
|
||||||
|
|
||||||
for _ in (1, 2):
|
for _ in (1, 2):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user