- 积分
- 336
- 金钱
- 262
- 威望
- 0
- 贡献
- 0
- HASS币
- 0
中级会员
- 积分
- 336
- 金钱
- 262
- HASS币
- 0
|
发表于 2022-7-20 09:48:42
|
显示全部楼层
HA使用一段时间之后,突然实体就失效,不重启HA的话,实体不会报错就是操作无效,重启HA之后显示实体不可用,但是稍微重新修改一下configuration.yaml之后又可以了(实际没修改,就是删了代码重新加一遍)。还请楼主大佬看看问题出在哪儿了
我的代码如下:
climate:
- platform: gree2
scan_interval: 1
host: 192.168.1.25
temp_sensor:
d0597f1c000000: sensor.cgdn1_04cf8c28b43f_temperature
5b9b5b1c000000: sensor.0x158d480110ea11_temperature
00e87f1c000000: sensor.0x158deeb5f17bd7_temperature
我之前还以为是没设置IP地址造成的失联,后来设置了IP地址问题依旧,出现的时间目前还不确定,已经赶上三次了。
一般出现问题我发现都找不到日志,这个是昨天唯一看到的HA日志报错日志如下,还请大佬看看:
此错误来自自定义集成。
Logger: root
Source: custom_components/gree2/climate.py:178
Integration: gree2 (documentation, issues)
First occurred: 02:06:04 (1 occurrences)
Last logged: 02:06:04
Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/config/custom_components/gree2/climate.py", line 178, in socket_listen
_LOGGER.info('socket received from {}:{}'.format(address, data.decode('utf-8')))
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xde in position 93: invalid continuation byte
|
|