From c97892d105579337967329ac6cfad809f994f7a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= Date: Fri, 21 Jun 2024 09:01:01 +0200 Subject: [PATCH] interface: get_towns: API now provides separate data MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Álvaro Fernández Rojas --- aemet_opendata/interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/aemet_opendata/interface.py b/aemet_opendata/interface.py index 37f0b7c..4ec2e16 100644 --- a/aemet_opendata/interface.py +++ b/aemet_opendata/interface.py @@ -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."""