message: >-
现在时间:{{ states("sensor.time") }},室内客厅PM2.5为{{
states("sensor.zm1_b0f893290ad2_pm25") }}、温度为{{
states("sensor.zm1_b0f893290ad2_temperature") }}度、湿度为百分之{{
states("sensor.zm1_b0f893290ad2_humidity") }}。室外PM2.5为{{
state_attr("weather.shi_tai_2","pm25") }},室外温度为{{
states("sensor.shi_wai_wen_du") }}度;室外湿度为百分之{{
states("sensor.shi_wai_shi_du") }};今天气温 {{
(state_attr("weather.shi_tai_2","forecast")[0].templow
|round(0)|string).replace("-", "零下") }} 到 {{
(state_attr("weather.shi_tai_2","forecast")[0].temperature|round(0)|string).replace("-",
"零下") }} 摄氏度。当前 {{
(state_attr("weather.shi_tai_2","temperature")|round(0)|string).replace("-","零下")
}} 摄氏度,空气质量{{ state_attr("weather.shi_tai_2","aqi_description")
}}。今天 {{ state_attr("weather.shi_tai_2","forecast_hourly")
}}。当前 {{ state_attr("weather.shi_tai_2","forecast_minutely")
}}。 {% for state in
state_attr("weather.chi_zhou_tian_qi","suggestion") -%}
{% if state.title=="comf" -%}
{{state.txt}}
{%- endif %}
{%- endfor -%} {% for state in
state_attr("weather.chi_zhou_tian_qi","suggestion") -%}
{% if state.title=="sport" -%}
{{state.txt}}
{%- endif %}
{%- endfor %}
不用模板生成额外的实体,利用彩云天气和和风天气的属性。
message: >-
现在时间:01:40,室内客厅PM2.5为44、温度为9.2度、湿度为百分之52.8。室外PM2.5为43,室外温度为1.3度;室外湿度为百分之69;今天气温
零下1 到 4 摄氏度。当前 0 摄氏度,空气质量良。今天 晴,今天中午11点钟后转多云,其后晴。当前 最近的降雪带在东边129公里外呢。
白天虽然天气晴好,但早晚会感觉偏凉,午后舒适、宜人。天气较好,但考虑天气寒冷,推荐您进行室内运动,户外运动时请注意保暖并做好准备活动。
|