diff --git a/README.md b/README.md index 802b538..17d32a1 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Garbage collection cards supports some languages and displays the date informati When garbage-collection sensors are used with verbose_state=True, hide_date and hide_days will be discarded, taking the information from the sensor's verbose_format. -When garbage collection is planned for today or tomorrow, clicking on the icon you can acknowledge that the +When garbage collection is planned for today or tomorrow, clicking on the card you can acknowledge that the garbage was prepared or collected and the card will become hidden. Please add the card to the resources in configuration.yaml: diff --git a/dist/garbage-collection-card.js b/dist/garbage-collection-card.js index 3357dc9..4eeb586 100644 --- a/dist/garbage-collection-card.js +++ b/dist/garbage-collection-card.js @@ -126,6 +126,7 @@ class GarbageCollectionCard extends HTMLElement { const cardConfig = Object.assign({}, config); const card = document.createElement('ha-card'); + card.id = "ha_card"; this.content = document.createElement('div'); const style = document.createElement('style'); let icon_size = config.icon_size; @@ -213,7 +214,7 @@ class GarbageCollectionCard extends HTMLElement { root.getElementById('ha_icon').icon = attributes[0].icon; root.getElementById('ha_icon').className = attributes[0].alerted; if ( parseInt(attributes[0].days) < 2 ) { - root.getElementById('ha_icon').addEventListener('click', this._ackGarbageOut.bind(this)); + root.getElementById('ha_card').addEventListener('click', this._ackGarbageOut.bind(this)); } root.getElementById('friendly_name').innerHTML = attributes[0].friendly_name; diff --git a/info.md b/info.md index 802b538..17d32a1 100644 --- a/info.md +++ b/info.md @@ -35,7 +35,7 @@ Garbage collection cards supports some languages and displays the date informati When garbage-collection sensors are used with verbose_state=True, hide_date and hide_days will be discarded, taking the information from the sensor's verbose_format. -When garbage collection is planned for today or tomorrow, clicking on the icon you can acknowledge that the +When garbage collection is planned for today or tomorrow, clicking on the card you can acknowledge that the garbage was prepared or collected and the card will become hidden. Please add the card to the resources in configuration.yaml: diff --git a/tracker.json b/tracker.json index 04e22b3..b0ceabf 100644 --- a/tracker.json +++ b/tracker.json @@ -1,8 +1,8 @@ { "garbage-collection-card": { - "version": "1.7.1", - "updated_at": "2020-08-30", + "version": "1.8.0", + "updated_at": "2020-09-07", "visit_repo": "https://github.com/amaximus/garbage-collection-card", - "changelog": "https://github.com/amaximus/garbage-collection0card/releases/1.7.1" + "changelog": "https://github.com/amaximus/garbage-collection0card/releases/1.8.0" } }