『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 5987|回复: 26

和风天气 Home Assistant 插件

[复制链接]

5

主题

48

帖子

632

积分

论坛DIY达人

积分
632
金钱
579
HASS币
20
发表于 2022-6-13 00:50:39 | 显示全部楼层 |阅读模式
本帖最后由 cheny95 于 2022-6-13 00:55 编辑



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

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


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

示例
  • 3天:

                               
登录/注册后可看大图
  • 7天:

                               
登录/注册后可看大图

每日预报: 开发者工具-状态-实体名称-属性
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 的帮助。




评分

参与人数 2金钱 +11 收起 理由
owbot + 1 感谢楼主分享!
yuyuye + 10 大神666!

查看全部评分

回复

使用道具 举报

5

主题

48

帖子

632

积分

论坛DIY达人

积分
632
金钱
579
HASS币
20
 楼主| 发表于 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

回复

使用道具 举报

1

主题

78

帖子

326

积分

中级会员

Rank: 3Rank: 3

积分
326
金钱
248
HASS币
0
发表于 2022-6-13 20:55:23 | 显示全部楼层
绑定,紫薯布丁
回复

使用道具 举报

7

主题

192

帖子

1547

积分

金牌会员

Rank: 6Rank: 6

积分
1547
金钱
1355
HASS币
0
发表于 2022-6-15 13:46:43 | 显示全部楼层
啥时候能提交到官方那个集成里就好了
回复

使用道具 举报

5

主题

48

帖子

632

积分

论坛DIY达人

积分
632
金钱
579
HASS币
20
 楼主| 发表于 2022-6-15 17:11:50 | 显示全部楼层
散步d小螃蟹 发表于 2022-6-15 13:46
啥时候能提交到官方那个集成里就好了

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

使用道具 举报

5

主题

48

帖子

632

积分

论坛DIY达人

积分
632
金钱
579
HASS币
20
 楼主| 发表于 2022-6-15 17:12:58 | 显示全部楼层
和风天气新版本来了

v0.0.5

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


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

使用道具 举报

7

主题

192

帖子

1547

积分

金牌会员

Rank: 6Rank: 6

积分
1547
金钱
1355
HASS币
0
发表于 2022-6-15 22:30:38 | 显示全部楼层
cheny95 发表于 2022-6-15 17:11
不会操作 哈哈,天气的集成应该很多

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

使用道具 举报

5

主题

48

帖子

632

积分

论坛DIY达人

积分
632
金钱
579
HASS币
20
 楼主| 发表于 2022-6-16 01:02:34 | 显示全部楼层
散步d小螃蟹 发表于 2022-6-15 22:30
我把文件复制到custom_conponents文件夹,然后重启修改了configuration.yaml文件,再重启。。。。后面再 ...

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

使用道具 举报

3

主题

136

帖子

1478

积分

金牌会员

Rank: 6Rank: 6

积分
1478
金钱
1342
HASS币
0
发表于 2022-6-21 19:06:39 | 显示全部楼层
出现这个错误
Platform error weather.qweather - cannot import name 'CONF_LOCATION' from 'homeassistant.const' (/usr/src/homeassistant/homeassistant/const.py)
回复

使用道具 举报

5

主题

48

帖子

632

积分

论坛DIY达人

积分
632
金钱
579
HASS币
20
 楼主| 发表于 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了。因为增加了格点天气之类的接口。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-4-26 03:09 , Processed in 0.132314 second(s), 33 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表