From b1f343bc76540c390d1898ac665be3a90648835f Mon Sep 17 00:00:00 2001 From: Bram van Dartel Date: Wed, 9 Dec 2020 11:22:24 +0100 Subject: [PATCH] migrate from datetime to date only --- custom_components/afvalwijzer/sensor_custom.py | 4 ++-- custom_components/afvalwijzer/sensor_provider.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/custom_components/afvalwijzer/sensor_custom.py b/custom_components/afvalwijzer/sensor_custom.py index a67785d..53c80d0 100755 --- a/custom_components/afvalwijzer/sensor_custom.py +++ b/custom_components/afvalwijzer/sensor_custom.py @@ -79,10 +79,10 @@ async def async_update(self): _LOGGER.debug( "Generating state via AfvalwijzerCustomSensor for = %s with value %s", self.waste_type, - waste_data_custom[self.waste_type].date(), + waste_data_custom[self.waste_type], ) # Add the US date format - collection_date_us = waste_data_custom[self.waste_type].date() + collection_date_us = waste_data_custom[self.waste_type] self._year_month_day_date = str(collection_date_us) # Add the NL date format as default state diff --git a/custom_components/afvalwijzer/sensor_provider.py b/custom_components/afvalwijzer/sensor_provider.py index fe1d5e0..bdedb99 100755 --- a/custom_components/afvalwijzer/sensor_provider.py +++ b/custom_components/afvalwijzer/sensor_provider.py @@ -92,10 +92,10 @@ async def async_update(self): _LOGGER.debug( "Generating state via AfvalwijzerCustomSensor for = %s with value %s", self.waste_type, - waste_data_provider[self.waste_type].date(), + waste_data_provider[self.waste_type], ) # Add the US date format - collection_date_us = waste_data_provider[self.waste_type].date() + collection_date_us = waste_data_provider[self.waste_type] self._year_month_day_date = str(collection_date_us) # Add the days until the collection date