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

 找回密码
 立即注册
查看: 262|回复: 1

[技术探讨] Home Assistant xiaomi_miot 里面有比较多的报错,你们也是这样吗

[复制链接]

1

主题

3

帖子

28

积分

新手上路

Rank: 1

积分
28
金钱
25
HASS币
0
发表于 2024-4-17 10:12:31 | 显示全部楼层 |阅读模式
最多的这个是接入油烟机p1好像上报的参数类型不对,这种情况是不是可以修改xiaomi_miot 代码实现,但是我根据报错去找文件,是找不到相应的文件的。我很好奇,有没有大佬帮忙指点一下,


日志报错页面

日志报错页面

找不到报错文件

找不到报错文件





[backcolor=var(--mdc-theme-surface,#fff)][color=var(--mdc-dialog-content-ink-color,rgba(0,0,0,.6))]日志: homeassistant.helpers.entity
来源: helpers/entity.py:951
首次发生: 2024年4月16日 16:39:36 (2077 全部发生)
上次记录: 09:57:38
Update for light.cykj_jyj22_e389_light failsTraceback (most recent call last):  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 663, in state    numerical_value = int(value)                      ^^^^^^^^^^ValueError: invalid literal for int() with base 10: 'normal'During handling of the above exception, another exception occurred:Traceback (most recent call last):  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 666, in state    numerical_value = float(value)                      ^^^^^^^^^^^^ValueError: could not convert string to float: 'normal'The above exception was the direct cause of the following exception:Traceback (most recent call last):  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 951, in async_update_ha_state    await self.async_device_update()  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1268, in async_device_update    await self.async_update()  File "/config/custom_components/xiaomi_miot/__init__.py", line 1524, in async_update    await self.async_update_for_main_entity()  File "/config/custom_components/xiaomi_miot/__init__.py", line 1565, in async_update_for_main_entity    self._update_sub_entities(  File "/config/custom_components/xiaomi_miot/__init__.py", line 2101, in _update_sub_entities    self._subs[fnm].update_from_parent()  File "/config/custom_components/xiaomi_miot/__init__.py", line 2461, in update_from_parent    self.async_write_ha_state()  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 998, in async_write_ha_state    self._async_write_ha_state()  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1119, in _async_write_ha_state    state, attr, capabilities, shadowed_attr = self.__async_calculate_state()                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1056, in __async_calculate_state    state = self._stringify_state(available)            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1004, in _stringify_state    if (state := self.state) is None:                 ^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/components/sensor/__init__.py", line 670, in state    raise ValueError(ValueError: Sensor sensor.cykj_jyj22_e389_battery_level has device class 'None', state class 'measurement' unit 'None' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: 'normal' (<class 'str'>)






回复

使用道具 举报

1

主题

3

帖子

28

积分

新手上路

Rank: 1

积分
28
金钱
25
HASS币
0
 楼主| 发表于 2024-4-17 10:14:47 | 显示全部楼层
大佬来帮帮忙吧,实在是找不到报错文件的位置
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-5-9 07:22 , Processed in 0.173973 second(s), 26 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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