找回密码
 立即注册
查看: 2062|回复: 1

[插件集成] 2023.3之后自定义集成 async_setup_platforms 需要修改了

[复制链接]

78

主题

1346

回帖

2万

积分

元老级技术达人

积分
27796
金钱
26332
HASS币
290
发表于 2023-2-2 22:46:29 | 显示全部楼层 |阅读模式
Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for ha_cloud_music using this method at custom_components/ha_cloud_music/__init__.py, line 23: hass.config_entries.async_setup_platforms(entry, PLATFORMS)
Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for hf_weather using this method at custom_components/hf_weather/__init__.py, line 11: hass.config_entries.async_setup_platforms(entry, PLATFORMS)
Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for espplayer using this method at custom_components/espplayer/__init__.py, line 28: hass.config_entries.async_setup_platforms(entry, PLATFORMS)
Detected integration that called async_setup_platforms instead of awaiting async_forward_entry_setups; this will fail in version 2023.3. Please report issue to the custom integration author for dlna_dmr_xiaodu using this method at custom_components/dlna_dmr_xiaodu/__init__.py, line 20: hass.config_entries.async_setup_platforms(entry, PLATFORMS)


按提示找到以下代码:
hass.config_entries.async_setup_platforms(entry, PLATFORMS)

修改为:
await hass.config_entries.async_forward_entry_setups(entry, PLATFORMS)


如果集成作者已更新,更新成新版本就好了。

回复

使用道具 举报

18

主题

583

回帖

4534

积分

元老级技术达人

积分
4534
金钱
3898
HASS币
182
发表于 2023-2-3 11:11:40 | 显示全部楼层
兼容性跟开玩笑一样
回复

使用道具 举报

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

本版积分规则

Archiver|手机版|小黑屋|Hassbian ( 晋ICP备17001384号-1 )

GMT+8, 2025-5-18 23:41 , Processed in 0.130509 second(s), 22 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

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