- alias: 'Zhengzhou bad weather tomorrow'
initial_state: true
trigger:
- platform: time # 预定时间触发
at: '18:00:00'
condition:
condition: template # 当明天为以下天气时(自己也可酌情增减。另heweather支持英文,如果设置的英文请用注释部分。)
value_template: '{{states("sensor.zz_summary_day_tomorrow") in ("大风", "阵雨",
"强阵雨", "雷阵雨", "强雷阵雨", "雷阵雨伴有冰雹", "小雨", "中雨",
"大雨", "暴雨", "大暴雨", "特大暴雨", "冻雨", "小雪", "中雪",
"大雪", "暴雪", "雨夹雪", "雨雪天气", "阵雨夹雪", "阵雪", "雾")}}'
# value_template: '{{states("sensor.zz_summary_day_tomorrow") in ("Gale", "Shower Rain",
# "Heavy Shower Rain", "Thundershower", "Heavy Thunderstorm", "Hail", "Light Rain", "Moderate Rain",
# "Heavy Rain", "Storm", "Heavy Storm", "Severe Storm", "Freezing Rain", "Light Snow", "Moderate Snow",
# "Heavy Snow", "Snowstorm", "Sleet", "Rain And Snow", "Shower Snow", "Snow Flurry", "Foggy")}}'
action:
- service: notify.wechat # 邮件发送(内容自定,参考上面帖子)
data_template: target: 'Mr Li'
message: >
郑州明天白天{{states("sensor.zz_summary_day_tomorrow")}}
'明天晚上{{states("sensor.zz_summary_night_tomorrow")}}