diff --git a/homeassistant/components/light/vera.py b/homeassistant/components/light/vera.py index 46b4e7c7da8..48e84e5cfb4 100644 --- a/homeassistant/components/light/vera.py +++ b/homeassistant/components/light/vera.py @@ -15,7 +15,7 @@ from homeassistant.components.light import ATTR_BRIGHTNESS from homeassistant.const import EVENT_HOMEASSISTANT_STOP, STATE_ON -REQUIREMENTS = ['pyvera==0.2.7'] +REQUIREMENTS = ['pyvera==0.2.8'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/sensor/vera.py b/homeassistant/components/sensor/vera.py index c587764ae2e..fe003030e0c 100644 --- a/homeassistant/components/sensor/vera.py +++ b/homeassistant/components/sensor/vera.py @@ -15,7 +15,7 @@ from homeassistant.const import ( ATTR_BATTERY_LEVEL, ATTR_TRIPPED, ATTR_ARMED, ATTR_LAST_TRIP_TIME, TEMP_CELCIUS, TEMP_FAHRENHEIT, EVENT_HOMEASSISTANT_STOP) -REQUIREMENTS = ['pyvera==0.2.7'] +REQUIREMENTS = ['pyvera==0.2.8'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/switch/vera.py b/homeassistant/components/switch/vera.py index 3626175c03c..0655f29bbbf 100644 --- a/homeassistant/components/switch/vera.py +++ b/homeassistant/components/switch/vera.py @@ -21,7 +21,7 @@ from homeassistant.const import ( STATE_ON, STATE_OFF) -REQUIREMENTS = ['pyvera==0.2.7'] +REQUIREMENTS = ['pyvera==0.2.8'] _LOGGER = logging.getLogger(__name__) diff --git a/homeassistant/components/switch/wemo.py b/homeassistant/components/switch/wemo.py index d828e23464c..c6d92818466 100644 --- a/homeassistant/components/switch/wemo.py +++ b/homeassistant/components/switch/wemo.py @@ -12,7 +12,7 @@ from homeassistant.components.switch import SwitchDevice from homeassistant.const import ( STATE_ON, STATE_OFF, STATE_STANDBY, EVENT_HOMEASSISTANT_STOP) -REQUIREMENTS = ['pywemo==0.3.8'] +REQUIREMENTS = ['pywemo==0.3.9'] _LOGGER = logging.getLogger(__name__) _WEMO_SUBSCRIPTION_REGISTRY = None @@ -153,6 +153,18 @@ class WemoSwitch(SwitchDevice): """ True if switch is on. """ return self.wemo.get_state() + @property + def available(self): + """ True if switch is available. """ + if (self.wemo.model_name == 'Insight' and + self.insight_params is None): + return False + + if (self.wemo.model_name == 'Maker' and + self.maker_params is None): + return False + return True + def turn_on(self, **kwargs): """ Turns the switch on. """ self.wemo.on() diff --git a/requirements_all.txt b/requirements_all.txt index 23a758240a5..29baf410151 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -196,10 +196,10 @@ pyuserinput==0.1.9 # homeassistant.components.light.vera # homeassistant.components.sensor.vera # homeassistant.components.switch.vera -pyvera==0.2.7 +pyvera==0.2.8 # homeassistant.components.switch.wemo -pywemo==0.3.8 +pywemo==0.3.9 # homeassistant.components.thermostat.radiotherm radiotherm==1.2