-
-
{{stateObj.stateDisplay}}
+
+
+
+
[[stateObj.stateDisplay]]
-
+
+
+
diff --git a/homeassistant/components/frontend/www_static/polymer/cards/state-card.html b/homeassistant/components/frontend/www_static/polymer/cards/state-card.html
index 3305f755a3..a445b2c32f 100644
--- a/homeassistant/components/frontend/www_static/polymer/cards/state-card.html
+++ b/homeassistant/components/frontend/www_static/polymer/cards/state-card.html
@@ -2,8 +2,7 @@
-
-
+
-
-
-
-
diff --git a/homeassistant/components/frontend/www_static/polymer/components/domain-icon.html b/homeassistant/components/frontend/www_static/polymer/components/domain-icon.html
index ba2074ab7c..9a7b64ad09 100644
--- a/homeassistant/components/frontend/www_static/polymer/components/domain-icon.html
+++ b/homeassistant/components/frontend/www_static/polymer/components/domain-icon.html
@@ -1,24 +1,37 @@
+
+
-
+
-
+
-
-
+})();
+
diff --git a/homeassistant/components/frontend/www_static/polymer/components/relative-ha-datetime.html b/homeassistant/components/frontend/www_static/polymer/components/relative-ha-datetime.html
index b9e1e4db58..cca46f8cb7 100644
--- a/homeassistant/components/frontend/www_static/polymer/components/relative-ha-datetime.html
+++ b/homeassistant/components/frontend/www_static/polymer/components/relative-ha-datetime.html
@@ -2,49 +2,81 @@
-
+
- {{ relativeTime }}
+ [[relativeTime]]
-
-
+ attached: function() {
+ this._interval = setInterval(this.updateRelative, UPDATE_INTERVAL);
+
+ if (this.datetimeObj) {
+ this.parsedDateTime = this.datetimeObj;
+ } else if (this.datetime) {
+ this.parsedDateTime = parseDateTime(this.datetime);
+ }
+
+ this.updateRelative();
+ },
+
+ detached: function() {
+ clearInterval(this._interval);
+ },
+
+ datetimeChanged: function(oldVal, newVal) {
+ this.parsedDateTime = newVal ? parseDateTime(newVal) : null;
+
+ this.updateRelative();
+ },
+
+ datetimeObjChanged: function(oldVal, newVal) {
+ this.parsedDateTime = newVal;
+
+ this.updateRelative();
+ },
+
+ updateRelative: function() {
+ this.relativeTime = this.parsedDateTime ?
+ moment(this.parsedDateTime).fromNow() : "";
+ },
+ });
+})();
+
diff --git a/homeassistant/components/frontend/www_static/polymer/components/state-badge.html b/homeassistant/components/frontend/www_static/polymer/components/state-badge.html
index ad362e6f04..5e2ed8d8d1 100644
--- a/homeassistant/components/frontend/www_static/polymer/components/state-badge.html
+++ b/homeassistant/components/frontend/www_static/polymer/components/state-badge.html
@@ -1,105 +1,107 @@
-
+
-
+
+
+
-
-
-
+
+ domain="[[stateObj.domain]]" data-domain="[[stateObj.domain]]"
+ state="[[stateObj.state]]" data-state="[[stateObj.state]]">
-
-
+
+
-
-
-
+ // from http://stackoverflow.com/questions/22894498/philips-hue-convert-xy-from-api-to-hex-or-rgb
+ xyBriToRgb: function (x, y, bri) {
+ z = 1.0 - x - y;
+ Y = bri / 255.0; // Brightness of lamp
+ X = (Y / y) * x;
+ Z = (Y / y) * z;
+ r = X * 1.612 - Y * 0.203 - Z * 0.302;
+ g = -X * 0.509 + Y * 1.412 + Z * 0.066;
+ b = X * 0.026 - Y * 0.072 + Z * 0.962;
+ r = r <= 0.0031308 ? 12.92 * r : (1.0 + 0.055) * Math.pow(r, (1.0 / 2.4)) - 0.055;
+ g = g <= 0.0031308 ? 12.92 * g : (1.0 + 0.055) * Math.pow(g, (1.0 / 2.4)) - 0.055;
+ b = b <= 0.0031308 ? 12.92 * b : (1.0 + 0.055) * Math.pow(b, (1.0 / 2.4)) - 0.055;
+ maxValue = Math.max(r,g,b);
+ r /= maxValue;
+ g /= maxValue;
+ b /= maxValue;
+ r = r * 255; if (r < 0) { r = 255; }
+ g = g * 255; if (g < 0) { g = 255; }
+ b = b * 255; if (b < 0) { b = 255; }
+ return [r, g, b];
+ }
+
+});
+
diff --git a/homeassistant/components/frontend/www_static/polymer/components/state-cards.html b/homeassistant/components/frontend/www_static/polymer/components/state-cards.html
index 913fc117cc..40fd4a87d0 100755
--- a/homeassistant/components/frontend/www_static/polymer/components/state-cards.html
+++ b/homeassistant/components/frontend/www_static/polymer/components/state-cards.html
@@ -2,50 +2,50 @@
-
+
+
+
-
-
-
-
-
-
+
+
-
+
@@ -53,4 +53,28 @@
-
+
+
+
diff --git a/homeassistant/components/frontend/www_static/polymer/components/state-info.html b/homeassistant/components/frontend/www_static/polymer/components/state-info.html
index f5d7e2301c..1e442c07e7 100755
--- a/homeassistant/components/frontend/www_static/polymer/components/state-info.html
+++ b/homeassistant/components/frontend/www_static/polymer/components/state-info.html
@@ -1,48 +1,64 @@
-
-
+
-
+
+
+
-
-
-
+
-
- {{stateObj.entityDisplay}}
-
+
[[stateObj.entityDisplay]]
-
-
+
+
+
\ No newline at end of file
diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/home-assistant-main.html b/homeassistant/components/frontend/www_static/polymer/layouts/home-assistant-main.html
index 3f08aea5de..a8ccdc4936 100644
--- a/homeassistant/components/frontend/www_static/polymer/layouts/home-assistant-main.html
+++ b/homeassistant/components/frontend/www_static/polymer/layouts/home-assistant-main.html
@@ -9,8 +9,8 @@
-
-
+
Home Assistant
@@ -148,12 +148,12 @@
This is the main partial, never remove it from the DOM but hide it
to speed up when people click on states.
-->
-
-
-
Selected: [[selected]]
-
Narrow: [[narrow]]
-
@@ -235,11 +231,6 @@
type: Boolean,
value: false,
},
-
- hasGroupStates: {
- type: Boolean,
- computed: '',
- }
},
listeners: {
diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html
index b105723974..ed728502ab 100644
--- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html
+++ b/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html
@@ -1,28 +1,51 @@
-
-
+
+
+
+
-
+
-
+
-
-
-
-
-
-
+
+
+
+
-
+
-
+
-
\ No newline at end of file
+
+
+
\ No newline at end of file
diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-states.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-states.html
index 079044f3fe..5bc632dc98 100644
--- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-states.html
+++ b/homeassistant/components/frontend/www_static/polymer/layouts/partial-states.html
@@ -1,16 +1,13 @@
-
-
+
+
-
-
-
-
+
-
- {{headerTitle}}
+
+
-
-
-
-
+
+ {{headerTitle}}
-
-
{{finalTranscript}}
-
{{interimTranscript}}
-
-
+
+
+
+
+
+
+
{{finalTranscript}}
+
[[interimTranscript]]
+
+
+
+
+ Hi there!
+
+ It looks like we have nothing to show you right now. It could be that we have not yet discovered all your devices but it is more likely that you have not configured Home Assistant yet.
+
+
+ Please see the Getting Started section on how to setup your devices.
+
+
+
+
+
+
-
- Hi there!
-
- It looks like we have nothing to show you right now. It could be that we have not yet discovered all your devices but it is more likely that you have not configured Home Assistant yet.
-
-
- Please see the Getting Started section on how to setup your devices.
-
-
-
-
-
diff --git a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-icons.html b/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-icons.html
index 846b1a7ddc..d130cf9fca 100644
--- a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-icons.html
+++ b/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-icons.html
@@ -1,4 +1,3 @@
-
@@ -7,18 +6,17 @@
-
+
-
-
+
-
+
-
diff --git a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-js.html b/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-js.html
index 631bf44afa..b44d49f14f 100644
--- a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-js.html
+++ b/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-js.html
@@ -44,7 +44,7 @@
window.hass.uiActions = {
showMoreInfoDialog: function(entityId) {
dispatcher.dispatch({
- actionType: this.ACTION_SHOW_DIALOG_MORE_INFO,
+ actionType: window.hass.uiConstants.ACTION_SHOW_DIALOG_MORE_INFO,
entityId: entityId,
});
},
diff --git a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-style.html b/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-style.html
index 17f979ac0c..8234ef113e 100644
--- a/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-style.html
+++ b/homeassistant/components/frontend/www_static/polymer/resources/home-assistant-style.html
@@ -1,7 +1,6 @@