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

 找回密码
 立即注册
查看: 2250|回复: 7

[求助] L大的彩云天气SE还有可能会有人修一下么?

[复制链接]

75

主题

1976

帖子

8181

积分

元老级技术达人

积分
8181
金钱
6155
HASS币
430

活跃会员教程狂人

发表于 2021-12-20 19:09:21 | 显示全部楼层 |阅读模式
今年最后一个HA的版本升级变动比较大,改了各类设置的入口同时也让一些比较经典的插件挂了,L大的彩云SE当初开发出来应该也是一个很惊艳的天气插件了,这次终于不行了,报错信息:

Logger: homeassistant.components.websocket_api.http.connection
Source: components/hassio/__init__.py:599
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 19:01:32 (1 occurrences)
Last logged: 19:01:32

[139837741542656] The system cannot restart because the configuration is not valid: Platform error sensor.CaiyunweatherSE - cannot import name 'sanitize_filename' from 'homeassistant.util' (/usr/src/homeassistant/homeassistant/util/__init__.py)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 185, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1495, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1530, in _execute_service
    await handler.job.target(service_call)
  File "/usr/src/homeassistant/homeassistant/components/hassio/__init__.py", line 599, in async_handle_core_service
    raise HomeAssistantError(
homeassistant.exceptions.HomeAssistantError: The system cannot restart because the configuration is not valid: Platform error sensor.CaiyunweatherSE - cannot import name 'sanitize_filename' from 'homeassistant.util' (/usr/src/homeassistant/homeassistant/util/__init__.py)


这个sanitize_filename的报错作为只会抄作业的外行人也看不懂,有没有大神指点一下或者fix一下的,感谢。

L大神的原帖:https://bbs.hassbian.com/thread-1003-1-1.html。经历过诸多版本的升级,这次它终于挂了。。。
所有过往,皆为序章。
回复

使用道具 举报

23

主题

656

帖子

4613

积分

元老级技术达人

积分
4613
金钱
3942
HASS币
30

教程狂人

QQ
发表于 2021-12-20 20:42:50 | 显示全部楼层
改用NodeRed自己接入彩云的API吧,不怕HA插件挂掉
回复

使用道具 举报

75

主题

1976

帖子

8181

积分

元老级技术达人

积分
8181
金钱
6155
HASS币
430

活跃会员教程狂人

 楼主| 发表于 2021-12-20 21:10:17 | 显示全部楼层
alei643 发表于 2021-12-20 20:42
改用NodeRed自己接入彩云的API吧,不怕HA插件挂掉

嗯,那个我有,主要是对这个插件非常的有感情,总是想着能一直用,我玩界面,里面有好些地方也用到了一些sensor,所以还是希望能一直用下去,很怀念L大
所有过往,皆为序章。
回复

使用道具 举报

0

主题

128

帖子

1262

积分

金牌会员

Rank: 6Rank: 6

积分
1262
金钱
1134
HASS币
0
发表于 2021-12-20 22:42:42 | 显示全部楼层
忍不住升级了?
回复

使用道具 举报

75

主题

1976

帖子

8181

积分

元老级技术达人

积分
8181
金钱
6155
HASS币
430

活跃会员教程狂人

 楼主| 发表于 2021-12-21 05:45:46 | 显示全部楼层

升啊,不升级玩啥了
所有过往,皆为序章。
回复

使用道具 举报

23

主题

656

帖子

4613

积分

元老级技术达人

积分
4613
金钱
3942
HASS币
30

教程狂人

QQ
发表于 2021-12-21 10:17:46 | 显示全部楼层
咸味土豆 发表于 2021-12-20 21:10
嗯,那个我有,主要是对这个插件非常的有感情,总是想着能一直用,我玩界面,里面有好些地方也用到了一些 ...

那是当然。要在HA中用的话,可以再NR里直接将传感器的值回传给HA,又不麻烦
回复

使用道具 举报

3

主题

107

帖子

879

积分

高级会员

Rank: 4

积分
879
金钱
772
HASS币
0
发表于 2022-5-7 09:35:14 | 显示全部楼层
本帖最后由 big111boy 于 2022-5-7 09:39 编辑

非常喜欢L大的这款彩云插件,试着修复了下,sanitize_filename这个函数在新版本里更名为raise_if_invalid_filename了,暂时用着正常。顺便请教下楼主,icloud日历现在能正常同步吗?申请了APP专用密码,但是一直报错

calendar:
  - platform: caldav
    url: https://caldav.icloud.com
    username: !secret icloud_username
    password: !secret icloud_app_password

Error while setting up caldav platform for calendarTraceback (most recent call last):  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn    conn = connection.create_connection(  File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 72, in create_connection    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):  File "/usr/local/lib/python3.9/socket.py", line 954, in getaddrinfo    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):socket.gaierror: [Errno -2] Name does not resolveDuring handling of the above exception, another exception occurred:Traceback (most recent call last):  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 703, in urlopen    httplib_response = self._make_request(  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 386, in _make_request    self._validate_conn(conn)  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1040, in _validate_conn    conn.connect()  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 358, in connect    self.sock = conn = self._new_conn()  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn    raise NewConnectionError(urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0xffff76675e20>: Failed to establish a new connection: [Errno -2] Name does not resolveDuring handling of the above exception, another exception occurred:Traceback (most recent call last):  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 440, in send    resp = conn.urlopen(  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 785, in urlopen    retries = retries.increment(  File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment    raise MaxRetryError(_pool, url, error or ResponseError(cause))urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='p206-caldav.icloud.com', port=443): Max retries exceeded with url: /484669619/calendars/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff76675e20>: Failed to establish a new connection: [Errno -2] Name does not resolve'))During handling of the above exception, another exception occurred:Traceback (most recent call last):  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 249, in _async_setup_platform    await asyncio.shield(task)  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run    result = self.fn(*self.args, **self.kwargs)  File "/usr/src/homeassistant/homeassistant/components/caldav/calendar.py", line 87, in setup_platform    calendars = client.principal().calendars()  File "/usr/local/lib/python3.9/site-packages/caldav/objects.py", line 474, in calendars    return self.calendar_home_set.calendars()  File "/usr/local/lib/python3.9/site-packages/caldav/objects.py", line 310, in calendars    data = self.children(cdav.Calendar.tag)  File "/usr/local/lib/python3.9/site-packages/caldav/objects.py", line 102, in children    response = self._query_properties(props+multiprops, depth)  File "/usr/local/lib/python3.9/site-packages/caldav/objects.py", line 141, in _query_properties    return self._query(root, depth)  File "/usr/local/lib/python3.9/site-packages/caldav/objects.py", line 159, in _query    ret = getattr(self.client, query_method)(  File "/usr/local/lib/python3.9/site-packages/caldav/davclient.py", line 398, in propfind    return self.request(url or self.url, "PROPFIND", props,  File "/usr/local/lib/python3.9/site-packages/caldav/davclient.py", line 588, in request    r = self.session.request(  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 529, in request    resp = self.send(prep, **send_kwargs)  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 645, in send    r = adapter.send(request, **kwargs)  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 519, in send    raise ConnectionError(e, request=request)requests.exceptions.ConnectionError: HTTPSConnectionPool(host='p206-caldav.icloud.com', port=443): Max retries exceeded with url: /484669619/calendars/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xffff76675e20>: Failed to establish a new connection: [Errno -2] Name does not resolve'))


sensor.py.zip (11.91 KB, 下载次数: 15)



回复

使用道具 举报

75

主题

1976

帖子

8181

积分

元老级技术达人

积分
8181
金钱
6155
HASS币
430

活跃会员教程狂人

 楼主| 发表于 2022-5-7 22:23:51 | 显示全部楼层
big111boy 发表于 2022-5-7 09:35
非常喜欢L大的这款彩云插件,试着修复了下,sanitize_filename这个函数在新版本里更名为raise_if_invalid_f ...

谢谢大佬修改,iCloud日历我这里也挂了,看看官方看看会不会更新
所有过往,皆为序章。
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-26 01:44 , Processed in 0.073553 second(s), 34 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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