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

 找回密码
 立即注册
楼主: Golden_Soap

[插件集成] 和风天气插件组(天气预报+生活提示+小时预报+空气质量)

  [复制链接]

8

主题

657

帖子

4191

积分

论坛元老

Rank: 8Rank: 8

积分
4191
金钱
3529
HASS币
0
QQ
发表于 2018-8-4 18:06:42 | 显示全部楼层
报错说访问失败
Error while accessing: https://way.jd.com/he/freeweather
回复

使用道具 举报

0

主题

130

帖子

886

积分

高级会员

Rank: 4

积分
886
金钱
756
HASS币
0
发表于 2018-8-5 07:37:17 | 显示全部楼层
tts 播报今天气温范围怎么搞?比如今天26-30摄氏度
回复

使用道具 举报

2

主题

44

帖子

251

积分

中级会员

Rank: 3Rank: 3

积分
251
金钱
207
HASS币
0
发表于 2018-8-5 20:45:09 | 显示全部楼层
学习学习一下
回复

使用道具 举报

0

主题

4

帖子

22

积分

新手上路

Rank: 1

积分
22
金钱
18
HASS币
0
发表于 2018-8-6 22:42:52 | 显示全部楼层
请问复制到哪个文件夹呢?
回复

使用道具 举报

2

主题

63

帖子

381

积分

论坛技术达人

积分
381
金钱
318
HASS币
0
 楼主| 发表于 2018-8-8 19:00:49 | 显示全部楼层
木鱼小呆 发表于 2018-8-6 22:42
请问复制到哪个文件夹呢?

详情可以去论坛看看别的基础配置贴,一看就能明白,就是custom文件夹相关的配置
回复

使用道具 举报

13

主题

107

帖子

1128

积分

论坛技术达人

积分
1128
金钱
996
HASS币
20

教程狂人卓越贡献突出贡献

发表于 2018-8-9 10:06:01 | 显示全部楼层
传感器少了最重要的 now pcpn 实时降雨量啊 没有雨水传感的 就靠这个了 尤其是配合推窗器
建议出个简单版 就几个传感器 now [tmp,hum, pcpn,wind] 就差不多了,能够用来自动化就好了
至于天气,说实话,手机上的界面好看又方便...
反正我从来没有在ha上看过天气....
唯一的墙壁安桌,也是hock了别的数据,也没直接用ha的数据....

个人建议....
不过代码写的很清晰,我就收下了,谢谢楼主
回复

使用道具 举报

0

主题

18

帖子

58

积分

注册会员

Rank: 2

积分
58
金钱
40
HASS币
0
发表于 2018-8-11 13:26:55 | 显示全部楼层
谢谢啊
回复

使用道具 举报

175

主题

2956

帖子

7555

积分

超级版主

我就是六神

Rank: 8Rank: 8

积分
7555
金钱
4574
HASS币
398

活跃会员教程狂人灌水之王

QQ
发表于 2018-8-13 21:55:02 | 显示全部楼层

0.75.2 Hassio 报错如下:

2018-08-13 21:40:35 ERROR (MainThread) [custom_components.sensor.heweather] Error while accessing: [url]https://way.jd.com/he/freeweather[/url]
2018-08-13 21:40:35 ERROR (MainThread) [custom_components.sensor.heweather_hourlyforecast] Error while accessing: [url]https://way.jd.com/he/freeweather[/url]
2018-08-13 21:40:35 ERROR (MainThread) [custom_components.sensor.lifesuggestion] Error while accessing: [url]https://way.jd.com/he/freeweather[/url]
2018-08-13 21:40:35 ERROR (MainThread) [homeassistant.components.sensor] heweather_hourlyforecast: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/heweather_hourlyforecast.py", line 198, in async_update
    if self._data.hour_3[1] in j:
TypeError: 'NoneType' object is not subscriptable
2018-08-13 21:40:35 ERROR (MainThread) [homeassistant.components.sensor] heweather_hourlyforecast: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/heweather_hourlyforecast.py", line 148, in async_update
    self._state = self._data.hour_6[0]+' '+self._data.hour_6[1]+' '+self._data.hour_6[2]+'℃'
