Fix cloud integration with py3.11 (#88088)

In py3.11 `Passing coroutines is forbidden, use tasks explicitly`
This commit is contained in:
J. Nick Koston
2023-02-14 10:31:52 -06:00
committed by GitHub
parent 692920e01e
commit 85b852d8ad

View File

@@ -341,14 +341,20 @@ class CloudAlexaConfig(alexa_config.AbstractConfig):
if to_update:
tasks.append(
alexa_state_report.async_send_add_or_update_message(
self.hass, self, to_update
asyncio.create_task(
alexa_state_report.async_send_add_or_update_message(
self.hass, self, to_update
)
)
)
if to_remove:
tasks.append(
alexa_state_report.async_send_delete_message(self.hass, self, to_remove)
asyncio.create_task(
alexa_state_report.async_send_delete_message(
self.hass, self, to_remove
)
)
)
try: