Openweathermap


The openweathermap weather platform uses OpenWeatherMap as a source for current meteorological data for your location.

There is currently support for the following device types within Home Assistant:

You need an API key, which is free, but requires a registration.

Weather

To add OpenWeatherMap to your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
weather:
  - platform: openweathermap
    api_key: YOUR_API_KEY

Configuration Variables

api_keystringRequired

Your API key for OpenWeatherMap.

namestring(Optional, default: OpenWeatherMap)

Name to use in the frontend.

modestring(Optional, default: hourly)

Can specify hourly, daily, or freedaily. Select hourly for a three-hour forecast, daily for daily forecast, or freedaily for a five-day forecast with the free tier.

latitudefloat(Optional)

Latitude of the location to display the weather.

Default:

The latitude in your configuration.yaml file.

longitudefloat(Optional)

Longitude of the location to display the weather.

Default:

The longitude in your configuration.yaml file.

This platform is an alternative to the openweathermap sensor.

Sensor

The openweathermap platform uses OpenWeatherMap as a source for current meteorological data for your location. The forecast will show you the condition in 3h.

To include OpenWeatherMap sensor to your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
sensor:
  - platform: openweathermap
    api_key: YOUR_API_KEY
    monitored_conditions:
      - weather

Configuration Variables

api_keystringRequired

Your API key for OpenWeatherMap.

namestring(Optional, default: OWM)

Additional name for the sensors. Default to platform name.

forecastboolean(Optional, default: false)

Enables the forecast. The default is to display the current conditions.

languagestring(Optional, default: en)

The language in which you want text results to be returned. It’s a two-characters string (e.g., en, es, ru, it, etc.).

monitored_conditionslistRequired

Conditions to display in the frontend.

weather

A human-readable text summary.

temperature

Current temperature.

wind_speed

Wind speed.

wind_bearing

Wind bearing.

humidity

Relative humidity.

pressure

Sea-level air pressure in millibars.

clouds

Description of cloud coverage.

rain

Rain volume.

snow

Snow volume.

weather_code

Current weather condition code.

Details about the API are available in the OpenWeatherMap documentation.