Merge pull request #1152 from balloob/bump-pyvera-version

Bump pyvera, pywemo, add available for wemo
pull/1154/head
Paulus Schoutsen 2016-02-06 16:43:42 -08:00
commit 9fde97efed
5 changed files with 18 additions and 6 deletions

View File

@ -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__)

View File

@ -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__)

View File

@ -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__)

View File

@ -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()

View File

@ -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