cheny95 发表于 2022-6-13 00:50:39

和风天气 Home Assistant 插件

本帖最后由 cheny95 于 2022-6-13 00:55 编辑



魔改了一个和风天气预报的HA插件,我太懒了就把我github上的内容复制了过来了。

里面有说明和使用方法以及未来要支持的功能,有问题看看使用方法和issues…


传送门:和风天气 Home Assistant 插件
个人开发,非广告…

示例
[*]3天:
https://github.com/cheny95/qweather/raw/main/3d.png?raw=true
[*]7天:
https://github.com/cheny95/qweather/raw/main/7d.png?raw=true
每日预报: 开发者工具-状态-实体名称-属性forecast:
- datetime: '2022-06-13'
    temperature: 30
    templow: 21
    condition: partlycloudy
    wind_bearing: 135
    wind_speed: 3
    precipitation: 0
    humidity: 85
    precipitation_probability: 85
    pressure: 1000
- datetime: '2022-06-14'
    temperature: 33
    templow: 20
    condition: partlycloudy
    wind_bearing: 135
    wind_speed: 16
    precipitation: 0
    humidity: 69
    precipitation_probability: 69
    pressure: 1002
    ……当天小时预报: 开发者工具-状态-实体名称-属性forecast_hourly:
- time: '01:00'
    cloudy: '100'
    temperature: 19
    condition: weather-night-partly-cloudy
    text: 多云
    wind_bearing: 111
    wind_speed: 11
    precipitation: 0
    humidity: 94
    precipitation_probability: 7
    pressure: 1003
- time: '02:00'
    cloudy: '100'
    temperature: 19
    condition: weather-night-partly-cloudy
    text: 多云
    wind_bearing: 110
    wind_speed: 11
    precipitation: 0
    humidity: 96
    precipitation_probability: 7
    pressure: 1003
    ……
感谢 hass-xiaomi-miot 作者 @al-one 的帮助。




cheny95 发表于 2022-6-13 15:06:51

本帖最后由 cheny95 于 2023-8-30 13:28 编辑

和风天气新版本来了
qweather-v0.0.9
新增:修复新版报错的问题。

github传送门地址: https://github.com/cheny95/qweather#readme


------------------
和风天气新版本来了
qweather-v0.0.4
新增:

新增未来2小时分钟级预报。(forecast_minutely, minutely_summary)
新增灾害预警。(weather_warning)
因支持格点天气分钟级别预报,location参数中ID不在使用,使用经纬度作为参数,格式、获取方式一样,参考ReadMe。

github传送门地址: https://github.com/cheny95/qweather#readme

renlm 发表于 2022-6-13 20:55:23

绑定,紫薯布丁

散步d小螃蟹 发表于 2022-6-15 13:46:43

啥时候能提交到官方那个集成里就好了

cheny95 发表于 2022-6-15 17:11:50

散步d小螃蟹 发表于 2022-6-15 13:46
啥时候能提交到官方那个集成里就好了

不会操作 哈哈,天气的集成应该很多

cheny95 发表于 2022-6-15 17:12:58

和风天气新版本来了

v0.0.5

修复灾害预警取值错误导致集成启动失败的问题
增加灾害预警推送时间、开始时间、结束时间、预警等级[官方后期会弃用,到时候同步修改]


github传送门地址: https://github.com/cheny95/qweather#readme

散步d小螃蟹 发表于 2022-6-15 22:30:38

cheny95 发表于 2022-6-15 17:11
不会操作 哈哈,天气的集成应该很多

我把文件复制到custom_conponents文件夹,然后重启修改了configuration.yaml文件,再重启。。。。后面再那个开发者工具-状态-实体名称-属性找不到哇:'(

cheny95 发表于 2022-6-16 01:02:34

散步d小螃蟹 发表于 2022-6-15 22:30
我把文件复制到custom_conponents文件夹,然后重启修改了configuration.yaml文件,再重启。。。。后面再 ...

实体名称是你设置的name,目录结构应该是custom_conponents/qweather

zeze247 发表于 2022-6-21 19:06:39

出现这个错误
Platform error weather.qweather - cannot import name 'CONF_LOCATION' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)

cheny95 发表于 2022-6-23 16:58:52

zeze247 发表于 2022-6-21 19:06
出现这个错误
Platform error weather.qweather - cannot import name 'CONF_LOCATION' from 'homeassistan ...

最新版请查看下github,需要开发者的key了。因为增加了格点天气之类的接口。
页: [1] 2 3
查看完整版本: 和风天气 Home Assistant 插件