Skip to content

Commit

Permalink
Merge pull request #346 from bruxy70/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
bruxy70 authored Feb 9, 2022
2 parents 2871ec3 + 6168d22 commit ed464cc
Show file tree
Hide file tree
Showing 11 changed files with 36 additions and 21 deletions.
13 changes: 9 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
9 changes: 5 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
9 changes: 5 additions & 4 deletions .github/ISSUE_TEMPLATE/question.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 10 additions & 2 deletions custom_components/garbage_collection/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"tomorrow": "Morgen"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"tomorrow": "Mañana"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"tomorrow": "Homme"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"tomorrow": "Demain"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"tomorrow": "Domani"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"tomorrow": "Morgen"
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"tomorrow": "Jutro"
}
}
}
}

0 comments on commit ed464cc

Please sign in to comment.