Would it be possible to add support for "api.home-connect.cn" domain to the home-connect inegration? aka.是否可以让home-connect集成添加对cn域名的支持?

The official integration with Home Connect API is currently unusable for users in China due to the regional domains. Chinese users are unable to log in to the designated authorization webpage using their SingleKey-ID. After weeks of tryouts and multiple calls, I discovered a small but crucial difference: the domain “api.home-connect.com” and the one ending with “cn” are separate servers that are not interconnected.

According to the Home Connect API documentation, if the app is intended to be used in China, the domain “api.home-connect.cn” should be used. I found the relevant code in the file “homeassistant/ components/home_connect/const.py” at the beginning.

However, as I am no developer and unsure about the potential consequences of compiling the code myself, I have to submitt a feature request to address this issue.

由于Home Connect API的区域化域名问题,这个官方集成目前无法在中国使用。因为它的存在,中国用户无法使用SingleKey-ID登录指定的授权网页。

经过数周的尝试和很多个电话后,我发现了一个微小但关键的差异:域名"api.home-connect.com"和以"api.home-connect.cn"是两个独立的服务器,除了特定的渠道外,彼此没有连接。

根据Home Connect API的文档,如果应用程序可能在中国使用,应该使用域名".cn"。我在const.py文件的第6行找到了相关的代码。

然而,由于我不懂开发,也不确定这样自行编译代码会有什么后果,因此我已经提交了一个功能请求来解决这个问题。

I think you’d better check this integration

in all ways for me it’s better then the official one, and I don’t even live in china;)

1 Like

This may be a way. I will try it out. Or maybe there is someway I can modify my own “const.py” file in buid-in integraiton? I am still searching…

I made it, using the integration you provided. Thanks a lot for the help! It’s proven that the “.cn” modification of the oauth webpage url leads to nowhere. Maybe next time I find a way to change the “const.py” for the build-in home-connect I will try it again.