mirror of
https://github.com/home-assistant/core.git
synced 2025-07-29 18:28:14 +02:00
Merge pull request #1542 from balloob/fix_race_condition
Handle Wemo startup race condition.
This commit is contained in:
@ -45,6 +45,9 @@ class WemoBinarySensor(BinarySensorDevice):
|
||||
_LOGGER.info(
|
||||
'Subscription update for %s',
|
||||
_device)
|
||||
if not hasattr(self, 'hass'):
|
||||
self.update()
|
||||
return
|
||||
self.update_ha_state(True)
|
||||
|
||||
@property
|
||||
|
@ -63,6 +63,9 @@ class WemoSwitch(SwitchDevice):
|
||||
_LOGGER.info(
|
||||
'Subscription update for %s',
|
||||
_device)
|
||||
if not hasattr(self, 'hass'):
|
||||
self.update()
|
||||
return
|
||||
self.update_ha_state(True)
|
||||
|
||||
@property
|
||||
|
Reference in New Issue
Block a user