|
发表于 2018-8-26 08:54:53
|
显示全部楼层
升级python-miio到0.4.1,还是报错,之前是0.4.0,至少还有一个开关按钮
xiaomi_miio_fan: Error on device update!
Traceback (most recent call last):
File "/usr/src/app/homeassistant/helpers/entity_platform.py", line 248, in _async_add_entity
await entity.async_device_update(warning=False)
File "/usr/src/app/homeassistant/helpers/entity.py", line 320, in async_device_update
yield from self.async_update()
File "/config/custom_components/fan/xiaomi_miio_fan.py", line 433, in async_update
key, value in self._available_attributes.items()})
File "/config/custom_components/fan/xiaomi_miio_fan.py", line 433, in <dictcomp>
key, value in self._available_attributes.items()})
File "/config/custom_components/fan/xiaomi_miio_fan.py", line 297, in _extract_value_from_attribute
value = getattr(state, attribute)
File "/config/deps/lib/python3.6/site-packages/miio/fan.py", line 178, in button_pressed
if self.data["button_pressed"] is not None:
KeyError: 'button_pressed'
|
|