mirror of
https://github.com/home-assistant/developers.home-assistant.git
synced 2025-07-14 04:46:29 +00:00
Standardization for weather components (#12)
* Create component_weather.md also have to link it somewhere "breaking" changes: - datetime to UNIX timestamp - pressure -> air_pressure - wind_bearing now in letters only * Update component_weather.md * Update component_weather.md * Use correct template * Update entity_weather.md
This commit is contained in:
parent
0500de2d9e
commit
1902984dc7
53
docs/entity_weather.md
Normal file
53
docs/entity_weather.md
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
title: Weather Entity
|
||||||
|
sidebar_label: Weather
|
||||||
|
---
|
||||||
|
|
||||||
|
## Properties
|
||||||
|
|
||||||
|
> Properties should always only return information from memory and not do I/O (like network requests). Implement `update()` or `async_update()` to fetch data.
|
||||||
|
|
||||||
|
| Name | Type | Default | Description
|
||||||
|
| ---- | ---- | ------- | -----------
|
||||||
|
| state | string | **Required** | The current weather condition.
|
||||||
|
| temperature | float | **Required** | The current temperature in °C or °F.
|
||||||
|
| air_pressure | float | `None` | The current air pressure in hPa.
|
||||||
|
| humidity | float | `None` | The current humidity in %.
|
||||||
|
| visibility | float | `None` | The current visibility in km or mi.
|
||||||
|
| wind_speed | float | `None` | The current wind speed in km/h or mi/h.
|
||||||
|
| wind_bearing | string | `None` | The current wind bearing, 1-3 letters.
|
||||||
|
| forecast | array | `None` | Daily or Hourly forecast data.
|
||||||
|
| attribution | string | `None` | The branding text required by the API provider.
|
||||||
|
|
||||||
|
Properties have to follow the units defined in the `unit_system`.
|
||||||
|
|
||||||
|
### Forecast
|
||||||
|
|
||||||
|
Forecast data should either be daily or hourly.
|
||||||
|
|
||||||
|
| Name | Type | Default | Description
|
||||||
|
| ---- | ---- | ------- | -----------
|
||||||
|
| datetime | string | **Required** | UTC Date time in RFC 3339 format.
|
||||||
|
| temperature | float | **Required** | The higher temperature in °C or °F
|
||||||
|
| condition | string | `None` | The weather condition at this point.
|
||||||
|
| templow | float | `None` | The lower daily Temperature in °C or °F
|
||||||
|
|
||||||
|
### Recommended values for state and condition
|
||||||
|
|
||||||
|
These weather conditions are included in our translation files and also show the corresponding icon.
|
||||||
|
|
||||||
|
| Condition | Description
|
||||||
|
| --------- | -----------
|
||||||
|
| clear-night | Clear night
|
||||||
|
| cloudy | Many clouds
|
||||||
|
| fog | Fog
|
||||||
|
| lightning | Lightning/ thunderstorms
|
||||||
|
| lightning-rainy | Lightning/ thunderstorms and rain
|
||||||
|
| partlycloudy | A few clouds
|
||||||
|
| pouring | Pouring rain
|
||||||
|
| rainy | Rain
|
||||||
|
| snowy | Snow
|
||||||
|
| snowy-rainy | Snow and Rain
|
||||||
|
| sunny | Sunshine
|
||||||
|
| windy | Wind
|
||||||
|
| windy-variant | Wind and clouds
|
@ -10,7 +10,8 @@
|
|||||||
"entity_index",
|
"entity_index",
|
||||||
"entity_binary_sensor",
|
"entity_binary_sensor",
|
||||||
"entity_sensor",
|
"entity_sensor",
|
||||||
"entity_switch"
|
"entity_switch",
|
||||||
|
"entity_weather"
|
||||||
],
|
],
|
||||||
"Configuration.yaml": [
|
"Configuration.yaml": [
|
||||||
"configuration_yaml_index"
|
"configuration_yaml_index"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user