mirror of
https://github.com/home-assistant/core.git
synced 2025-07-17 18:27:09 +00:00
Bump pywemo version, turn off polling, tidy trace.
This commit is contained in:
parent
d69c1b848a
commit
bb8af3a2d5
@ -12,7 +12,7 @@ from homeassistant.components.switch import SwitchDevice
|
|||||||
from homeassistant.const import (
|
from homeassistant.const import (
|
||||||
STATE_ON, STATE_OFF, STATE_STANDBY, EVENT_HOMEASSISTANT_STOP)
|
STATE_ON, STATE_OFF, STATE_STANDBY, EVENT_HOMEASSISTANT_STOP)
|
||||||
|
|
||||||
REQUIREMENTS = ['pywemo==0.3.7']
|
REQUIREMENTS = ['pywemo==0.3.8']
|
||||||
_LOGGER = logging.getLogger(__name__)
|
_LOGGER = logging.getLogger(__name__)
|
||||||
|
|
||||||
_WEMO_SUBSCRIPTION_REGISTRY = None
|
_WEMO_SUBSCRIPTION_REGISTRY = None
|
||||||
@ -69,15 +69,14 @@ class WemoSwitch(SwitchDevice):
|
|||||||
def _update_callback(self, _device, _params):
|
def _update_callback(self, _device, _params):
|
||||||
""" Called by the wemo device callback to update state. """
|
""" Called by the wemo device callback to update state. """
|
||||||
_LOGGER.info(
|
_LOGGER.info(
|
||||||
'Subscription update for %s, sevice=%s',
|
'Subscription update for %s',
|
||||||
self.name, _device)
|
_device)
|
||||||
self.update_ha_state(True)
|
self.update_ha_state(True)
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def should_poll(self):
|
def should_poll(self):
|
||||||
""" No polling should be needed with subscriptions """
|
""" No polling needed with subscriptions """
|
||||||
# but leave in for initial version in case of issues.
|
return False
|
||||||
return True
|
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def unique_id(self):
|
def unique_id(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user