mirror of
https://github.com/home-assistant/core.git
synced 2025-07-22 04:37:06 +00:00
Import mqtt (#64543)
Co-authored-by: epenet <epenet@users.noreply.github.com>
This commit is contained in:
parent
11d0dcf7ac
commit
c81ea9409a
@ -145,9 +145,7 @@ async def async_connect_mqtt(hass, component):
|
|||||||
message["topic"] = msg.topic
|
message["topic"] = msg.topic
|
||||||
hass.helpers.dispatcher.async_dispatcher_send(DOMAIN, hass, context, message)
|
hass.helpers.dispatcher.async_dispatcher_send(DOMAIN, hass, context, message)
|
||||||
|
|
||||||
await hass.components.mqtt.async_subscribe(
|
await mqtt.async_subscribe(hass, context.mqtt_topic, async_handle_mqtt_message, 1)
|
||||||
context.mqtt_topic, async_handle_mqtt_message, 1
|
|
||||||
)
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user