Skip to content

Commit

Permalink
interface: get_towns: API now provides separate data
Browse files Browse the repository at this point in the history
Signed-off-by: Álvaro Fernández Rojas <[email protected]>
  • Loading branch information
Noltari committed Jun 21, 2024
1 parent f7fbda8 commit c97892d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions aemet_opendata/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,9 +365,9 @@ async def get_town_by_coordinates(
town[ATTR_DISTANCE] = distance
return town

async def get_towns(self) -> dict[str, Any]:
async def get_towns(self, fetch_data: bool = True) -> dict[str, Any]:
"""Get information about towns."""
return await self.api_call("maestro/municipios")
return await self.api_call("maestro/municipios", fetch_data)

async def select_coordinates(self, latitude: float, longitude: float) -> None:
"""Select town and station based on provided coordinates."""
Expand Down

0 comments on commit c97892d

Please sign in to comment.