Add docstring

This commit is contained in:
Jules 2024-06-01 20:39:37 +02:00
parent a952e3566f
commit c647e83c4c
Signed by: jdejaegh
GPG key ID: 99D6D184CA66933A
2 changed files with 3 additions and 0 deletions

View file

@ -141,6 +141,7 @@ class IrmKmiCoordinator(TimestampDataUpdateCoordinator):
return radar_animation
async def _async_pollen_data(self, api_data: dict) -> dict:
"""Get SVG pollen info from the API, return the pollen data dict"""
_LOGGER.debug("Getting pollen data from API")
svg_url = None
for module in api_data.get('module', []):
@ -324,6 +325,7 @@ class IrmKmiCoordinator(TimestampDataUpdateCoordinator):
@staticmethod
def radar_list_to_forecast(data: dict | None) -> List[IrmKmiRadarForecast] | None:
"""Create a list of short term forecasts for rain based on the data provided by the rain radar"""
if data is None:
return None
sequence = data.get("sequence", [])

View file

@ -69,6 +69,7 @@ class RainGraph:
self._dwg_still: Drawing = Drawing()
async def build(self) -> Self:
"""Build the rain graph by calling all the method in the right order. Returns self when done"""
await self.draw_svg_frame()
self.draw_hour_bars()
self.draw_chances_path()