Skip to content

Commit

Permalink
Fix: Ku-Ring_gai (#2851)
Browse files Browse the repository at this point in the history
* icon map and round dicts updated

* api response means ROUNDS dict no longer needed
  • Loading branch information
dt215git authored Oct 18, 2024
1 parent 56d9db0 commit 0f59477
Showing 1 changed file with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,11 @@
}

ICON_MAP = {
"GeneralWaste": "mdi:trash-can",
"General Waste": "mdi:trash-can",
"Recycling": "mdi:recycle",
"GreenWaste": "mdi:leaf",
"Green Waste": "mdi:leaf",
}

ROUNDS = {
"GeneralWaste": "General Waste",
"Recycling": "Recycling",
"GreenWaste": "Green Waste",
}

# _LOGGER = logging.getLogger(__name__)


class Source:
def __init__(
Expand Down Expand Up @@ -133,10 +125,7 @@ def fetch(self):
entries.append(
Collection(
date=date,
# t=waste_type, # api returns GeneralWaste, Recycling, GreenWaste
t=ROUNDS.get(
waste_type
), # returns user-friendly General Waste, Recycling, Green Waste
t=waste_type,
icon=ICON_MAP.get(waste_type),
)
)
Expand Down

0 comments on commit 0f59477

Please sign in to comment.