Initial getting rid of HA-JS (#180)

Getting rid of HA-JS
This commit is contained in:
Paulus Schoutsen
2017-01-29 18:34:45 -08:00
committed by GitHub
parent 2f71369dae
commit a1057681f1
70 changed files with 1965 additions and 1085 deletions
+9 -11
View File
@@ -8,7 +8,6 @@
<link rel="import" href="../../bower_components/app-layout/app-toolbar/app-toolbar.html">
<link rel="import" href="../../src/components/ha-menu-button.html">
<link rel="import" href="../../src/util/hass-behavior.html">
<link rel="import" href="../../src/resources/ha-style.html">
<dom-module id="ha-panel-dev-template">
@@ -93,8 +92,6 @@
Polymer({
is: 'ha-panel-dev-template',
behaviors: [window.hassBehavior],
properties: {
hass: {
type: Object,
@@ -170,14 +167,15 @@ Polymer({
renderTemplate: function () {
this.rendering = true;
this.hass.templateActions.render(this.template).then(function (processed) {
this.processed = processed;
this.rendering = false;
}.bind(this), function (error) {
this.processed = error.message;
this.error = true;
this.rendering = false;
}.bind(this));
this.hass.callApi('POST', 'template', { template: this.template })
.then(function (processed) {
this.processed = processed;
this.rendering = false;
}.bind(this), function (error) {
this.processed = error.message;
this.error = true;
this.rendering = false;
}.bind(this));
},
});
</script>