From 9680629d008d1b34f7b58d6f8ad291bd1cd8cc30 Mon Sep 17 00:00:00 2001 From: Marijn Giesen Date: Tue, 10 Dec 2019 09:47:31 +0100 Subject: [PATCH 1/2] Remove whitespace in state --- custom_components/afvalwijzer/sensor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/afvalwijzer/sensor.py b/custom_components/afvalwijzer/sensor.py index 55e8b96..7df5cf0 100644 --- a/custom_components/afvalwijzer/sensor.py +++ b/custom_components/afvalwijzer/sensor.py @@ -139,7 +139,7 @@ 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'] + self._state = item['value'].strip() class TrashCollectionSchedule(object): From ce5d7b349e80063cc5e0de59c6853be5ca55f3d6 Mon Sep 17 00:00:00 2001 From: Bram van Dartel Date: Tue, 10 Dec 2019 10:00:21 +0100 Subject: [PATCH 2/2] Update sensor.py --- custom_components/afvalwijzer/sensor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/custom_components/afvalwijzer/sensor.py b/custom_components/afvalwijzer/sensor.py index 7df5cf0..42ce81d 100644 --- a/custom_components/afvalwijzer/sensor.py +++ b/custom_components/afvalwijzer/sensor.py @@ -1,6 +1,6 @@ """ @ Authors : Bram van Dartel -@ Date : 28/04/2019 +@ Date : 10/12/2019 @ Description : Afvalwijzer Json/Scraper Sensor - It queries mijnafvalwijzer.nl or afvalstoffendienstkalender.nl. sensor: @@ -19,9 +19,10 @@ 25-03-2019 - Remove Python 3.7.x f-strings, back to old format for beteer compatibility 26-04-2019 - Make compatible with hass 0.92 22-09-2019 - Add bs4 as a requirement in manifest.json (for hassio) +10-12-2019 - Fix whitespace bug """ -VERSION = '3.0.10' +VERSION = '3.0.11' import logging from datetime import date, datetime, timedelta