Closed emontnemery closed 2 years ago
mqtt.async_publish is a couroutine in HA core 2021.12: home-assistant/core#58441
mqtt.async_publish
This is a breaking change, and the custom component will stop working if not adapted. This can be solved as suggested here: https://github.com/blakeblackshear/frigate-hass-integration/pull/166
If mqtt.async_publish is called from a non-coroutine, use hass.async_create_task if it's not practical to convert the caller to a coroutine:
hass.async_create_task
hass.async_create_task(mqtt.async_publish(hass, topic, payload))
Updated using suggested solution: ass.async_create_task(mqtt.async_publish(hass, topic, payload))
mqtt.async_publish
is a couroutine in HA core 2021.12: home-assistant/core#58441This is a breaking change, and the custom component will stop working if not adapted. This can be solved as suggested here: https://github.com/blakeblackshear/frigate-hass-integration/pull/166
If
mqtt.async_publish
is called from a non-coroutine, usehass.async_create_task
if it's not practical to convert the caller to a coroutine: