Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions homeassistant/components/switch/wemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,16 +61,14 @@ def __init__(self, device):
wemo.SUBSCRIPTION_REGISTRY.register(self.wemo)
wemo.SUBSCRIPTION_REGISTRY.on(self.wemo, None, self._update_callback)

def _update_callback(self, _device, _params):
def _update_callback(self, _device, _type, _params):
"""Called by the Wemo device callback to update state."""
_LOGGER.info(
'Subscription update for %s',
_device)
if self._model_name == 'CoffeeMaker':
self.wemo.subscription_callback(_params)
self._update(force_update=False)
else:
self.update()
updated = self.wemo.subscription_update(_type, _params)
self._update(force_update=(not updated))

if not hasattr(self, 'hass'):
return
self.schedule_update_ha_state()
Expand Down Expand Up @@ -219,5 +217,6 @@ def _update(self, force_update=True):
self.maker_params = self.wemo.maker_params
elif self._model_name == 'CoffeeMaker':
self.coffeemaker_mode = self.wemo.mode
except AttributeError:
_LOGGER.warning('Could not update status for %s', self.name)
except AttributeError as err:
_LOGGER.warning('Could not update status for %s (%s)',
self.name, err)
2 changes: 1 addition & 1 deletion homeassistant/components/wemo.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from homeassistant.const import EVENT_HOMEASSISTANT_STOP

REQUIREMENTS = ['pywemo==0.4.13']
REQUIREMENTS = ['pywemo==0.4.15']

DOMAIN = 'wemo'

Expand Down
2 changes: 1 addition & 1 deletion requirements_all.txt
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ pyvera==0.2.24
pywebpush==0.6.1

# homeassistant.components.wemo
pywemo==0.4.13
pywemo==0.4.15

# homeassistant.components.zabbix
pyzabbix==0.7.4
Expand Down