From bbf8897a5139555cfbd140b98cd71fd6dd7af65a Mon Sep 17 00:00:00 2001
From: pavoni <mail@gregdowling.com>
Date: Thu, 25 Feb 2016 23:02:36 +0000
Subject: [PATCH] Add LightSwitch to discovery, default unnown devices to
 switches for compatability.

---
 homeassistant/components/wemo.py | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/homeassistant/components/wemo.py b/homeassistant/components/wemo.py
index fb1cc4e77d3..9dc144266a8 100644
--- a/homeassistant/components/wemo.py
+++ b/homeassistant/components/wemo.py
@@ -25,6 +25,7 @@ WEMO_MODEL_DISPATCH = {
     'Maker':   DISCOVER_SWITCHES,
     'Motion':  DISCOVER_MOTION,
     'Socket':  DISCOVER_SWITCHES,
+    'LightSwitch': DISCOVER_SWITCHES
 }
 WEMO_SERVICE_DISPATCH = {
     DISCOVER_LIGHTS: 'light',
@@ -64,12 +65,11 @@ def setup(hass, config):
             return
         KNOWN_DEVICES.append(mac)
 
-        service = WEMO_MODEL_DISPATCH.get(model_name)
+        service = WEMO_MODEL_DISPATCH.get(model_name) or DISCOVER_SWITCHES
         component = WEMO_SERVICE_DISPATCH.get(service)
 
-        if service is not None:
-            discovery.discover(hass, service, discovery_info,
-                               component, config)
+        discovery.discover(hass, service, discovery_info,
+                           component, config)
 
     discovery.listen(hass, discovery.SERVICE_WEMO, discovery_dispatch)
 
-- 
GitLab