Skip to content

Commit

Permalink
migrate from datetime to date only
Browse files Browse the repository at this point in the history
  • Loading branch information
Bram van Dartel committed Dec 9, 2020
1 parent 2048d93 commit b1f343b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions custom_components/afvalwijzer/sensor_custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions custom_components/afvalwijzer/sensor_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b1f343b

Please sign in to comment.