Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: 获取家庭失败 #22

Closed
xdatoutou opened this issue Dec 16, 2024 · 8 comments · Fixed by #80
Closed

[Bug]: 获取家庭失败 #22

xdatoutou opened this issue Dec 16, 2024 · 8 comments · Fixed by #80
Assignees
Labels
bug Something isn't working

Comments

@xdatoutou
Copy link

Describe the bug / 描述问题

添加账号时,提示获取家庭失败。另一个小米账号就可以

To Reproduce / 复现步骤

1.添加集成
2.点击登陆
3.提示获取家庭失败

Expected behavior / 预期结果

能正常获取家庭和设备

Home Assistant Logs / 系统日志

No response

Home Assistant Core version / Home Assistant Core 版本

2024.12.3

Home Assistant Operation System version / Home Assistant Operation System 版本

13.0

Xiaomi Home integration version / 米家集成版本

V0.1.0

Additional context / 其他说明

image

@xdatoutou xdatoutou added the bug Something isn't working label Dec 16, 2024
@topsworld topsworld self-assigned this Dec 17, 2024
@topsworld
Copy link
Contributor

您好,麻烦帮忙复现下,然后提供下ha的日志

@xdatoutou
Copy link
Author

xdatoutou commented Dec 17, 2024 via email

@xdatoutou
Copy link
Author

邮件回复居然没有图片。我重新发

image
image
image
image

@xdatoutou
Copy link
Author

您好,麻烦帮忙复现下,然后提供下ha的日志

已经在评论区贴上日志了

@xdatoutou
Copy link
Author

您好,麻烦帮忙复现下,然后提供下ha的日志

加上debug日志

2024-12-17 04:13:20.852 DEBUG (MainThread) [homeassistant.components.http.auth] Authenticated 192.168.50.144 for /api/config/config_entries/flow/01JF9CJGR61FGTVKTA3WZJ6M57 using bearer token
2024-12-17 04:13:20.853 DEBUG (MainThread) [homeassistant.helpers.http] Serving /api/config/config_entries/flow/01JF9CJGR61FGTVKTA3WZJ6M57 to 192.168.50.144 (auth: True)
2024-12-17 04:13:20.853 ERROR (MainThread) [custom_components.xiaomi_home.config_flow] task_oauth exception, get_homeinfo_error

@xdatoutou
Copy link
Author

xdatoutou commented Dec 17, 2024

您好,麻烦帮忙复现下,然后提供下ha的日志

定位到错误原因了,不知道为什么有一个特殊的房间,没有名称(room_name),我在米家APP没看到这个房间

2024-12-17 04:59:48.426 INFO (MainThread) [custom_components.xiaomi_home.miot.miot_cloud] get room_info aaa, {'dids': ['proxy.70022213109.2.61765779']}
2024-12-17 04:59:48.426 INFO (MainThread) [custom_components.xiaomi_home.miot.miot_cloud] {'dids': ['proxy.70022213109.2.61765779']}
2024-12-17 04:59:48.434 ERROR (MainThread) [custom_components.xiaomi_home.config_flow] get_homeinfos error 111, 'room_name', Traceback (most recent call last):
File "/config/custom_components/xiaomi_home/config_flow.py", line 364, in __check_oauth_async
await self._miot_http.get_devices_async())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/config/custom_components/xiaomi_home/miot/miot_cloud.py", line 625, in get_devices_async
room_id] = room_info['room_name']
~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'room_name'

@topsworld
Copy link
Contributor

感谢,问题定位了,我们安排修复

@topsworld topsworld linked a pull request Dec 17, 2024 that will close this issue
@topsworld
Copy link
Contributor

v0.1.1版本已修复,如果问题仍存在,可reopen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants