diff --git a/homeassistant/components/http/frontend.py b/homeassistant/components/http/frontend.py index 949cd98dfaa..cc7632f5523 100644 --- a/homeassistant/components/http/frontend.py +++ b/homeassistant/components/http/frontend.py @@ -1,2 +1,2 @@ """ DO NOT MODIFY. Auto-generated by build_frontend script """ -VERSION = "0492fc0ecdb4c78626038490eb76b3e1" +VERSION = "43a1e2517105b676c05bb1b8dce357b3" diff --git a/homeassistant/components/http/www_static/frontend.html b/homeassistant/components/http/www_static/frontend.html index 864eaf98e16..d1b3c2e9de5 100644 --- a/homeassistant/components/http/www_static/frontend.html +++ b/homeassistant/components/http/www_static/frontend.html @@ -59,6 +59,6 @@ if(this.removeAttribute(a),d)return j(this,a,c);var e=c,f=m(this,a,e);return j(t + diff --git a/homeassistant/components/http/www_static/polymer/home-assistant-api.html b/homeassistant/components/http/www_static/polymer/home-assistant-api.html index 3bccf223179..5e9ee3d0f23 100644 --- a/homeassistant/components/http/www_static/polymer/home-assistant-api.html +++ b/homeassistant/components/http/www_static/polymer/home-assistant-api.html @@ -279,8 +279,18 @@ }, call_api: function(method, path, parameters, onSuccess, onError) { + var url = "/api/" + path; + + // set to true to generate a frontend to be used as demo on the website + if (false) { + if (path === "states" || path === "services" || path === "events") { + url = "/demo/" + path + ".json"; + } else { + return; + } + } var req = new XMLHttpRequest(); - req.open(method, "/api/" + path, true); + req.open(method, url, true); req.setRequestHeader("X-HA-access", this.auth); req.onreadystatechange = function() {