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

 找回密码
 立即注册
查看: 927|回复: 0

[基础教程] 求助!!!小米空调伴侣插座——学码问题

[复制链接]

1

主题

8

帖子

46

积分

新手上路

Rank: 1

积分
46
金钱
38
HASS币
0
发表于 2023-9-9 21:07:25 | 显示全部楼层 |阅读模式
调用xiaomi_miio.remote-learn-command学码会出现位置错误,如下图:

                               
登录/注册后可看大图

已经确认配置的ip和token都是正确的,错误日志详情如下,哪位大神帮忙看下是啥问题呀?

[backcolor=var(--mdc-theme-surface,#fff)][color=var(--mdc-dialog-content-ink-color,rgba(0,0,0,.6))]Logger: homeassistant.components.websocket_api.http.connection
Source: components/xiaomi_miio/remote.py:130
Integration: Home Assistant WebSocket API ([color=var(--primary-color)]documentation
, [color=var(--primary-color)]issues
)
First occurred: 19:08:58 (6 occurrences)
Last logged: 21:02:05
  • [547830530112] Error handling message: Unknown error (unknown_error) ian from 192.168.0.8 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36)
  • [547780928448] Error handling message: Unknown error (unknown_error) ian from 192.168.0.8 (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36)
Traceback (most recent call last):  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 26, in _handle_async_response    await func(hass, connection, msg)  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 716, in handle_execute_script    response = await script_obj.async_run(msg.get("variables"), context=context)               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 1569, in async_run    return await asyncio.shield(run.async_run())           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 420, in async_run    await self._async_step(log_exceptions=False)  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 470, in _async_step    self._handle_exception(  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 493, in _handle_exception    raise exception  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 468, in _async_step    await getattr(self, handler)()  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 703, in _async_call_service_step    response_data = await self._async_run_long_action(                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/helpers/script.py", line 665, in _async_run_long_action    return long_task.result()           ^^^^^^^^^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/core.py", line 1974, in async_call    response_data = await coro                    ^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/core.py", line 2011, in _execute_service    return await target(service_call)           ^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 828, in handle_service    await service.entity_service_call(  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 870, in entity_service_call    response_data = await _handle_entity_call(                    ^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 942, in _handle_entity_call    result = await task             ^^^^^^^^^^  File "/usr/src/homeassistant/homeassistant/components/xiaomi_miio/remote.py", line 130, in async_service_learn_handler    await hass.async_add_executor_job(device.learn, slot)  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run    result = self.fn(*self.args, **self.kwargs)             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.11/site-packages/miio/click_common.py", line 184, in _wrap    return func(self, *args, **kwargs)           ^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.11/site-packages/miio/chuangmi_ir.py", line 54, in learn    return self.send("miIO.ir_learn", {"key": str(key)})           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.11/site-packages/miio/device.py", line 107, in send    return self._protocol.send(           ^^^^^^^^^^^^^^^^^^^^  File "/usr/local/lib/python3.11/site-packages/miio/miioprotocol.py", line 214, in send    self._handle_error(payload["error"])  File "/usr/local/lib/python3.11/site-packages/miio/miioprotocol.py", line 275, in _handle_error    raise DeviceError(error)miio.exceptions.DeviceError: {'code': -32601, 'message': 'Method not found.'}





回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-26 21:41 , Processed in 0.078777 second(s), 23 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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