Skip to content

Commit

Permalink
Merge pull request #26 from joemcc-90/dev
Browse files Browse the repository at this point in the history
small fixes
  • Loading branch information
joemcc-90 authored Oct 31, 2024
2 parents b56ded2 + a657232 commit 5f9eb88
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion custom_components/leeds_bins/leeds_bins_data_.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def find_nearest_date(rows, color):

for row in matching_rows:
row_date = datetime.strptime(row[2], "%d/%m/%y")
if row_date < current_date:
if row_date < current_date.replace(hour=0, minute=0, second=0, microsecond=0):
continue

time_difference = abs(current_date - row_date)
Expand Down
2 changes: 1 addition & 1 deletion custom_components/leeds_bins/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"issue_tracker": "https://github.com/joemcc-90/leeds-bins-hass/issues",
"requirements": [],
"ssdp": [],
"version": "20241028.01",
"version": "20241031.01",
"zeroconf": []
}
2 changes: 1 addition & 1 deletion custom_components/leeds_bins/sensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ def calculate_state_and_days(self):

def get_closest_date(self, data):
_LOGGER.debug("Getting next bin day with data - %s", data)
today = datetime.today()
today = datetime.today().replace(hour=0, minute=0, second=0, microsecond=0)
closest_key = None
smallest_difference = None

Expand Down

0 comments on commit 5f9eb88

Please sign in to comment.