mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-21 00:06:51 +00:00
Fix configuration formatting of zamg sensor and weather component (#6686)
* Fix formatting of zamg configuration * Fix formatting of zamg weather configuration * Fix formatting of yahoo weather sensor configuration * Add type * Add type * Add default values * Add default values * Fix types and add default values * Fix problem * Fix wrong default value * Fix typo
This commit is contained in:
parent
6326dbfc00
commit
18dd481a9e
@ -20,7 +20,7 @@ The `yweather` platform uses [Yahoo Weather](https://www.yahoo.com/news/weather/
|
|||||||
Use of the Yahoo Weather API should not exceed reasonable request volume. Access is limited to 2000 signed calls per day.
|
Use of the Yahoo Weather API should not exceed reasonable request volume. Access is limited to 2000 signed calls per day.
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
The `woeid` (Where On Earth ID) for your location, as shown in the example below. You can find your WOEID by copying the numeric digits at the end of the URL for your location at [Yahoo Weather](https://www.yahoo.com/news/weather/). If you don't add a WOEID it generate it from Home Assistant's latitude and longitude.
|
The `woeid` (Where On Earth ID) for your location, as shown in the example below. You can find your WOEID by copying the numeric digits at the end of the URL for your location at [Yahoo Weather](https://www.yahoo.com/news/weather/). If you don't add a WOEID it is generated from Home Assistant's latitude and longitude.
|
||||||
|
|
||||||
To add Yahoo Weather to your installation, add the following to your `configuration.yaml` file:
|
To add Yahoo Weather to your installation, add the following to your `configuration.yaml` file:
|
||||||
|
|
||||||
@ -40,21 +40,46 @@ sensor:
|
|||||||
- temperature
|
- temperature
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
woeid:
|
||||||
- **woeid** (*Optional*): See above.
|
required: false
|
||||||
- **forecast** (*Optional*): Day of forecast. The default is the current day to display conditions.
|
description: See above.
|
||||||
- **name** (*Optional*): The name of the sensor. To easily recognize each sensor when adding more than one Yahoo weather sensor, it is recommended to use the name option. Defaults to `Yweather`.
|
type: string
|
||||||
- **monitored_conditions** array (*Required*): Conditions to display in the frontend.
|
default: "Defaults to a WOEID generated from coordinates defined in your `configuration.yaml` file."
|
||||||
- **weather**: A human-readable text summary with picture from yahoo.
|
forecast:
|
||||||
- **weather_current**: A human-readable text summary with picture from yahoo from current condition.
|
required: false
|
||||||
- **temperature**: The current temperature.
|
description: Day of forecast. The default is the current day to display conditions.
|
||||||
- **temp_min**: The minimal temperature of this day.
|
type: integer
|
||||||
- **temp_max**: The maximum temperature of this day.
|
default: 0
|
||||||
- **wind_speed**: The wind speed.
|
name:
|
||||||
- **humidity**: The relative humidity.
|
required: false
|
||||||
- **pressure**: The sea-level air pressure in millibars.
|
description: "The name of the sensor. To easily recognize each sensor when adding more than one Yahoo weather sensor, it is recommended to use the name option."
|
||||||
- **visibility**: The average visibility.
|
type: string
|
||||||
|
default: "`Yweather`"
|
||||||
|
monitored_conditions:
|
||||||
|
required: true
|
||||||
|
description: Conditions to display in the frontend.
|
||||||
|
type: list
|
||||||
|
keys:
|
||||||
|
weather:
|
||||||
|
description: A human-readable text summary with picture from yahoo.
|
||||||
|
weather_current:
|
||||||
|
description: A human-readable text summary with picture from yahoo from current condition.
|
||||||
|
temperature:
|
||||||
|
description: The current temperature.
|
||||||
|
temp_min:
|
||||||
|
description: The minimal temperature of this day.
|
||||||
|
temp_max:
|
||||||
|
description: The maximum temperature of this day.
|
||||||
|
wind_speed:
|
||||||
|
description: The wind speed.
|
||||||
|
humidity:
|
||||||
|
description: The relative humidity.
|
||||||
|
pressure:
|
||||||
|
description: The sea-level air pressure in millibars.
|
||||||
|
visibility:
|
||||||
|
description: The average visibility.
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
Example of forecast using multiple days. In example, first sensor shows tomorrow's forecast, second sensor shows the next day and so on:
|
Example of forecast using multiple days. In example, first sensor shows tomorrow's forecast, second sensor shows the next day and so on:
|
||||||
|
|
||||||
@ -85,4 +110,3 @@ sensor:
|
|||||||
```
|
```
|
||||||
|
|
||||||
Details about the API are available in the [Yahoo! Developer Network](https://developer.yahoo.com/weather/).
|
Details about the API are available in the [Yahoo! Developer Network](https://developer.yahoo.com/weather/).
|
||||||
|
|
||||||
|
@ -25,24 +25,55 @@ sensor:
|
|||||||
- platform: zamg
|
- platform: zamg
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
station_id:
|
||||||
- **station_id** (*Optional*): The ID number for a supported ZAMG station.
|
required: false
|
||||||
- **name** (*Optional*): Additional name for the sensors. Defaults to platform name.
|
description: The ID number for a supported ZAMG station.
|
||||||
- **latitude** (*Optional*): Latitude coordinate to monitor weather of (required if **longitude** is specified). Defaults to coordinates defined in your `configuration.yaml` file.
|
type: string
|
||||||
- **longitude** (*Optional*): Longitude coordinate to monitor weather of (required if **latitude** is specified). Defaults to coordinates defined in your `configuration.yaml` file.
|
name:
|
||||||
- **monitored_conditions** array (*Optional*): Conditions to display in the frontend.
|
required: false
|
||||||
- **pressure**: Pressure at station level
|
description: Additional name for the sensors. Defaults to platform name.
|
||||||
- **pressure_sealevel**: Pressure at sea Level
|
default: zamg
|
||||||
- **humidity**: Humidity
|
type: string
|
||||||
- **wind_speed**: Wind speed
|
latitude:
|
||||||
- **wind_bearing**: Wind bearing
|
required: false
|
||||||
- **wind_max_speed**: Top wind speed
|
description: "Latitude coordinate to monitor weather of (required if **longitude** is specified)."
|
||||||
- **wind_max_bearing**: Top wind bearing
|
default: "Defaults to coordinates defined in your `configuration.yaml` file."
|
||||||
- **sun_last_hour**: Sun last hour percentage
|
type: float
|
||||||
- **temperature**: Temperature
|
longitude:
|
||||||
- **precipitation**: Precipitation
|
required: false
|
||||||
- **dewpoint**: Dew point
|
description: "Longitude coordinate to monitor weather of (required if **latitude** is specified)."
|
||||||
|
default: "Defaults to coordinates defined in your `configuration.yaml` file."
|
||||||
|
type: float
|
||||||
|
monitored_conditions:
|
||||||
|
required: false
|
||||||
|
description: Conditions to display in the frontend.
|
||||||
|
type: list
|
||||||
|
default: temperature
|
||||||
|
keys:
|
||||||
|
pressure:
|
||||||
|
description: Pressure at station level
|
||||||
|
pressure_sealevel:
|
||||||
|
description: Pressure at sea Level
|
||||||
|
humidity:
|
||||||
|
description: Humidity
|
||||||
|
wind_speed:
|
||||||
|
description: Wind speed
|
||||||
|
wind_bearing:
|
||||||
|
description: Wind bearing
|
||||||
|
wind_max_speed:
|
||||||
|
description: Top wind speed
|
||||||
|
wind_max_bearing:
|
||||||
|
description: Top wind bearing
|
||||||
|
sun_last_hour:
|
||||||
|
description: Sun last hour percentage
|
||||||
|
temperature:
|
||||||
|
description: Temperature
|
||||||
|
precipitation:
|
||||||
|
description: Precipitation
|
||||||
|
dewpoint:
|
||||||
|
description: Dew point
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
A full configuration example:
|
A full configuration example:
|
||||||
|
|
||||||
|
@ -27,12 +27,26 @@ weather:
|
|||||||
- platform: zamg
|
- platform: zamg
|
||||||
```
|
```
|
||||||
|
|
||||||
Configuration variables:
|
{% configuration %}
|
||||||
|
station_id:
|
||||||
- **station_id** (*Optional*): The ID number for a supported ZAMG station.
|
required: false
|
||||||
- **name** (*Optional*): A name for the weather platform.
|
description: The ID number for a supported ZAMG station.
|
||||||
- **latitude** (*Optional*): Latitude coordinate to monitor weather of (required if **longitude** is specified). Defaults to coordinates defined in your `configuration.yaml` file.
|
type: string
|
||||||
- **longitude** (*Optional*): Longitude coordinate to monitor weather of (required if **latitude** is specified). Defaults to coordinates defined in your `configuration.yaml` file.
|
name:
|
||||||
|
required: false
|
||||||
|
description: A name for the weather platform.
|
||||||
|
type: string
|
||||||
|
latitude:
|
||||||
|
required: false
|
||||||
|
description: "Latitude coordinate to monitor weather of (required if **longitude** is specified)."
|
||||||
|
default: "Defaults to coordinates defined in your `configuration.yaml` file."
|
||||||
|
type: float
|
||||||
|
longitude:
|
||||||
|
required: false
|
||||||
|
description: "Longitude coordinate to monitor weather of (required if **latitude** is specified)."
|
||||||
|
default: "Defaults to coordinates defined in your `configuration.yaml` file."
|
||||||
|
type: float
|
||||||
|
{% endconfiguration %}
|
||||||
|
|
||||||
<p class='note'>
|
<p class='note'>
|
||||||
This platform is an alternative to the [`zamg`](/components/sensor.zamg/) sensor. The weather platform is easier to configure but less customizable.
|
This platform is an alternative to the [`zamg`](/components/sensor.zamg/) sensor. The weather platform is easier to configure but less customizable.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user