mirror of
https://github.com/jdejaegh/irm-kmi-ha.git
synced 2025-06-27 11:39:26 +02:00
Add docstring
This commit is contained in:
parent
a952e3566f
commit
c647e83c4c
2 changed files with 3 additions and 0 deletions
|
@ -141,6 +141,7 @@ class IrmKmiCoordinator(TimestampDataUpdateCoordinator):
|
||||||
return radar_animation
|
return radar_animation
|
||||||
|
|
||||||
async def _async_pollen_data(self, api_data: dict) -> dict:
|
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")
|
_LOGGER.debug("Getting pollen data from API")
|
||||||
svg_url = None
|
svg_url = None
|
||||||
for module in api_data.get('module', []):
|
for module in api_data.get('module', []):
|
||||||
|
@ -324,6 +325,7 @@ class IrmKmiCoordinator(TimestampDataUpdateCoordinator):
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def radar_list_to_forecast(data: dict | None) -> List[IrmKmiRadarForecast] | None:
|
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:
|
if data is None:
|
||||||
return None
|
return None
|
||||||
sequence = data.get("sequence", [])
|
sequence = data.get("sequence", [])
|
||||||
|
|
|
@ -69,6 +69,7 @@ class RainGraph:
|
||||||
self._dwg_still: Drawing = Drawing()
|
self._dwg_still: Drawing = Drawing()
|
||||||
|
|
||||||
async def build(self) -> Self:
|
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()
|
await self.draw_svg_frame()
|
||||||
self.draw_hour_bars()
|
self.draw_hour_bars()
|
||||||
self.draw_chances_path()
|
self.draw_chances_path()
|
||||||
|
|
Loading…
Add table
Reference in a new issue