Adds MQTT Fan Discovery (#9463)

This commit is contained in:
Walter Huf authored and Pascal Vizeli committed 2017-09-17 11:32:22 +02:00
1 parent bda6d2c696
commit 8a3f8457e8
3 files changed
+22 -1

No files matched your search

+3
View File
@@ -78,6 +78,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 fan platform."""
if discovery_info is not None:
config = PLATFORM_SCHEMA(discovery_info)
async_add_devices([MqttFan(
config.get(CONF_NAME),
{