diff --git a/homeassistant/components/http/frontend.py b/homeassistant/components/http/frontend.py index cc7632f5523..2ec7cc69630 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 = "43a1e2517105b676c05bb1b8dce357b3" +VERSION = "78343829ea70bf07a9e939b321587122" diff --git a/homeassistant/components/http/www_static/frontend.html b/homeassistant/components/http/www_static/frontend.html index d1b3c2e9de5..35d51134f0c 100644 --- a/homeassistant/components/http/www_static/frontend.html +++ b/homeassistant/components/http/www_static/frontend.html @@ -49,16 +49,30 @@ 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/bower.json b/homeassistant/components/http/www_static/polymer/bower.json index aca60a6912f..24f472ca259 100644 --- a/homeassistant/components/http/www_static/polymer/bower.json +++ b/homeassistant/components/http/www_static/polymer/bower.json @@ -32,6 +32,7 @@ "paper-menu-button": "polymer/paper-menu-button#~0.5.2", "paper-dropdown": "polymer/paper-dropdown#~0.5.2", "paper-item": "polymer/paper-item#~0.5.2", - "moment": "~2.8.4" + "moment": "~2.8.4", + "core-style": "polymer/core-style#~0.5.2" } } 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 5e9ee3d0f23..4e9c5729dba 100644 --- a/homeassistant/components/http/www_static/polymer/home-assistant-api.html +++ b/homeassistant/components/http/www_static/polymer/home-assistant-api.html @@ -35,7 +35,7 @@ }; Object.defineProperties(State.prototype, { - "stateDisplay": { + stateDisplay: { get: function() { var state = this.state.replace(/_/g, " "); if(this.attributes.unit_of_measurement) { @@ -46,19 +46,30 @@ } }, - "isCustomGroup": { + isCustomGroup: { get: function() { return this.domain == "group" && !this.attributes.auto; } }, - "canToggle": { + canToggle: { get: function() { // groups that have the on/off state or if there is a turn_on service return ((this.domain == 'group' && (this.state == 'on' || this.state == 'off')) || this.api.hasService(this.domain, 'turn_on')); } + }, + + // how to render the card for this state + cardType: { + get: function() { + if(this.canToggle) { + return "toggle"; + } else { + return "display"; + } + } } }); diff --git a/homeassistant/components/http/www_static/polymer/state-card-display.html b/homeassistant/components/http/www_static/polymer/state-card-display.html new file mode 100755 index 00000000000..d54800c0af5 --- /dev/null +++ b/homeassistant/components/http/www_static/polymer/state-card-display.html @@ -0,0 +1,30 @@ + + + + + + + + + diff --git a/homeassistant/components/http/www_static/polymer/state-card.html b/homeassistant/components/http/www_static/polymer/state-card-toggle.html similarity index 57% rename from homeassistant/components/http/www_static/polymer/state-card.html rename to homeassistant/components/http/www_static/polymer/state-card-toggle.html index 8b0be4dc076..7c7b050d517 100755 --- a/homeassistant/components/http/www_static/polymer/state-card.html +++ b/homeassistant/components/http/www_static/polymer/state-card-toggle.html @@ -1,55 +1,19 @@ - - + - + + + diff --git a/homeassistant/components/http/www_static/polymer/states-cards.html b/homeassistant/components/http/www_static/polymer/states-cards.html index 4727852b113..1710c52e5fd 100755 --- a/homeassistant/components/http/www_static/polymer/states-cards.html +++ b/homeassistant/components/http/www_static/polymer/states-cards.html @@ -1,5 +1,7 @@ - + + +