banzhanglaolin 发表于 2020-7-5 13:32:29

提示我汉化这是为什么

crazysiri 发表于 2020-7-5 14:35:04

banzhanglaolin 发表于 2020-7-5 13:32
提示我汉化这是为什么

提示你汉化?你发这个图的意思就是启动的时候会请求接口会卡主线程,可能会卡那么几秒,就是占了io而已,没有大的影响

dcy411075564 发表于 2021-1-2 15:11:33

现在新版本里好像不能显示了,

qq20017277 发表于 2021-1-2 16:49:23

大神作者,你的日历2021年千年虫病毒发了,你的实体失效了,求赶快更新吧

miniknife 发表于 2021-1-2 17:43:06

插件失效了

121665460 发表于 2021-1-4 10:17:32

本帖最后由 121665460 于 2021-1-4 11:03 编辑

Logger: homeassistant.components.sensor
Source: custom_components/chineseholiday/holiday.py:406
Integration: 传感器 (documentation, issues)
First occurred: 上午10:14:59 (1 occurrences)
Last logged: 上午10:14:59

chineseholiday: Error on device update!
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_add_entity
    await entity.async_device_update(warning=False)
File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 466, in async_device_update
    await task
File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run
    result = self.fn(*self.args, **self.kwargs)
File "/usr/src/homeassistant/homeassistant/util/__init__.py", line 239, in wrapper
    result = method(*args, **kwargs)
File "/config/custom_components/chineseholiday/sensor.py", line 492, in _update
    nearest = self.nearest_holiday()
File "/config/custom_components/chineseholiday/sensor.py", line 430, in nearest_holiday
    results = self._holiday.getHoliday()
File "/config/custom_components/chineseholiday/holiday.py", line 354, in getHoliday
    list = self.getholidayForNMonths()
File "/config/custom_components/chineseholiday/holiday.py", line 390, in getholidayForNMonths
    results = self.getonline40dholiday('101010100',str(year),"{:0>2d}".format(m))
File "/config/custom_components/chineseholiday/holiday.py", line 406, in getonline40dholiday
    list = json.loads(json_str)
File "/usr/local/lib/python3.8/json/__init__.py", line 357, in loads
    return _default_decoder.decode(s)
File "/usr/local/lib/python3.8/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/local/lib/python3.8/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

报错了。看代码是json解析失败了

121665460 发表于 2021-1-4 14:48:20

本帖最后由 121665460 于 2021-1-4 14:54 编辑

121665460 发表于 2021-1-4 10:17
报错了。看代码是json解析失败了
http://d1.weather.com.cn/calendar_new/2021/101010100_202100.html
发现日期错了,
385行改要成m = month + 1
github改好上提pull request了


crazysiri 发表于 2021-1-4 18:53:58

嗯哼,代码里有个bug,现在已经修复了,大家可以下载一下最新的代码,在那个git里 :https://github.com/Crazysiri/chineseholiday。

crazysiri 发表于 2021-1-4 18:57:23

121665460 发表于 2021-1-4 14:48
http://d1.weather.com.cn/calendar_new/2021/101010100_202100.html
发现日期错了,
385行改要成m = mont ...

你的思路是对的,但是会引起别的问题,我改完了

toher 发表于 2021-1-10 17:43:26

本帖最后由 toher 于 2021-1-10 17:45 编辑

请教!我更新了这两个文件,问什么还是显示出错?日志详细信息( ERROR )
Logger: frontend.js.latest.202012291
Source: components/system_log/__init__.py:193
First occurred: 下午5:36:27 (4 occurrences)
Last logged: 下午5:36:27

[*]http://192.168.1.xxx:xxx/local/custom-lovelace/ch_calendar-card/ch_calendar-card.js:225:42 Uncaught TypeError: Cannot read property 'attributes' of null
[*]http://192.168.1.xxx:xxx/lovelace/0:0:0 Uncaught
[*]http://192.168.1.xxx:xxx/local/community/lovelace-cn-map/cn-map-card.js:6:1 Uncaught SyntaxError: Unexpected token '<'



页: 1 2 3 4 5 6 7 8 [9] 10 11 12 13 14 15 16 17
查看完整版本: 【20200330显示xx生日(1岁)】节假日 纪念日 农历 阴历 阳历插件