Remove ES6 from web components
parent
19eb3fa193
commit
943e9b2899
|
@ -130,7 +130,7 @@ Polymer({
|
|||
},
|
||||
|
||||
imageChanged: function (newVal) {
|
||||
this.$.badge.style.backgroundImage = newVal ? `url(${newVal})` : '';
|
||||
this.$.badge.style.backgroundImage = newVal ? 'url(' + newVal + ')' : '';
|
||||
},
|
||||
});
|
||||
</script>
|
|
@ -68,15 +68,17 @@ Polymer({
|
|||
},
|
||||
},
|
||||
|
||||
viewTapped() {
|
||||
viewTapped: function () {
|
||||
this.fire('view-tapped');
|
||||
},
|
||||
|
||||
viewSelected(ev) {
|
||||
viewSelected: function (ev) {
|
||||
var view = ev.detail.item.getAttribute('data-entity') || null;
|
||||
var current = this.currentView || null;
|
||||
if (view !== current) {
|
||||
this.async(function () { this.hass.viewActions.selectView(view); }.bind(this), 0);
|
||||
this.async(function () {
|
||||
this.hass.viewActions.selectView(view);
|
||||
}.bind(this), 0);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
@ -81,7 +81,7 @@ Polymer({
|
|||
this.iconsLoaded = true;
|
||||
}.bind(this);
|
||||
|
||||
this.importHref(`/static/mdi-${this.icons}.html`,
|
||||
this.importHref('/static/mdi-' + this.icons + '.html',
|
||||
success,
|
||||
function () {
|
||||
this.importHref('/static/mdi.html', success, success);
|
||||
|
|
|
@ -39,8 +39,8 @@ Polymer({
|
|||
if (hass.demo) {
|
||||
return '/demo/webcam.jpg';
|
||||
} else if (stateObj) {
|
||||
return `/api/camera_proxy_stream/${stateObj.entityId}` +
|
||||
`?token=${stateObj.attributes.access_token}`;
|
||||
return '/api/camera_proxy_stream/' + stateObj.entityId +
|
||||
'?token=' + stateObj.attributes.access_token;
|
||||
}
|
||||
// Return an empty image if no stateObj (= dialog not open)
|
||||
return 'data:image/gif;base64,R0lGODlhAQABAAAAACw=';
|
||||
|
|
|
@ -69,7 +69,7 @@ Polymer({
|
|||
return;
|
||||
}
|
||||
this.hass.serviceActions.callService('input_select', 'select_option', {
|
||||
option,
|
||||
option: option,
|
||||
entity_id: this.stateObj.entityId,
|
||||
});
|
||||
},
|
||||
|
|
|
@ -16,7 +16,7 @@ window.hassBehavior = {
|
|||
var getter = this.properties[key].bindNuclear(hass);
|
||||
|
||||
if (!getter) {
|
||||
throw new Error(`Undefined getter specified for key ${key}`);
|
||||
throw new Error('Undefined getter specified for key ' + key);
|
||||
}
|
||||
|
||||
this[key] = hass.reactor.evaluate(getter);
|
||||
|
|
Loading…
Reference in New Issue