mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-28 03:37:06 +00:00
OpenWeatherMap config_flow documentation (#13318)
This commit is contained in:
parent
89557e224f
commit
8b9755c9fe
@ -1,13 +1,15 @@
|
|||||||
---
|
---
|
||||||
title: Openweathermap
|
title: Openweathermap
|
||||||
description: Instructions on how to integrate OpenWeatherMap within Home Assistant.
|
description: Instructions on how to integrate OpenWeatherMap within Home Assistant.
|
||||||
|
ha_release: 0.32
|
||||||
ha_category:
|
ha_category:
|
||||||
- Weather
|
- Weather
|
||||||
- Sensor
|
- Sensor
|
||||||
ha_release: 0.32
|
|
||||||
ha_iot_class: Cloud Polling
|
ha_iot_class: Cloud Polling
|
||||||
|
ha_config_flow: true
|
||||||
ha_codeowners:
|
ha_codeowners:
|
||||||
- '@fabaff'
|
- '@fabaff'
|
||||||
|
- '@freekode'
|
||||||
ha_domain: openweathermap
|
ha_domain: openweathermap
|
||||||
---
|
---
|
||||||
|
|
||||||
@ -15,115 +17,52 @@ The `openweathermap` weather platform uses [OpenWeatherMap](https://openweatherm
|
|||||||
|
|
||||||
There is currently support for the following device types within Home Assistant:
|
There is currently support for the following device types within Home Assistant:
|
||||||
|
|
||||||
- [Sensor](#sensor)
|
- Sensor
|
||||||
- [Weather](#weather)
|
- Weather
|
||||||
|
|
||||||
You need an API key, which is free, but requires a [registration](https://home.openweathermap.org/users/sign_up).
|
You need an API key, which is free, but requires a [registration](https://home.openweathermap.org/users/sign_up).
|
||||||
|
|
||||||
## Weather
|
## Configuration
|
||||||
|
|
||||||
To add OpenWeatherMap to your installation, add the following to your `configuration.yaml` file:
|
To add OpenWeatherMap integration go to **Configuration** >> **Integrations** and find the integration in the list.
|
||||||
|
|
||||||
```yaml
|
| Parameter | Value |
|
||||||
# Example configuration.yaml entry
|
| :------------------- | :---------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
weather:
|
| API Key | API Key from the website |
|
||||||
- platform: openweathermap
|
| Name | Name of the integration |
|
||||||
api_key: YOUR_API_KEY
|
| Latitude | Latitude for weather forecast and sensor |
|
||||||
```
|
| Longitude | Longitude for weather forecast and sensor |
|
||||||
|
| Mode | Forecast mode, `hourly` for a three-hour forecast, `daily` for daily forecast, or `freedaily` for a five-day forecast with the free tier. |
|
||||||
|
| Language | Language for receiving data (only for `sensor`) |
|
||||||
|
|
||||||
{% configuration %}
|
The integration creates weather entity and also sensors for all available conditions.
|
||||||
api_key:
|
|
||||||
description: Your API key for [OpenWeatherMap](https://openweathermap.org/).
|
For each condition `sensor` entity will be created with id:
|
||||||
required: true
|
|
||||||
type: string
|
`sensor.<integration name>_<monitored condition>`
|
||||||
name:
|
|
||||||
description: Name to use in the frontend.
|
Sensor prints information in language which was selected for integration.
|
||||||
required: false
|
|
||||||
type: string
|
All conditions:
|
||||||
default: OpenWeatherMap
|
|
||||||
mode:
|
| Condition | Description |
|
||||||
description: "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."
|
| :----------- | :------------------------------------- |
|
||||||
required: false
|
| `weather` | A human-readable text summary. |
|
||||||
type: string
|
| `temperature` | Current temperature. |
|
||||||
default: "`hourly`"
|
| `wind_speed` | Wind speed. |
|
||||||
latitude:
|
| `wind_bearing` | Wind bearing. |
|
||||||
description: Latitude of the location to display the weather.
|
| `humidity` | Relative humidity. |
|
||||||
required: false
|
| `pressure` | Sea-level air pressure in millibars. |
|
||||||
type: float
|
| `clouds` | Description of cloud coverage. |
|
||||||
default: "The latitude in your `configuration.yaml` file."
|
| `rain` | Rain volume. |
|
||||||
longitude:
|
| `snow` | Snow volume. |
|
||||||
description: Longitude of the location to display the weather.
|
| `condition` | Current weather condition code. |
|
||||||
required: false
|
| `weather_code` | Current weather code. |
|
||||||
type: float
|
|
||||||
default: "The longitude in your `configuration.yaml` file."
|
|
||||||
{% endconfiguration %}
|
|
||||||
|
|
||||||
<div class='note'>
|
<div class='note'>
|
||||||
|
|
||||||
This platform is an alternative to the [`openweathermap`](/integrations/openweathermap#sensor) sensor.
|
Weather entity always will have English language. Home Assistant translate it to user language automatically.
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
## Sensor
|
|
||||||
|
|
||||||
The `openweathermap` platform uses [OpenWeatherMap](https://openweathermap.org/) 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:
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
# Example configuration.yaml entry
|
|
||||||
sensor:
|
|
||||||
- platform: openweathermap
|
|
||||||
api_key: YOUR_API_KEY
|
|
||||||
monitored_conditions:
|
|
||||||
- weather
|
|
||||||
```
|
|
||||||
|
|
||||||
{% configuration %}
|
|
||||||
api_key:
|
|
||||||
description: Your API key for OpenWeatherMap.
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
name:
|
|
||||||
description: Additional name for the sensors. Default to platform name.
|
|
||||||
required: false
|
|
||||||
default: OWM
|
|
||||||
type: string
|
|
||||||
forecast:
|
|
||||||
description: Enables the forecast. The default is to display the current conditions.
|
|
||||||
required: false
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
language:
|
|
||||||
description: The language in which you want text results to be returned. It's a two-characters string (e.g., `en`, `es`, `ru`, `it`, etc.).
|
|
||||||
required: false
|
|
||||||
default: en
|
|
||||||
type: string
|
|
||||||
monitored_conditions:
|
|
||||||
description: Conditions to display in the frontend.
|
|
||||||
required: true
|
|
||||||
type: list
|
|
||||||
keys:
|
|
||||||
weather:
|
|
||||||
description: A human-readable text summary.
|
|
||||||
temperature:
|
|
||||||
description: Current temperature.
|
|
||||||
wind_speed:
|
|
||||||
description: Wind speed.
|
|
||||||
wind_bearing:
|
|
||||||
description: Wind bearing.
|
|
||||||
humidity:
|
|
||||||
description: Relative humidity.
|
|
||||||
pressure:
|
|
||||||
description: Sea-level air pressure in millibars.
|
|
||||||
clouds:
|
|
||||||
description: Description of cloud coverage.
|
|
||||||
rain:
|
|
||||||
description: Rain volume.
|
|
||||||
snow:
|
|
||||||
description: Snow volume.
|
|
||||||
weather_code:
|
|
||||||
description: Current weather condition code.
|
|
||||||
{% endconfiguration %}
|
|
||||||
|
|
||||||
Details about the API are available in the [OpenWeatherMap documentation](https://openweathermap.org/api).
|
Details about the API are available in the [OpenWeatherMap documentation](https://openweathermap.org/api).
|
||||||
|
Loading…
x
Reference in New Issue
Block a user