|
最多的这个是接入油烟机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'>)
|
|