mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-25 18:26:35 +00:00
Only send auth/current_user if new auth is enabled (#1483)
This commit is contained in:
parent
9634a13dc2
commit
abf85ae19b
@ -333,9 +333,12 @@ class HomeAssistant extends LocalizeMixin(PolymerElement) {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
this.hass.callWS({
|
// only for new auth
|
||||||
type: 'auth/current_user',
|
if (conn.options.accessToken) {
|
||||||
}).then(user => this._updateHass({ user }), () => {});
|
this.hass.callWS({
|
||||||
|
type: 'auth/current_user',
|
||||||
|
}).then(user => this._updateHass({ user }), () => {});
|
||||||
|
}
|
||||||
|
|
||||||
conn.subscribeEvents((event) => {
|
conn.subscribeEvents((event) => {
|
||||||
this._updateHass({ themes: event.data });
|
this._updateHass({ themes: event.data });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user