From 07357bcca8af8702f6581f2f5023026330e2b034 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Sun, 29 Jan 2017 22:56:14 -0800 Subject: [PATCH] Fix callApi with auth --- src/home-assistant.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/home-assistant.html b/src/home-assistant.html index 93b8de3cf7..8894d3c968 100644 --- a/src/home-assistant.html +++ b/src/home-assistant.html @@ -146,7 +146,8 @@ Polymer({ }, callApi: function (method, path, parameters) { 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());