Closed ggsddu-007 closed 3 years ago
已修复,下载新版试试
感恩大佬 估计还是不兼容我家的这种窗帘 如果增加其他米家生态的窗帘,是不是根据https://miot-spec.org/miot-spec-v2修改对应的siid piid数值就可以了
这一步没错,还有一步就是action的顺序可能不太一样,需要做调整
嗯嗯 siid一样 piid略有区别,不支持current_position 又注释掉了一行 把后面的position写死了,self.action 后面的数值也修改了,然后 File "/usr/src/homeassistant/homeassistant/components/cover/init.py", line 251, in async_open_cover await self.hass.async_add_executor_job(ft.partial(self.open_cover, *kwargs)) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, **self.kwargs) File "/config/custom_components/dooya_curtain/cover.py", line 183, in open_cover self.miotDevice.set_property("motor_control", self._action_open) File "/usr/local/lib/python3.8/site-packages/miio/miot_device.py", line 36, in set_property return self.send( File "/usr/local/lib/python3.8/site-packages/miio/device.py", line 146, in send return self._protocol.send( File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 213, in send self._handle_error(payload["error"]) File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 273, in _handle_error raise DeviceError(error) miio.exceptions.DeviceError: {'code': -9999, 'message': 'user ack timeout'}
悲剧继续上演
不支持窗帘位置?啥型号,发出来看看
当时图便宜买的 后来玩ha的时候就费劲了 syniot.curtain.syc1 https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:curtain:0000A00C:syniot-syc1:1
我更新了一版,使用target_position去获取current_position,理论上没问题,你试试 如果还是不行只能屏蔽设置百分比的功能了
还是同样的问题,也可能错误不是来自position这里 File "/usr/src/homeassistant/homeassistant/components/cover/init.py", line 289, in async_stop_cover await self.hass.async_add_executor_job(ft.partial(self.stop_cover, *kwargs)) File "/usr/local/lib/python3.8/concurrent/futures/thread.py", line 57, in run result = self.fn(self.args, **self.kwargs) File "/config/custom_components/dooya_curtain/cover.py", line 207, in stop_cover self.miotDevice.set_property("motor_control", self._action_pause) File "/usr/local/lib/python3.8/site-packages/miio/miot_device.py", line 36, in set_property return self.send( File "/usr/local/lib/python3.8/site-packages/miio/device.py", line 146, in send return self._protocol.send( File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 213, in send self._handle_error(payload["error"]) File "/usr/local/lib/python3.8/site-packages/miio/miioprotocol.py", line 273, in _handle_error raise DeviceError(error) miio.exceptions.DeviceError: {'code': -9999, 'message': 'user ack timeout'}
-9999这个错误估计是不支持,你可以本地调试一下试试
谢谢大佬 我自己再研究一下吧😀
Error adding entities for domain cover with platform dooya_curtain Error while setting up dooya_curtain platform for cover Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 314, in async_add_entities await asyncio.gather(*tasks) File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 505, in _async_add_entity await entity.add_to_platform_finish() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 531, in add_to_platform_finish self.async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 296, in async_write_ha_state self._async_write_ha_state() File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 320, in _async_write_ha_state sstate = self.state File "/config/custom_components/dooya_curtain/cover.py", line 123, in state closed = self.is_closed File "/config/custom_components/dooya_curtain/cover.py", line 169, in is_closed self.update_current_position() File "/config/custom_components/dooya_curtain/cover.py", line 145, in update_current_position if 95 < position < 100: TypeError: '<' not supported between instances of 'int' and 'NoneType'