updating weather template example (#19799)

This commit is contained in:
Chris Turra 2021-10-16 12:18:19 -07:00 committed by GitHub
parent 9b0c14d0b2
commit cd78da05ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,17 +20,19 @@ Another use case could be using temperature and humidity from one weather platfo
To enable a Template Weather provider in your installation, add the following to your `configuration.yaml` file:
(Note, be sure to update my_region in the condition and forecast templates to an appropriate value for your setup).
{% raw %}
```yaml
# Example configuration.yaml entry
weather:
- platform: template
name: "my very own weather station"
condition_template: "sunny"
temperature_template: "{{ states('sensor.temperature') | float}}"
humidity_template: "{{ states('sensor.humidity')| float }}"
forecast_template: "{{ states.weather.my_region.attributes.forecast }}"
name: "My Weather Station"
condition_template: "{{ states('weather.my_region') }}"
temperature_template: "{{ states('sensor.temperature') | float }}"
humidity_template: "{{ states('sensor.humidity') | float }}"
forecast_template: "{{ state_attr('weather.my_region', 'forecast') }}"
```
{% endraw %}