From e70ae869448911d5f85cb132b2ad8e464a4e6486 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franciszek=20Wide=C5=82?= Date: Tue, 31 Oct 2023 14:44:49 +0100 Subject: [PATCH 1/4] Allow setup arrow up/down icon --- src/bubble-card.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/bubble-card.js b/src/bubble-card.js index 9209f1c..d5aab97 100644 --- a/src/bubble-card.js +++ b/src/bubble-card.js @@ -1620,6 +1620,8 @@ class BubbleCard extends HTMLElement { const openCover = !this.config.open_service ? 'cover.open_cover' : this.config.open_service; const closeCover = !this.config.close_service ? 'cover.close_cover' : this.config.close_service; const stopCover = !this.config.stop_service ? 'cover.stop_cover' : this.config.stop_service; + const iconUp = this.config.icon_up ? this.config.icon_up : "mdi:arrow-up", + const iconDown = this.config.icon_down ? this.config.icon_down : "mdi:arrow-down"; icon = hass.states[this.config.entity].state === 'open' ? iconOpen : iconClosed; formatedState = this.config.entity ? hass.formatEntityState(hass.states[this.config.entity]) : ''; @@ -1961,6 +1963,14 @@ class BubbleCardEditor extends LitElement { return this._config.icon_close || ''; } + get _icon_down() { + return this._config.icon_down || ''; + } + + get _icon_up() { + return this._config.icon_up || ''; + } + get _open_service() { return this._config.open_service || 'cover.open_cover'; } @@ -2402,6 +2412,8 @@ class BubbleCardEditor extends LitElement { > ${this.makeDropdown("Optional - Open icon", "icon_open")} ${this.makeDropdown("Optional - Closed icon", "icon_close")} + ${this.makeDropdown("Optional - Arrow down icon", "icon_down")} + ${this.makeDropdown("Optional - Arrow up icon", "icon_up")} ${this.makeVersion()} `; From bd42e4fff05eea70787681e7634d9de23d24e34a Mon Sep 17 00:00:00 2001 From: tj Date: Thu, 2 Nov 2023 21:09:33 +0100 Subject: [PATCH 2/4] semicolon fix --- src/bubble-card.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bubble-card.js b/src/bubble-card.js index d5aab97..1fc0e89 100644 --- a/src/bubble-card.js +++ b/src/bubble-card.js @@ -1620,7 +1620,7 @@ class BubbleCard extends HTMLElement { const openCover = !this.config.open_service ? 'cover.open_cover' : this.config.open_service; const closeCover = !this.config.close_service ? 'cover.close_cover' : this.config.close_service; const stopCover = !this.config.stop_service ? 'cover.stop_cover' : this.config.stop_service; - const iconUp = this.config.icon_up ? this.config.icon_up : "mdi:arrow-up", + const iconUp = this.config.icon_up ? this.config.icon_up : "mdi:arrow-up"; const iconDown = this.config.icon_down ? this.config.icon_down : "mdi:arrow-down"; icon = hass.states[this.config.entity].state === 'open' ? iconOpen : iconClosed; formatedState = this.config.entity ? hass.formatEntityState(hass.states[this.config.entity]) : ''; From 950dba57c36d3c1fa11fd7f472d2857f19986591 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Franciszek=20Wide=C5=82?= Date: Fri, 3 Nov 2023 13:52:47 +0100 Subject: [PATCH 3/4] fix --- src/bubble-card.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bubble-card.js b/src/bubble-card.js index 1fc0e89..f4c32e8 100644 --- a/src/bubble-card.js +++ b/src/bubble-card.js @@ -1649,13 +1649,13 @@ class BubbleCard extends HTMLElement {
` From 809e8ce6a992e5753cb72daab04f8c56349bc217 Mon Sep 17 00:00:00 2001 From: tj Date: Sat, 18 Nov 2023 10:32:01 +0100 Subject: [PATCH 4/4] documentation update --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index e4cb779..9ff72a8 100644 --- a/README.md +++ b/README.md @@ -273,6 +273,8 @@ This card allows you to control your covers. | `name` | string | Optional | Any string | A name for your cover, if not defined it will display the entity name | | `icon_open` | string | Optional | Any `mdi:` icon | An icon for your open cover, if not defined it will display the default open cover icon | | `icon_close` | string | Optional | Any `mdi:` icon | An icon for your closed cover, if not defined it will display the default closed cover icon | +| `icon_up` | string | Optional | Any `mdi:` icon | An icon for your open cover button, if not defined it will display the default open cover icon | +| `icon_down` | string | Optional | Any `mdi:` icon | An icon for your close cover button, if not defined it will display the default close cover icon | | `open_service` | string | Optional | Any service or script | A service to open your cover, default to `cover.open_cover` | | `stop_service` | string | Optional | Any service or script | A service to stop your cover, default to `cover.stop_cover` | | `close_service` | string | Optional | Any service or script | A service to close your cover, default to `cover.close_cover` |