Skip to content

Commit cd78da0

Browse files
authored
updating weather template example (home-assistant#19799)
1 parent 9b0c14d commit cd78da0

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

source/_integrations/weather.template.markdown

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,19 @@ Another use case could be using temperature and humidity from one weather platfo
2020

2121
To enable a Template Weather provider in your installation, add the following to your `configuration.yaml` file:
2222

23+
(Note, be sure to update my_region in the condition and forecast templates to an appropriate value for your setup).
24+
2325
{% raw %}
2426

2527
```yaml
2628
# Example configuration.yaml entry
2729
weather:
2830
- platform: template
29-
name: "my very own weather station"
30-
condition_template: "sunny"
31-
temperature_template: "{{ states('sensor.temperature') | float}}"
32-
humidity_template: "{{ states('sensor.humidity')| float }}"
33-
forecast_template: "{{ states.weather.my_region.attributes.forecast }}"
31+
name: "My Weather Station"
32+
condition_template: "{{ states('weather.my_region') }}"
33+
temperature_template: "{{ states('sensor.temperature') | float }}"
34+
humidity_template: "{{ states('sensor.humidity') | float }}"
35+
forecast_template: "{{ state_attr('weather.my_region', 'forecast') }}"
3436
```
3537
3638
{% endraw %}

0 commit comments

Comments
 (0)