Skip to content

Commit

Permalink
MQTT should load the provided platform not DOMAIN
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiet480 authored Mar 9, 2017
1 parent c625e21 commit 06bc062
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions homeassistant/components/mqtt/discovery.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import re

import homeassistant.components.mqtt as mqtt
from homeassistant.components.mqtt import DOMAIN
from homeassistant.helpers.discovery import async_load_platform
from homeassistant.const import CONF_PLATFORM
from homeassistant.components.mqtt import CONF_STATE_TOPIC
Expand Down Expand Up @@ -66,7 +65,7 @@ def async_device_message_received(topic, payload, qos):
discovery_topic, component, object_id)

yield from async_load_platform(
hass, component, DOMAIN, payload, hass_config)
hass, component, platform, payload, hass_config)

yield from mqtt.async_subscribe(
hass, discovery_topic + '/#', async_device_message_received, 0)
Expand Down

0 comments on commit 06bc062

Please sign in to comment.