Open litecross91 opened 1 year ago
Logger: homeassistant.helpers.entity Source: components/sensor/init.py:593 First occurred: 17:49:54 (24 occurrences) Last logged: 17:52:54
Update for binary_sensor.lumi_aq2_8183_motion_sensor fails Update for binary_sensor.lumi_aq2_41b7_motion_sensor fails Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 591, in state numerical_value = float(value) # type:ignore[arg-type] ^^^^^^^^^^^^ ValueError: could not convert string to float: '5 minutes'
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 683, in async_update_ha_state await self.async_device_update() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 936, in async_device_update await self.async_update() File "/config/custom_components/xiaomi_miot/binary_sensor.py", line 334, in async_update await super().async_update() File "/config/custom_components/xiaomi_miot/init.py", line 1498, in async_update await self.async_update_for_main_entity() File "/config/custom_components/xiaomi_miot/binary_sensor.py", line 129, in async_update_for_main_entity self._update_sub_entities(['illumination', 'no_motion_duration'], domain='sensor') File "/config/custom_components/xiaomi_miot/init.py", line 2071, in _update_sub_entities self._subs[fnm].update_from_parent() File "/config/custom_components/xiaomi_miot/init.py", line 2428, in update_from_parent self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 730, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 830, in _async_write_ha_state state, attr = self._async_generate_attributes() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 771, in _async_generate_attributes state = self._stringify_state(available) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 736, in _stringify_state if (state := self.state) is None: ^^^^^^^^^^ File "/usr/src/homeassistant/homeassistant/components/sensor/init.py", line 593, in state raise ValueError( ValueError: Sensor sensor.lumi_aq2_8183_no_motion_duration has device class 'None', state class 'None' unit 'minutes' and suggested precision 'None' thus indicating it has a numeric value; however, it has the non-numeric value: '5 minutes' (<class 'str'>)
Try master branch.
Try master branch.
I'm sorry, but could you clarify that? What do you mean? I am using now a Xiaomi Gateway 3, lumi.gateway.v3, Firmware: 1.4.1_175.
Device model / 设备型号
lumi.sensor_motion.aq2
Component version / 插件版本
0.7.12
HA core version / HA版本
2023.9.1
Integrated mode / 集成方式
Automatic (自动模式)
The problem / 问题详情
My aqara motion sensors ( lumi.sensor_motion.aq2 ) shows only Clear status. In the Xiaomi app I can see the motion, but in HA just Clear state.
Entity attributes / 实体属性
Home Assistant Logs / 系统日志