Fix callApi with auth

This commit is contained in:
Paulus Schoutsen 2017-01-29 22:56:14 -08:00
parent 264731961b
commit 07357bcca8

View File

@ -146,7 +146,8 @@ Polymer({
}, },
callApi: function (method, path, parameters) { callApi: function (method, path, parameters) {
var host = window.location.protocol + '//' + window.location.host; var host = window.location.protocol + '//' + window.location.host;
return window.hassCallApi(host, {}, method, path, parameters); var auth = conn.options.authToken ? conn.options : {};
return window.hassCallApi(host, auth, method, path, parameters);
}, },
}, this.$.storage.getStoredState()); }, this.$.storage.getStoredState());