Add required changes to support MQTT discovery that I previously missed. See #6481.

This commit is contained in:
Robbie Trencheny 2017-03-08 23:57:54 -08:00
parent 06bc062221
commit ddc260b628
3 changed files with 8 additions and 0 deletions

View file

@ -66,6 +66,9 @@ PLATFORM_SCHEMA = PLATFORM_SCHEMA.extend({
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Setup a MQTT Template light."""
if discovery_info is not None:
config = PLATFORM_SCHEMA(discovery_info)
async_add_devices([MqttTemplate(
hass,
config.get(CONF_NAME),