请选择 进入手机版 | 继续访问电脑版

『瀚思彼岸』» 智能家居第一站

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

[插件发布] 彩云天气S【8月18日更新】增加8小时最大降雨量

  [复制链接]

0

主题

34

帖子

259

积分

中级会员

Rank: 3Rank: 3

积分
259
金钱
225
HASS币
0
发表于 2017-8-15 10:29:33 来自手机 | 显示全部楼层
谢谢大佬分享,下一步准备搞天气了
回复

使用道具 举报

5

主题

60

帖子

367

积分

论坛技术达人

Miracle

积分
367
金钱
307
HASS币
0
发表于 2017-8-16 07:45:35 | 显示全部楼层
不错~~,搜下了~~~~~~~
回复

使用道具 举报

6

主题

194

帖子

616

积分

高级会员

小白

Rank: 4

积分
616
金钱
422
HASS币
0
发表于 2017-8-17 10:40:05 | 显示全部楼层
666666666666.....
回复

使用道具 举报

1

主题

64

帖子

405

积分

中级会员

Rank: 3Rank: 3

积分
405
金钱
341
HASS币
0
发表于 2017-8-17 12:00:37 | 显示全部楼层
准备试一下用彩云,好像要申请API?
回复

使用道具 举报

208

主题

1198

帖子

6241

积分

超级版主

Rank: 8Rank: 8

积分
6241
金钱
5013
HASS币
235

教程狂人论坛风云人物突出贡献

 楼主| 发表于 2017-8-17 12:31:09 | 显示全部楼层
opalhair 发表于 2017-8-17 12:00
准备试一下用彩云,好像要申请API?

是的,要等审核。
回复

使用道具 举报

4

主题

155

帖子

1065

积分

金牌会员

Rank: 6Rank: 6

积分
1065
金钱
910
HASS币
0
发表于 2017-8-17 13:01:35 | 显示全部楼层
有没有显示不了实时天气的,代码错误如下
[AppleScript] 纯文本查看 复制代码
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 440, in update
    self.data_currently = self.data_currently['result']['precipitation']['nearest']
KeyError: 'precipitation'
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 443, in update
    self.data_currently = self.data_currently['result']['precipitation']['local']
KeyError: 'precipitation'
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 446, in update
    self.data_currently = self.data_currently['result']['precipitation']['local']
KeyError: 'precipitation'
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 449, in update
    self.data_currently = self.data_currently['result']['wind']
KeyError: 'wind'
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 452, in update
    self.data_currently = self.data_currently['result']['wind']
KeyError: 'wind'
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 433, in update
    self._state = self.data_currently [self._sensor]
KeyError: 'temperature'
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 407, in update
    if self.data_currently ['skycon'] == 'CLEAR_DAY':
KeyError: 'skycon'
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 428, in update
    self._state = self.data_currently['result']['cloudrate']*100
KeyError: 'cloudrate'
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 433, in update
    self._state = self.data_currently [self._sensor]
KeyError: 'aqi'
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 430, in update
    self._state = round(self.data_currently['result']['humidity']*100,2)
KeyError: 'humidity'
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 433, in update
    self._state = self.data_currently [self._sensor]
KeyError: 'pm25'
2017-08-17 12:54:46 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.5/asyncio/tasks.py", line 242, in _step
    result = coro.throw(exc)
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/homeassistant/lib/python3.5/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity
    yield from self.hass.async_add_job(entity.update)
  File "/usr/lib/python3.5/asyncio/futures.py", line 381, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
    future.result()
  File "/usr/lib/python3.5/asyncio/futures.py", line 294, in result
    raise self._exception
  File "/usr/lib/python3.5/concurrent/futures/thread.py", line 55, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/home/homeassistant/.homeassistant/custom_components/sensor/CaiyunweatherS.py", line 437, in update
    self.data_currently = self.data_currently['result']['precipitation']['nearest']
KeyError: 'precipitation'

回复

使用道具 举报

0

主题

19

帖子

118

积分

注册会员

Rank: 2

积分
118
金钱
99
HASS币
0
发表于 2017-8-17 13:04:55 | 显示全部楼层
学习,感谢分享
回复

使用道具 举报

5

主题

142

帖子

771

积分

高级会员

Rank: 4

积分
771
金钱
629
HASS币
0
发表于 2017-8-17 13:38:55 | 显示全部楼层

强烈支持
!!!
回复

使用道具 举报

2

主题

61

帖子

226

积分

中级会员

Rank: 3Rank: 3

积分
226
金钱
164
HASS币
0
发表于 2017-8-17 14:41:58 | 显示全部楼层
支持一下, 也想加个天气
回复

使用道具 举报

208

主题

1198

帖子

6241

积分

超级版主

Rank: 8Rank: 8

积分
6241
金钱
5013
HASS币
235

教程狂人论坛风云人物突出贡献

 楼主| 发表于 2017-8-17 16:53:42 | 显示全部楼层
zorankeinfo 发表于 2017-8-17 13:01
有没有显示不了实时天气的,代码错误如下
[mw_shl_code=applescript,true]2017-08-17 12:54:46 ERROR (Main ...

https://api.caiyunapp.com/v2/这里填你的彩云apikey/{{states.zone.home.attributes.longitude}},{{states.zone.home.attributes.latitude}}/realtime
经纬度替换成你的经纬度
用浏览器打开这个网址看看有没['result']['precipitation']['nearest']
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2019-1-20 02:41 , Processed in 0.221365 second(s), 36 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

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