mirror of
https://github.com/mx42/home-assistant-ecocito.git
synced 2026-01-14 13:59:50 +01:00
feat: merge coordinators to have less duplicate code
This commit is contained in:
@@ -145,14 +145,6 @@ class EcocitoClient:
|
||||
ECOCITO_ERROR_FETCHING.format(exc=e, type="collection events")
|
||||
) from e
|
||||
|
||||
async def get_garbage_collections(self, year: int, type_id: int) -> list[CollectionEvent]:
|
||||
"""Return the list of the garbage collections for a year."""
|
||||
return await self.get_collection_events(str(type_id), year)
|
||||
|
||||
async def get_recycling_collections(self, year: int, type_id: int) -> list[CollectionEvent]:
|
||||
"""Return the list of the recycling collections for a year."""
|
||||
return await self.get_collection_events(str(type_id), year)
|
||||
|
||||
async def get_waste_depot_visits(self, year: int) -> list[WasteDepotVisit]:
|
||||
"""Return the list of the waste depot visits for a year."""
|
||||
async with aiohttp.ClientSession(cookie_jar=self._cookies) as session:
|
||||
|
||||
Reference in New Issue
Block a user