Skip to content

无法初始化小米集成 - Unknown error occurred: Import Device's Family #613

Open
@yquan

Description

Describe the Bug / 描述问题

初始化导入房间设备的时候报错

How to Reproduce / 复现步骤

  1. goto Settings -> Devices & services -> ADD INTEGRATION in HA
  2. select "Xiaomi Home" in the popup
  3. Accept the Risk Notice and then go Next
  4. Basic configuration select Login Region: 中国大陆 Language: English OAuth2 Redirect URL: http://homeassistant.local:8123, and then go Next
  5. Redirect to account.xiaomi.com to Agree and link
  6. in the "Select Family and Device" select Import Device's Family and Room Name Sync Mode and then go Next
WechatIMG300

Expected Behavior / 预期结果

完成初始化

Reproduce Time / 问题复现的时间点

2024-01-09 16:32:33

Home Assistant Logs / 系统日志

Logger: homeassistant.config_entries
Source: config_entries.py:640
First occurred: 4:24:29 PM (1 occurrences)
Last logged: 4:24:29 PM

Error setting up entry YQ: 150242159 [中国大陆] for xiaomi_home
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 640, in __async_setup_with_context
result = await component.async_setup_entry(hass, self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_home/init.py", line 119, in async_setup_entry
await spec_parser.init_async()
File "/config/custom_components/xiaomi_home/miot/miot_spec.py", line 513, in init_async
spec_lib_new = await self.__request_spec_std_lib_async()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_home/miot/miot_spec.py", line 644, in __request_spec_std_lib_async
results = await asyncio.gather(*tasks)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_home/miot/miot_spec.py", line 744, in __get_template_list
reply = await self.__http_get_async(url=url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_home/miot/miot_spec.py", line 605, in __http_get_async
return await self._main_loop.run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
None, self.__http_get, url, params, headers)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError


Logger: custom_components.xiaomi_home.miot.miot_storage
Source: custom_components/xiaomi_home/miot/miot_storage.py:644
integration: Xiaomi Home (documentation, issues)
First occurred: 4:22:07 PM (1 occurrences)
Last logged: 4:22:07 PM

load_pem_x509_certificate failed, invalid COMMON_NAME, Traceback (most recent call last): File "/config/custom_components/xiaomi_home/miot/miot_storage.py", line 631, in user_cert_remaining_time_async raise MIoTCertError('invalid COMMON_NAME') custom_components.xiaomi_home.miot.miot_error.MIoTCertError: invalid COMMON_NAME

Log Timezone / 日志时区

Asia/Shanghai

Home Assistant Core Version / Home Assistant Core 版本

2025.1.1

Home Assistant Operation System Version / Home Assistant Operation System 版本

14.1

Xiaomi Home Integration Version / 米家集成版本

v0.1.4

Additional Context / 其他说明

No response

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions