From d07e40c483be32b2d3bdf90a2dbdd7d6ebfbabbb Mon Sep 17 00:00:00 2001 From: gstorer Date: Mon, 18 Jun 2018 12:05:14 +0800 Subject: [PATCH] Expose Wemo component availability to home assistant (#14995) * Expose Wemo component availability to home assistant * Do not add availability feature to dimmer - it works differently * Brain fade, deleted completely the wrong thing. Revert "Do not add availability feature to dimmer - it works differently" This reverts commit f64e7179818fa12d8290ac32de0680025a7eff21. * (2nd attempt) Do not add availability feature to dimmer - it works differently --- homeassistant/components/light/wemo.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/homeassistant/components/light/wemo.py b/homeassistant/components/light/wemo.py index fcf3d2f7a7d..4cd34b698da 100644 --- a/homeassistant/components/light/wemo.py +++ b/homeassistant/components/light/wemo.py @@ -107,6 +107,11 @@ class WemoLight(Light): """Flag supported features.""" return SUPPORT_WEMO + @property + def available(self): + """Return if light is available.""" + return self.device.state['available'] + def turn_on(self, **kwargs): """Turn the light on.""" transitiontime = int(kwargs.get(ATTR_TRANSITION, 0))