本帖最后由 antsunzj 于 2018-1-8 10:40 编辑
年关已至,忙成狗。所以很久没有写过帖子,也没有时间给以前写的帖子回答大家的疑问。今晚粗略的浏览一下,那些问题,其实论坛都是能找到答案的。善用搜索。
不知不觉,玩hass已经有半年多了。从最初的装系统,到把各种设备接入或者diy,再到各种语音方案的应用包括:接入homekit使唤siri开关灯,后来的吃灰叮咚音箱死而复生,还有若琪+小爱+天猫等。hass就是设备接入+声控。还好,论坛有L大为代表的大神们,不断给我们写各种插件,hass的使用打开另外一层新天地:自动化+软硬结合。我觉得这应该是hass兼容万物之外,更深层次的优点。今晚,我想把我过去一段时间用的比较顺的彩云天气的应用实例跟大家分享一下。
一、彩云天气+微信插件
1.基础:必须要安装好L大写的彩云天气插件+微信插件。具体自己去论坛学习。
2.应用背景:小区邻居关系比较好,平时都是大家的父母带小孩在院子里面玩,还有一些人习惯把衣服晾在天台。所以对天气的变化的感知很大的需求。
所以,我建立了个微信群,小区里面的有需要的邻居和楼栋的物业管家加进来,设定了定期预报天气+突发天气状况(空气质量警报+气温变化警报+下雨警报等)的package。具体例子如下:
package相关代码:
script:
wechat_to_panpuwan:
sequence:
- service: notify.wechatnotify
data_template:
target:
- 泮浦湾天气预报群#group#
- 萝卜
message: '{{ msg }}'
automation:
- alias: 'weather_report_start'
trigger:
- platform: numeric_state
entity_id: sensor.caiyun_minutely_probability_0
above: 60
value_template: '{{ state.state }}'
- platform: numeric_state
entity_id: sensor.caiyun_minutely_probability_0
above: 70
value_template: '{{ state.state }}'
- platform: numeric_state
entity_id: sensor.caiyun_minutely_probability_0
above: 80
value_template: '{{ state.state }}'
- platform: numeric_state
entity_id: sensor.caiyun_minutely_probability_0
above: 90
value_template: '{{ state.state }}'
condition:
condition: time
after: '06:00:00'
before: '23:00:00'
action:
- service: script.wechat_to_panpuwan
data_template:
msg: '请各位邻居留意这个天气预报(仅覆盖泮浦湾方圆三公里,以下消息仅供参考):最近半个小时有{{states.sensor.caiyun_minutely_probability_0.state}}%的概率会下雨。'
- alias: 'weather_report_start'
trigger:
- platform: numeric_state
entity_id: sensor.caiyun_realtime_pm25
above: 50
value_template: '{{ state.state }}'
- platform: numeric_state
entity_id: sensor.caiyun_realtime_pm25
above: 100
value_template: '{{ state.state }}'
- platform: numeric_state
entity_id: sensor.caiyun_realtime_pm25
above: 150
value_template: '{{ state.state }}'
- platform: numeric_state
entity_id: sensor.caiyun_realtime_pm25
above: 180
value_template: '{{ state.state }}'
- platform: numeric_state
entity_id: sensor.caiyun_realtime_pm25
below: 40
value_template: '{{ state.state }}'
condition:
condition: time
after: '06:00:00'
before: '23:00:00'
action:
- service: script.wechat_to_panpuwan
data_template:
msg: >
请各位邻居留意这个空气质量预报(仅覆盖泮浦湾方圆三公里,以下消息仅供参考):
{%- if states.sensor.caiyun_realtime_pm25.state | float >= 115 and states.sensor.caiyun_realtime_pm25.state | float < 1000 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,中度甚至重度污染。可能对健康人群心脏、呼吸系统有影响,建议疾病患者避免长时间、高强度的户外锻练,一般人群适量减少户外运动。
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 75 and states.sensor.caiyun_realtime_pm25.state | float < 115 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,轻度污染。建议儿童、老年人及心脏病、呼吸系统疾病患者应减少长时间、高强度的户外锻炼。
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 35 and states.sensor.caiyun_realtime_pm25.state | float < 75 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,空气属于良。某些污染物可能对极少数异常敏感人群健康有较弱影响,建议极少数异常敏感人群应减少户外活动。
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 10 and states.sensor.caiyun_realtime_pm25.state | float < 35 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,空气状况属于优。质量令人满意,基本无空气污染,各类人群可正常活动,可以打开家里的门窗换气。
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 0 and states.sensor.caiyun_realtime_pm25.state | float < 10 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,此时空气简直好的让人不敢相信呀,让我门愉快的玩耍吧。
{%- endif %}
- alias: 'temp_warning_cool'
trigger:
- platform: numeric_state
entity_id: sensor.caiyun_realtime_temperature
above: 28
value_template: '{{ state.state }}'
- platform: numeric_state
entity_id: sensor.caiyun_realtime_temperature
below: 18
value_template: '{{ state.state }}'
- platform: numeric_state
entity_id: sensor.caiyun_realtime_temperature
below: 15
value_template: '{{ state.state }}'
- platform: numeric_state
entity_id: sensor.caiyun_realtime_temperature
below: 10
value_template: '{{ state.state }}'
condition:
condition: time
after: '06:00:00'
before: '00:00:00'
action:
- service: script.wechat_to_panpuwan
data_template:
msg: >
{%- if states.sensor.caiyun_realtime_temperature.state | float >= 28 and states.sensor.caiyun_realtime_temperature.state | float < 35 -%}
各位领居请注意这个气温预警:目前是{{states('sensor.caiyun_realtime_temperature')}}°C,非常炎热,穿衣建议:盛夏着装,轻棉织物制作的短衣、短裤、薄短裙、短裙;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 24 and states.sensor.caiyun_realtime_temperature.state | float < 28 -%}
各位领居请注意这个气温预警:目前是{{states('sensor.caiyun_realtime_temperature')}}°C,热舒适,穿衣建议:夏季着装,棉麻面料的衬衫、长裤、薄长裙、薄T恤;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 20 and states.sensor.caiyun_realtime_temperature.state | float < 24 -%}
各位领居请注意这个气温预警:目前只有{{states('sensor.caiyun_realtime_temperature')}}°C,有点凉快,穿衣建议:春秋过渡装,单层棉麻面料的短套装、T恤衫、薄牛仔衫裤、休闲服、职业套装;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 15 and states.sensor.caiyun_realtime_temperature.state | float < 20 -%}
各位领居请注意这个气温预警:目前只有{{states('sensor.caiyun_realtime_temperature')}}°C,已经比较冷了,穿衣建议:秋冬过度装,风衣、大衣、夹大衣、外套、毛衣、毛套装、西装、防寒服;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 10 and states.sensor.caiyun_realtime_temperature.state | float < 15 -%}
各位领居请注意这个气温预警:目前只有{{states('sensor.caiyun_realtime_temperature')}}°C,已经非常冷了,穿衣建议:秋冬着装,毛衣、风衣、毛套装、西服套装;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 0 and states.sensor.caiyun_realtime_temperature.state | float < 10 -%}
各位领居请注意这个气温预警:目前只有{{states('sensor.caiyun_realtime_temperature')}}°C,冷到没人性,穿衣建议:冬季着装,棉衣、冬大衣、皮夹克、厚呢外套、呢帽、手套、羽绒服、皮袄;
{%- endif %}
- alias: 'weather_report_stop'
trigger:
platform: numeric_state
entity_id: sensor.caiyun_minutely_probability_0
below: 60
value_template: '{{ state.state }}'
condition:
condition: time
after: '06:00:00'
before: '00:00:00'
action:
- service: script.wechat_to_panpuwan
data_template:
msg: >
请各位邻居留意这个天气预报(仅覆盖泮浦湾方圆三公里,以下消息仅供参考):
{{states.sensor.caiyun_minutely_description.state}}。
- alias: 'weather_report_distance'
trigger:
- platform: numeric_state
entity_id: sensor.caiyun_precipitation_nearest_precipitation_distance
below: 3
value_template: '{{ state.state }}'
- platform: numeric_state
entity_id: sensor.caiyun_precipitation_nearest_precipitation_distance
below: 10
value_template: '{{ state.state }}'
action:
- service: script.wechat_to_panpuwan
data_template:
msg: >
请各位邻居留意这个天气预报(仅覆盖泮浦湾方圆三公里,以下消息仅供参考):
附近正在下雨,现在最近的降雨带离我们这{{states('sensor.caiyun_precipitation_nearest_precipitation_distance')}}公里。
- alias: 'weather_report_time_01'
initial_state: true
trigger:
- platform: time
at: '07:08:00'
- platform: time
at: '12:08:00'
- platform: time
at: '17:08:00'
- platform: time
at: '20:08:00'
- platform: time
at: '22:08:00'
action:
- service: script.wechat_to_panpuwan
data_template:
msg: >
各位邻居好,小萝卜为大家播报天气(仅覆盖泮浦湾方圆三公里,以下消息仅供参考):
当前泮浦湾大致{{states('sensor.caiyun_realtime_skycon')}};
当前室外空气质量指数为{{states('sensor.caiyun_realtime_aqi')}},
{%- if states.sensor.caiyun_realtime_pm25.state | float >= 115 and states.sensor.caiyun_realtime_pm25.state | float < 1000 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,中度甚至重度污染。可能对健康人群心脏、呼吸系统有影响,建议疾病患者避免长时间、高强度的户外锻练,一般人群适量减少户外运动;
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 75 and states.sensor.caiyun_realtime_pm25.state | float < 115 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,轻度污染。建议儿童、老年人及心脏病、呼吸系统疾病患者应减少长时间、高强度的户外锻炼。;
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 35 and states.sensor.caiyun_realtime_pm25.state | float < 75 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,空气属于良。某些污染物可能对极少数异常敏感人群健康有较弱影响,建议极少数异常敏感人群应减少户外活动;
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 10 and states.sensor.caiyun_realtime_pm25.state | float < 35 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,空气状况属于优。质量令人满意,基本无空气污染,各类人群可正常活动;
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 0 and states.sensor.caiyun_realtime_pm25.state | float < 10 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,此时空气简直好的让人不敢相信呀;
{%- endif %}
{%- if states.sensor.caiyun_realtime_humidity.state | float >= 70 and states.sensor.caiyun_realtime_humidity.state | float < 100 -%}
湿度为{{states('sensor.caiyun_realtime_humidity')}}%,准备多几套内衣裤吧;
{%- elif states.sensor.caiyun_realtime_humidity.state | float >= 40 and states.sensor.caiyun_realtime_humidity.state | float < 70 -%}
湿度为{{states('sensor.caiyun_realtime_humidity')}}%,现在很舒适;
{%- elif states.sensor.caiyun_realtime_humidity.state | float >= 10 and states.sensor.caiyun_realtime_humidity.state | float < 40 -%}
湿度为{{states('sensor.caiyun_realtime_humidity')}}%,非常干燥,大家记得多喝水;
{%- elif states.sensor.caiyun_realtime_humidity.state | float >= 0 and states.sensor.caiyun_realtime_humidity.state | float < 10 -%}
湿度为{{states('sensor.caiyun_realtime_humidity')}}%,大家记得多喝水;
{%- endif %}
{%- if states.sensor.caiyun_realtime_temperature.state | float >= 28 and states.sensor.caiyun_realtime_temperature.state | float < 35 -%}
目前温度是{{states('sensor.caiyun_realtime_temperature')}}°C,非常炎热,穿衣建议:盛夏着装,轻棉织物制作的短衣、短裤、薄短裙、短裙;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 24 and states.sensor.caiyun_realtime_temperature.state | float < 28 -%}
目前温度是{{states('sensor.caiyun_realtime_temperature')}}°C,热舒适,穿衣建议:夏季着装,棉麻面料的衬衫、长裤、薄长裙、薄T恤;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 20 and states.sensor.caiyun_realtime_temperature.state | float < 24 -%}
目前温度只有{{states('sensor.caiyun_realtime_temperature')}}°C,有点凉快,穿衣建议:春秋过渡装,单层棉麻面料的短套装、T恤衫、薄牛仔衫裤、休闲服、职业套装;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 15 and states.sensor.caiyun_realtime_temperature.state | float < 20 -%}
目前温度只有{{states('sensor.caiyun_realtime_temperature')}}°C,天气已经比较冷了,穿衣建议:秋冬过度装,风衣、大衣、夹大衣、外套、毛衣、毛套装、西装、防寒服;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 10 and states.sensor.caiyun_realtime_temperature.state | float < 15 -%}
目前温度只有{{states('sensor.caiyun_realtime_temperature')}}°C,天气已经非常冷了,穿衣建议:秋冬着装,毛衣、风衣、毛套装、西服套装;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 0 and states.sensor.caiyun_realtime_temperature.state | float < 10 -%}
目前温度只有{{states('sensor.caiyun_realtime_temperature')}}°C,天气冷到没人性,穿衣建议:冬季着装,棉衣、冬大衣、皮夹克、厚呢外套、呢帽、手套、羽绒服、皮袄;
{%- endif %}
风向为{{states('sensor.caiyun_precipitation_wind_direction')}},
当前风速为{{states('sensor.caiyun_precipitation_wind_speed')}}KM/H;
紫外强度:{{states('sensor.caiyun_daily_ultraviolet')}};
感冒概率:{{states('sensor.caiyun_daily_coldrisk')}};
当前洗车建议{{states('sensor.caiyun_daily_carwashing')}}。
{%- if states.sensor.caiyun_hourly_precipitation8h.state | float >= 0 and states.sensor.caiyun_hourly_precipitation8h.state | float < 0.05 -%}
请留意这个即时天气预报:{{states('sensor.caiyun_minutely_description')}},最近的降雨带离我们这{{states('sensor.caiyun_precipitation_nearest_precipitation_distance')}}公里。
{%- elif states.sensor.caiyun_hourly_precipitation8h.state | float > 0.05 and states.sensor.caiyun_hourly_precipitation8h.state | float < 0.9 -%}
不过得注意了,接下来8小时内可能会下小雨。请留意这个即时天气预报:{{states('sensor.caiyun_minutely_description')}},现在最近的降雨带离我们这{{states('sensor.caiyun_precipitation_nearest_precipitation_distance')}}公里。
{%- elif states.sensor.caiyun_hourly_precipitation8h.state | float > 0.9 and states.sensor.caiyun_hourly_precipitation8h.state | float < 2.87 -%}
不过得注意了,8小时内可能会下中雨。请留意这个即时天气预报:{{states('sensor.caiyun_minutely_description')}},现在最近的降雨带离我们这{{states('sensor.caiyun_precipitation_nearest_precipitation_distance')}}公里。
{%- elif states.sensor.caiyun_hourly_precipitation8h.state | float > 2.87 -%}
不过得注意了,8小时内可能会下好大的雨呀。请留意这个即时天气预报:{{states('sensor.caiyun_minutely_description')}},现在最近的降雨带离我们这{{states('sensor.caiyun_precipitation_nearest_precipitation_distance')}}公里。
{%- endif %}
- alias: 'input_boolean_wechat_to_panpuwan02'
initial_state: true
trigger:
platform: state
entity_id: input_boolean.wechat_to_panpuwan02
to: 'on'
action:
- service: script.wechat_to_panpuwan
data_template:
msg: >
各位邻居好,小萝卜为大家播报天气(仅覆盖泮浦湾方圆三公里,以下消息仅供参考):
当前泮浦湾大致{{states('sensor.caiyun_realtime_skycon')}};
当前室外空气质量指数为{{states('sensor.caiyun_realtime_aqi')}},
{%- if states.sensor.caiyun_realtime_pm25.state | float >= 115 and states.sensor.caiyun_realtime_pm25.state | float < 1000 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,中度甚至重度污染。可能对健康人群心脏、呼吸系统有影响,建议疾病患者避免长时间、高强度的户外锻练,一般人群适量减少户外运动;
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 75 and states.sensor.caiyun_realtime_pm25.state | float < 115 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,轻度污染。建议儿童、老年人及心脏病、呼吸系统疾病患者应减少长时间、高强度的户外锻炼。;
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 35 and states.sensor.caiyun_realtime_pm25.state | float < 75 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,空气属于良。某些污染物可能对极少数异常敏感人群健康有较弱影响,建议极少数异常敏感人群应减少户外活动;
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 10 and states.sensor.caiyun_realtime_pm25.state | float < 35 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,空气状况属于优。质量令人满意,基本无空气污染,各类人群可正常活动;
{%- elif states.sensor.caiyun_realtime_pm25.state | float >= 0 and states.sensor.caiyun_realtime_pm25.state | float < 10 -%}
PM2.5为{{states('sensor.caiyun_realtime_pm25')}}ug/m3,此时空气简直好的让人不敢相信呀;
{%- endif %}
{%- if states.sensor.caiyun_realtime_humidity.state | float >= 70 and states.sensor.caiyun_realtime_humidity.state | float < 100 -%}
湿度为{{states('sensor.caiyun_realtime_humidity')}}%,准备多几套内衣裤吧;
{%- elif states.sensor.caiyun_realtime_humidity.state | float >= 40 and states.sensor.caiyun_realtime_humidity.state | float < 70 -%}
湿度为{{states('sensor.caiyun_realtime_humidity')}}%,现在很舒适;
{%- elif states.sensor.caiyun_realtime_humidity.state | float >= 10 and states.sensor.caiyun_realtime_humidity.state | float < 40 -%}
湿度为{{states('sensor.caiyun_realtime_humidity')}}%,非常干燥,大家记得多喝水;
{%- elif states.sensor.caiyun_realtime_humidity.state | float >= 0 and states.sensor.caiyun_realtime_humidity.state | float < 10 -%}
湿度为{{states('sensor.caiyun_realtime_humidity')}}%,大家记得多喝水;
{%- endif %}
{%- if states.sensor.caiyun_realtime_temperature.state | float >= 28 and states.sensor.caiyun_realtime_temperature.state | float < 35 -%}
目前温度是{{states('sensor.caiyun_realtime_temperature')}}°C,非常炎热,穿衣建议:盛夏着装,轻棉织物制作的短衣、短裤、薄短裙、短裙;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 24 and states.sensor.caiyun_realtime_temperature.state | float < 28 -%}
目前温度是{{states('sensor.caiyun_realtime_temperature')}}°C,热舒适,穿衣建议:夏季着装,棉麻面料的衬衫、长裤、薄长裙、薄T恤;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 20 and states.sensor.caiyun_realtime_temperature.state | float < 24 -%}
目前温度只有{{states('sensor.caiyun_realtime_temperature')}}°C,有点凉快,穿衣建议:春秋过渡装,单层棉麻面料的短套装、T恤衫、薄牛仔衫裤、休闲服、职业套装;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 15 and states.sensor.caiyun_realtime_temperature.state | float < 20 -%}
目前温度只有{{states('sensor.caiyun_realtime_temperature')}}°C,天气已经比较冷了,穿衣建议:秋冬过度装,风衣、大衣、夹大衣、外套、毛衣、毛套装、西装、防寒服;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 10 and states.sensor.caiyun_realtime_temperature.state | float < 15 -%}
目前温度只有{{states('sensor.caiyun_realtime_temperature')}}°C,天气已经非常冷了,穿衣建议:秋冬着装,毛衣、风衣、毛套装、西服套装;
{%- elif states.sensor.caiyun_realtime_temperature.state | float >= 0 and states.sensor.caiyun_realtime_temperature.state | float < 10 -%}
目前温度只有{{states('sensor.caiyun_realtime_temperature')}}°C,天气冷到没人性,穿衣建议:冬季着装,棉衣、冬大衣、皮夹克、厚呢外套、呢帽、手套、羽绒服、皮袄;
{%- endif %}
风向为{{states('sensor.caiyun_precipitation_wind_direction')}},
当前风速为{{states('sensor.caiyun_precipitation_wind_speed')}}KM/H;
紫外强度:{{states('sensor.caiyun_daily_ultraviolet')}};
感冒概率:{{states('sensor.caiyun_daily_coldrisk')}};
当前洗车建议{{states('sensor.caiyun_daily_carwashing')}}。
{%- if states.sensor.caiyun_hourly_precipitation8h.state | float >= 0 and states.sensor.caiyun_hourly_precipitation8h.state | float < 0.05 -%}
请留意这个即时天气预报:{{states('sensor.caiyun_minutely_description')}},最近的降雨带离我们这{{states('sensor.caiyun_precipitation_nearest_precipitation_distance')}}公里。
{%- elif states.sensor.caiyun_hourly_precipitation8h.state | float > 0.05 and states.sensor.caiyun_hourly_precipitation8h.state | float < 0.9 -%}
不过得注意了,接下来8小时内可能会下小雨。请留意这个即时天气预报:{{states('sensor.caiyun_minutely_description')}},现在最近的降雨带离我们这{{states('sensor.caiyun_precipitation_nearest_precipitation_distance')}}公里。
{%- elif states.sensor.caiyun_hourly_precipitation8h.state | float > 0.9 and states.sensor.caiyun_hourly_precipitation8h.state | float < 2.87 -%}
不过得注意了,8小时内可能会下中雨。请留意这个即时天气预报:{{states('sensor.caiyun_minutely_description')}},现在最近的降雨带离我们这{{states('sensor.caiyun_precipitation_nearest_precipitation_distance')}}公里。
{%- elif states.sensor.caiyun_hourly_precipitation8h.state | float > 2.87 -%}
不过得注意了,8小时内可能会下好大的雨呀。请留意这个即时天气预报:{{states('sensor.caiyun_minutely_description')}},现在最近的降雨带离我们这{{states('sensor.caiyun_precipitation_nearest_precipitation_distance')}}公里。
{%- endif %}
- delay:
seconds: 0.5
- service: input_boolean.turn_off
entity_id: input_boolean.wechat_to_panpuwan02
input_boolean:
wechat_to_panpuwan02:
initial: off
homeassistant:
customize:
input_boolean.wechat_to_panpuwan02:
friendly_name: 发送天气测试
homebridge_hidden: true
以上代码仅供参考。我自己写好的package,如果你装好了彩云天气插件+微信插件,只要下载附件,丢进package文件夹,根据自己的情况修改一下,重启hass就可以了。
|