Import mqtt (#64543)

Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
epenet 2022-01-20 12:01:42 +01:00 committed by GitHub
parent 11d0dcf7ac
commit c81ea9409a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -145,9 +145,7 @@ async def async_connect_mqtt(hass, component):
message["topic"] = msg.topic
hass.helpers.dispatcher.async_dispatcher_send(DOMAIN, hass, context, message)
await hass.components.mqtt.async_subscribe(
context.mqtt_topic, async_handle_mqtt_message, 1
)
await mqtt.async_subscribe(hass, context.mqtt_topic, async_handle_mqtt_message, 1)
return True