docs: def get_weather(self, time, max_hour=6):
          """Get the current weather data from met.no."""
          if self.data is None:
              return {}
  
          ordered_entries = []
          for time_entry in self.data['product']['time']:
              valid_from = parse_datetime(time_entry['@from'])
              valid_to = parse_datetime(time_entry['@to'])
              if time > valid_to:
                  # Has already passed. Never select this.
                  continue
  
              average_dist = (abs((valid_to - time).total_seconds()) +
                              abs((valid_from - time).total_seconds()))
  
              if average_dist > max_hour * 3600:
                  continue
  
              ordered_entries.append((average_dist, time_entry))
  
          if not ordered_entries:
              return {}
          ordered_entries.sort(key=lambda item: item[0])
          res = dict()
          res['datetime'] = time
          res['temperature'] = get_data('temperature', ordered_entries)
          res['condition'] = CONDITIONS.get(get_data('symbol', ordered_entries))
          res['pressure'] = get_data('pressure', ordered_entries)
          res['humidity'] = get_data('humidity', ordered_entries)
          res['wind_speed'] = get_data('windSpeed', ordered_entries)
          res['wind_bearing'] = get_data('windDirection', ordered_entries)
          return res