diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 1b8b949..d853b78 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -3,11 +3,16 @@ name: "Bug report" description: Create a report to help us improve labels: "bug" body: -- type: markdown +- type: checkboxes attributes: - value: | - Before you submit a new bug report, please check the [frequently asked questions and limitations](https://github.com/bruxy70/Garbage-Collection/wiki/Review-before-submitting-a-new-issue-or-feature-request). - Also, please search through the existing issues to see if others have had the same problem. + label: Before you submit a new bug report, please check that + options: + - label: I have read [frequently asked questions and limitations](https://github.com/bruxy70/Garbage-Collection/wiki/Review-before-submitting-a-new-issue-or-feature-request) + required: true + - label: I'm running the newest version of Garbage Collection, or the next pre-release. + required: true + - label: I have enabled debug logging for my installation. + required: true - type: textarea attributes: label: "Describe the bug" diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index c273915..a421091 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -3,11 +3,12 @@ name: "Feature request" description: Suggest an idea for this project labels: "enhancement" body: - - type: markdown + - type: checkboxes attributes: - value: | - Before you submit a new feature request, please check the [frequently asked questions and limitations](https://github.com/bruxy70/Garbage-Collection/wiki/Review-before-submitting-a-new-issue-or-feature-request). - Also, please search through the existing issues to see if others made the same suggestion. + label: Before you submit a new bug report, please check that + options: + - label: I have read [frequently asked questions and limitations](https://github.com/bruxy70/Garbage-Collection/wiki/Review-before-submitting-a-new-issue-or-feature-request) + required: true - type: textarea attributes: label: "Is your feature request related to a problem? Please describe." diff --git a/.github/ISSUE_TEMPLATE/question.yaml b/.github/ISSUE_TEMPLATE/question.yaml index 1aae7a6..3ba4ba2 100644 --- a/.github/ISSUE_TEMPLATE/question.yaml +++ b/.github/ISSUE_TEMPLATE/question.yaml @@ -3,11 +3,12 @@ name: "Question" description: I have a question, or need a help with the configuration of the integration or Lovelace labels: "question" body: - - type: markdown + - type: checkboxes attributes: - value: | - Before you submit a new question, please check the [frequently asked questions and limitations](https://github.com/bruxy70/Garbage-Collection/wiki/Review-before-submitting-a-new-issue-or-feature-request). - Also, please search through the existing issues to see if others made the same question. + label: Before you submit a new bug report, please check that + options: + - label: I have read [frequently asked questions and limitations](https://github.com/bruxy70/Garbage-Collection/wiki/Review-before-submitting-a-new-issue-or-feature-request) + required: true - type: textarea attributes: label: "Write your question here" diff --git a/custom_components/garbage_collection/sensor.py b/custom_components/garbage_collection/sensor.py index 0e0ddbb..4035904 100644 --- a/custom_components/garbage_collection/sensor.py +++ b/custom_components/garbage_collection/sensor.py @@ -7,7 +7,13 @@ import homeassistant.util.dt as dt_util from dateutil.parser import ParserError, parse from dateutil.relativedelta import relativedelta -from homeassistant.const import ATTR_HIDDEN, CONF_ENTITIES, CONF_NAME, WEEKDAYS +from homeassistant.const import ( + ATTR_DEVICE_CLASS, + ATTR_HIDDEN, + CONF_ENTITIES, + CONF_NAME, + WEEKDAYS, +) from homeassistant.helpers import device_registry as dr from homeassistant.helpers.discovery import async_load_platform from homeassistant.helpers.restore_state import RestoreEntity @@ -272,10 +278,12 @@ def extra_state_attributes(self): res[const.ATTR_DAYS] = self._days res[const.ATTR_LAST_COLLECTION] = self.last_collection res[const.ATTR_LAST_UPDATED] = self._last_updated + # Needed for translations to work + res[ATTR_DEVICE_CLASS] = self.DEVICE_CLASS return res @property - def DEVICE_CLASS(self): + def DEVICE_CLASS(self): # pylint: disable=C0103 """Return the class of the sensor.""" return const.DEVICE_CLASS diff --git a/custom_components/garbage_collection/translations/sensor.de.json b/custom_components/garbage_collection/translations/sensor.de.json index 30a9c90..c69923a 100644 --- a/custom_components/garbage_collection/translations/sensor.de.json +++ b/custom_components/garbage_collection/translations/sensor.de.json @@ -5,4 +5,4 @@ "tomorrow": "Morgen" } } -} +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.es.json b/custom_components/garbage_collection/translations/sensor.es.json index 4f6d390..a02a09f 100644 --- a/custom_components/garbage_collection/translations/sensor.es.json +++ b/custom_components/garbage_collection/translations/sensor.es.json @@ -5,4 +5,4 @@ "tomorrow": "MaƱana" } } -} +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.et.json b/custom_components/garbage_collection/translations/sensor.et.json index 0476600..dbec4c5 100644 --- a/custom_components/garbage_collection/translations/sensor.et.json +++ b/custom_components/garbage_collection/translations/sensor.et.json @@ -5,4 +5,4 @@ "tomorrow": "Homme" } } -} +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.fr.json b/custom_components/garbage_collection/translations/sensor.fr.json index a68d548..d385466 100644 --- a/custom_components/garbage_collection/translations/sensor.fr.json +++ b/custom_components/garbage_collection/translations/sensor.fr.json @@ -5,4 +5,4 @@ "tomorrow": "Demain" } } -} +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.it.json b/custom_components/garbage_collection/translations/sensor.it.json index cc91c5a..4864e4f 100644 --- a/custom_components/garbage_collection/translations/sensor.it.json +++ b/custom_components/garbage_collection/translations/sensor.it.json @@ -5,4 +5,4 @@ "tomorrow": "Domani" } } -} +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.nl.json b/custom_components/garbage_collection/translations/sensor.nl.json index 24635c0..79cec1e 100644 --- a/custom_components/garbage_collection/translations/sensor.nl.json +++ b/custom_components/garbage_collection/translations/sensor.nl.json @@ -5,4 +5,4 @@ "tomorrow": "Morgen" } } -} +} \ No newline at end of file diff --git a/custom_components/garbage_collection/translations/sensor.pl.json b/custom_components/garbage_collection/translations/sensor.pl.json index 91ca824..dbc7007 100644 --- a/custom_components/garbage_collection/translations/sensor.pl.json +++ b/custom_components/garbage_collection/translations/sensor.pl.json @@ -5,4 +5,4 @@ "tomorrow": "Jutro" } } -} +} \ No newline at end of file