Ejemplo n.º 1
0
 def _get_storm_prob(day_data, hour):
     """Get storm probability from weather data."""
     val = get_forecast_interval_value(
         day_data[AEMET_ATTR_STORM_PROBABILITY], hour)
     if val:
         return format_int(val)
     return None
Ejemplo n.º 2
0
 def _get_rain_prob(day_data, hour):
     """Get rain probability from weather data."""
     val = get_forecast_interval_value(
         day_data[AEMET_ATTR_PRECIPITATION_PROBABILITY], hour)
     if val:
         return format_int(val)
     return None