TypeError: 'NoneType' object is not subscriptable
2018-08-13 21:40:36 ERROR (MainThread) [homeassistant.components.sensor] heweather_hourlyforecast: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/heweather_hourlyforecast.py", line 141, in async_update
    self._state = self._data.hour_3[0]+' '+self._data.hour_3[1]+' '+self._data.hour_3[2]+'℃'
TypeError: 'NoneType' object is not subscriptable
2018-08-13 21:40:36 ERROR (MainThread) [homeassistant.components.sensor] heweather_hourlyforecast: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/heweather_hourlyforecast.py", line 155, in async_update
    self._state = self._data.hour_9[0]+' '+self._data.hour_9[1]+' '+self._data.hour_9[2]+'℃'
TypeError: 'NoneType' object is not subscriptable
2018-08-13 21:40:36 ERROR (MainThread) [homeassistant.components.sensor] lifesuggestion: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/lifesuggestion.py", line 157, in async_update
    self._state = self._data.trav[0]
TypeError: 'NoneType' object is not subscriptable
2018-08-13 21:40:36 ERROR (MainThread) [homeassistant.components.sensor] lifesuggestion: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/lifesuggestion.py", line 155, in async_update
    self._state = self._data.sport[0]
TypeError: 'NoneType' object is not subscriptable
2018-08-13 21:40:36 ERROR (MainThread) [homeassistant.components.sensor] lifesuggestion: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/lifesuggestion.py", line 159, in async_update
    self._state = self._data.uv[0]
TypeError: 'NoneType' object is not subscriptable
2018-08-13 21:40:36 ERROR (MainThread) [homeassistant.components.sensor] lifesuggestion: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/lifesuggestion.py", line 149, in async_update
    self._state = self._data.cw[0]
TypeError: 'NoneType' object is not subscriptable
2018-08-13 21:40:36 ERROR (MainThread) [homeassistant.components.sensor] lifesuggestion: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/lifesuggestion.py", line 147, in async_update
    self._state = self._data.comf[0]
TypeError: 'NoneType' object is not subscriptable
2018-08-13 21:40:36 ERROR (MainThread) [homeassistant.components.sensor] lifesuggestion: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/lifesuggestion.py", line 145, in async_update
    self._state = self._data.air[0]
TypeError: 'NoneType' object is not subscriptable
2018-08-13 21:40:36 ERROR (MainThread) [homeassistant.components.sensor] lifesuggestion: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/lifesuggestion.py", line 153, in async_update
    self._state = self._data.flu[0]
TypeError: 'NoneType' object is not subscriptable
2018-08-13 21:40:36 ERROR (MainThread) [homeassistant.components.sensor] lifesuggestion: Error on device update!
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
    await entity.async_device_update(warning=False)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 320, in async_device_update
    yield from self.async_update()
  File "/usr/local/lib/python3.6/asyncio/coroutines.py", line 212, in coro
    res = func(*args, **kw)
  File "/config/custom_components/sensor/lifesuggestion.py", line 151, in async_update
    self._state = self._data.drsg[0]
TypeError: 'NoneType' object is not subscriptable
回复

使用道具 举报

0

主题

11

帖子

38

积分

新手上路

Rank: 1

积分
38
金钱
27
HASS币
0
发表于 2018-8-14 00:57:27 | 显示全部楼层
謝謝阿~~
回复

使用道具 举报

6

主题

181

帖子

613

积分

高级会员

Rank: 4

积分
613
金钱
432
HASS币
0
发表于 2018-8-16 15:08:51 | 显示全部楼层
Invalid config for [sensor.heweather_hourlyforecast]: value is not allowed @ data['options'][0]. Got 'remind'. (See ?, line ?). Please check the docs at https://home-assistant.io/compon ... her_hourlyforecast/

remind不良天气好像有问题。另外能不能请增加一个降雨概率提醒呢。这个其实比较重要
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-3 12:03 , Processed in 1.837175 second(s), 38 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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