Support MQTT Lock discovery (#13303)

This commit is contained in:
Erik Eriksson authored and Paulus Schoutsen committed 2018-03-18 09:26:07 -07:00
1 parent 437ffc8337
commit 1cbf9792d7
2 files changed
+5 -1

No files matched your search

+3
View File
@@ -44,6 +44,9 @@ PLATFORM_SCHEMA = mqtt.MQTT_RW_PLATFORM_SCHEMA.extend({
@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
"""Set up the MQTT lock."""
if discovery_info is not None:
config = PLATFORM_SCHEMA(discovery_info)
value_template = config.get(CONF_VALUE_TEMPLATE)
if value_template is not None:
value_template.hass = hass