mirror of
https://github.com/home-assistant/core.git
synced 2025-08-09 15:45:08 +02:00
Expose Wemo component availability to home assistant
This commit is contained in:
@@ -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))
|
||||
@@ -195,6 +200,11 @@ class WemoDimmer(Light):
|
||||
"""Return true if dimmer is on. Standby is on."""
|
||||
return self._state
|
||||
|
||||
@property
|
||||
def available(self):
|
||||
"""Return if dimmer is available."""
|
||||
return self.device.state['available']
|
||||
|
||||
def _update(self, force_update=True):
|
||||
"""Update the device state."""
|
||||
try:
|
||||
|
Reference in New Issue
Block a user