Skip to content

Commit

Permalink
Fixed bug introduced with pull request 28
Browse files Browse the repository at this point in the history
  • Loading branch information
marijngiesen committed Dec 10, 2019
1 parent ce5d7b3 commit 3305fb8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions custom_components/afvalwijzer/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def update(self):
for item in self.data.data:
logger.debug("Update called for item: {}".format(item))
if item['key'] == self._name:
self._state = item['value'].strip()

self._state = item['value']


class TrashCollectionSchedule(object):
Expand Down Expand Up @@ -206,15 +207,15 @@ def days(start, end):
trashSchedule.append(trashToday)
multiTrashToday.append(item['nameType'])
if len(multiTrashToday) != 0:
trashToday['value'] = ', '.join(multiTrashToday)
trashToday['value'] = ', '.join(multiTrashToday).strip()

if item['date'] == tomorrow:
trashType[name] = "tomorrow"
trashTomorrow['key'] = "tomorrow"
trashSchedule.append(trashTomorrow)
multiTrashTomorrow.append(item['nameType'])
if len(multiTrashTomorrow) != 0:
trashTomorrow['value'] = ', '.join(multiTrashTomorrow)
trashTomorrow['value'] = ', '.join(multiTrashTomorrow).strip()

# Setup scraper request
url = self._config.get(CONST_URL)
Expand Down

0 comments on commit 3305fb8

Please sign in to comment.