-
-
-
-
- {{entryObj.name}}
-
-
- {{entryObj.name}}
-
- {{entryObj.message}}
+
+
-
-
+
+
+
-
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 cca46f8cb72..1c860161d53 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
@@ -20,12 +20,12 @@
properties: {
datetime: {
type: String,
- observe: 'datetimeChanged',
+ observer: 'datetimeChanged',
},
datetimeObj: {
type: Object,
- observe: 'datetimeObjChanged',
+ observer: 'datetimeObjChanged',
},
parsedDateTime: {
@@ -47,27 +47,19 @@
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) {
+ datetimeChanged: function(newVal) {
this.parsedDateTime = newVal ? parseDateTime(newVal) : null;
this.updateRelative();
},
- datetimeObjChanged: function(oldVal, newVal) {
+ datetimeObjChanged: function(newVal) {
this.parsedDateTime = newVal;
this.updateRelative();
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 5e2ed8d8d12..3e016dda23f 100644
--- a/homeassistant/components/frontend/www_static/polymer/components/state-badge.html
+++ b/homeassistant/components/frontend/www_static/polymer/components/state-badge.html
@@ -58,23 +58,21 @@ Polymer({
properties: {
stateObj: {
type: Object,
- observe: 'updateIconColor',
+ observer: 'updateIconColor',
},
},
/**
* Called when an attribute changes that influences the color of the icon.
*/
- updateIconColor: function(oldVal, newVal) {
- var state = this.stateObj;
-
+ updateIconColor: function(newVal) {
// for domain light, set color of icon to light color if available
- if(state.domain == "light" && state.state == "on" &&
- state.attributes.brightness && state.attributes.xy_color) {
+ if(newVal.domain == "light" && newVal.state == "on" &&
+ newVal.attributes.brightness && newVal.attributes.xy_color) {
- var rgb = this.xyBriToRgb(state.attributes.xy_color[0],
- state.attributes.xy_color[1],
- state.attributes.brightness);
+ var rgb = this.xyBriToRgb(newVal.attributes.xy_color[0],
+ newVal.attributes.xy_color[1],
+ newVal.attributes.brightness);
this.$.icon.style.color = "rgb(" + rgb.map(Math.floor).join(",") + ")";
} else {
this.$.icon.style.color = null;
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 40fd4a87d03..b3d7831a9ae 100755
--- a/homeassistant/components/frontend/www_static/polymer/components/state-cards.html
+++ b/homeassistant/components/frontend/www_static/polymer/components/state-cards.html
@@ -45,7 +45,7 @@
-
+
@@ -65,15 +65,10 @@
type: Array,
value: [],
},
-
- emptyStates: {
- type: Boolean,
- computed: 'computeEmptyStates(states)',
- },
},
computeEmptyStates: function(states) {
- return states.length == 0;
+ return states.length === 0;
},
});
})();
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 a8ccdc4936c..2b101a74995 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
@@ -10,8 +10,8 @@
-
@@ -28,6 +28,10 @@
overflow: hidden;
}
+ .sidenav paper-toolbar {
+ padding-left: 16px;
+ }
+
.sidenav paper-menu {
--paper-menu-color: #757575;
}
@@ -37,7 +41,7 @@
}
.divider {
- border-top: 1px solid #e0e0e0;
+ border-top: 1px solid #e0e0e0;
}
.text {
@@ -132,13 +136,13 @@
Developer Tools
@@ -148,27 +152,27 @@
This is the main partial, never remove it from the DOM but hide it
to speed up when people click on states.
-->
-
+
+
+
+
+
+ -->
@@ -231,16 +235,69 @@
type: Boolean,
value: false,
},
+
+ selectedHistory: {
+ type: String,
+ value: 'history',
+ readOnly: true,
+ },
+
+ isSelectedHistory: {
+ type: Boolean,
+ computed: 'computeIsSelected(selected, selectedHistory)',
+ },
+
+ selectedLogbook: {
+ type: String,
+ value: 'logbook',
+ readOnly: true,
+ },
+
+ isSelectedLogbook: {
+ type: Boolean,
+ computed: 'computeIsSelected(selected, selectedLogbook)',
+ },
+
+ selectedDevEvent: {
+ type: String,
+ value: 'devEvent',
+ readOnly: true,
+ },
+
+ isSelectedDevEvent: {
+ type: Boolean,
+ computed: 'computeIsSelected(selected, selectedDevEvent)',
+ },
+
+ selectedDevState: {
+ type: String,
+ value: 'devState',
+ readOnly: true,
+ },
+
+ isSelectedDevState: {
+ type: Boolean,
+ computed: 'computeIsSelected(selected, selectedDevState)',
+ },
+
+ selectedDevService: {
+ type: String,
+ value: 'devService',
+ readOnly: true,
+ },
+
+ isSelectedDevService: {
+ type: Boolean,
+ computed: 'computeIsSelected(selected, selectedDevService)',
+ },
+
+
},
listeners: {
'menu.core-select': 'menuSelect',
},
- attached: function() {
- this.togglePanel = this.togglePanel.bind(this);
- },
-
stateStoreChanged: function(stateStore) {
this.activeFilters = stateStore.domains.filter(function(domain) {
return domain in uiConstants.STATE_FILTERS;
@@ -270,7 +327,7 @@
return;
}
- this.togglePanel();
+ this.closeDrawer();
this.selected = newChoice;
if (newChoice.substr(0, 7) === 'states_') {
@@ -286,8 +343,8 @@
this.narrow = detail.narrow;
},
- togglePanel: function() {
- this.$.drawer.togglePanel();
+ closeDrawer: function() {
+ this.$.drawer.closeDrawer();
},
handleLogOut: function() {
@@ -309,6 +366,10 @@
// /temp work around
+ computeIsSelected: function(selected, selectedType) {
+ return selected === selectedType;
+ },
+
filterIcon: function(filter) {
return uiUtil.domainIcon(filter);
},
@@ -322,4 +383,4 @@
}
});
})();
-
+
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 ed728502ab7..da128bc75fa 100644
--- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html
+++ b/homeassistant/components/frontend/www_static/polymer/layouts/partial-base.html
@@ -12,8 +12,7 @@
-
+
@@ -38,11 +37,6 @@
type: Boolean,
value: false,
},
-
- togglePanel: {
- type: Function,
- value: function() {},
- },
},
});
diff --git a/homeassistant/components/frontend/www_static/polymer/layouts/partial-logbook.html b/homeassistant/components/frontend/www_static/polymer/layouts/partial-logbook.html
index faa7f93fea1..4bfd1ef17d5 100644
--- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-logbook.html
+++ b/homeassistant/components/frontend/www_static/polymer/layouts/partial-logbook.html
@@ -1,43 +1,50 @@
+
+
-
-
+
-
- Logbook
+
+
+ Logbook
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
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 6f937b5ed59..44b7366e577 100644
--- a/homeassistant/components/frontend/www_static/polymer/layouts/partial-states.html
+++ b/homeassistant/components/frontend/www_static/polymer/layouts/partial-states.html
@@ -7,7 +7,7 @@
-
+
-
+
{{headerTitle}}
@@ -94,14 +94,6 @@
value: false,
},
- /**
- * Function to toggle panel visibility.
- */
- togglePanel: {
- type: Function,
- value: function() {},
- },
-
filter: {
type: String,
value: null,