-
Notifications
You must be signed in to change notification settings - Fork 0
/
sensor.yml
24 lines (21 loc) · 837 Bytes
/
sensor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
sensor:
- platform: template
sensors:
wx_forecast:
friendly_name: "Local forecast"
value_template: >-
{% set weather = {
"sunny": "sunny",
"clear-day": "clear-day",
"clear-night": "clear-night",
"cloudy": "cloudy",
"rainy": "rainy",
"sleet": "sleet",
"snow": "snow",
"wind": "wind",
"fog": "fog",
"partlycloudy": "partlycloudy",
} %}
{% for state in states.weather.forecast_home.attributes.forecast[1:6] -%}
{{ as_timestamp(state.datetime)| timestamp_custom("%a") }};{{state.templow}};{{ state.temperature }};{{ state.precipitation }}in;{{ weather[state.condition] }}#
{%- endfor %}