From 601ddb80be00c9263b93c1376d8fdb9f921fa283 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 5 Mar 2017 14:24:18 +0200 Subject: [PATCH 1/3] Refactor cover controls into a separate component. --- src/components/ha-cover-controls.html | 60 +++++++++++++++++++++++++ src/state-summary/state-card-cover.html | 44 +----------------- 2 files changed, 62 insertions(+), 42 deletions(-) create mode 100644 src/components/ha-cover-controls.html diff --git a/src/components/ha-cover-controls.html b/src/components/ha-cover-controls.html new file mode 100644 index 000000000000..f06f2c028ffb --- /dev/null +++ b/src/components/ha-cover-controls.html @@ -0,0 +1,60 @@ + + + + + + + + + + diff --git a/src/state-summary/state-card-cover.html b/src/state-summary/state-card-cover.html index ea8c047b0a01..38245f700073 100644 --- a/src/state-summary/state-card-cover.html +++ b/src/state-summary/state-card-cover.html @@ -6,7 +6,7 @@ - + @@ -60,27 +41,6 @@ stateObj: { type: Object, }, - - entityObj: { - type: Object, - computed: 'computeEntityObj(hass, stateObj)', - }, - }, - - computeEntityObj: function (hass, stateObj) { - return new window.CoverEntity(hass, stateObj); - }, - - onOpenTap: function () { - this.entityObj.openCover(); - }, - - onCloseTap: function () { - this.entityObj.closeCover(); - }, - - onStopTap: function () { - this.entityObj.stopCover(); }, }); From 0c0d8fe2f94810c3acc9dd63624d7ef660bf16ef Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 5 Mar 2017 14:27:24 +0200 Subject: [PATCH 2/3] Remove extra include --- src/state-summary/state-card-cover.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/state-summary/state-card-cover.html b/src/state-summary/state-card-cover.html index 38245f700073..07f691acf5b5 100644 --- a/src/state-summary/state-card-cover.html +++ b/src/state-summary/state-card-cover.html @@ -2,8 +2,6 @@ - - From 039748b4a73f7b8ffc59d89b98db18211e429ab7 Mon Sep 17 00:00:00 2001 From: Andrey Date: Sun, 5 Mar 2017 20:10:48 +0200 Subject: [PATCH 3/3] Remove unneeded css rules --- src/components/ha-cover-controls.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/components/ha-cover-controls.html b/src/components/ha-cover-controls.html index f06f2c028ffb..893f3160172b 100644 --- a/src/components/ha-cover-controls.html +++ b/src/components/ha-cover-controls.html @@ -7,9 +7,7 @@