From eb3e5cb67f1a0d64cf65c22c5f668448168e4009 Mon Sep 17 00:00:00 2001 From: Eric Severance Date: Wed, 17 Feb 2021 04:17:31 -0800 Subject: [PATCH] Remove calls to wemo.reconnect_with_device (#46646) --- homeassistant/components/wemo/binary_sensor.py | 1 - homeassistant/components/wemo/fan.py | 1 - homeassistant/components/wemo/light.py | 2 -- homeassistant/components/wemo/switch.py | 1 - tests/components/wemo/entity_test_helpers.py | 1 - 5 files changed, 6 deletions(-) diff --git a/homeassistant/components/wemo/binary_sensor.py b/homeassistant/components/wemo/binary_sensor.py index 2ea5f2d0b07..0d7f2532057 100644 --- a/homeassistant/components/wemo/binary_sensor.py +++ b/homeassistant/components/wemo/binary_sensor.py @@ -44,4 +44,3 @@ class WemoBinarySensor(WemoSubscriptionEntity, BinarySensorEntity): except ActionException as err: _LOGGER.warning("Could not update status for %s (%s)", self.name, err) self._available = False - self.wemo.reconnect_with_device() diff --git a/homeassistant/components/wemo/fan.py b/homeassistant/components/wemo/fan.py index faf1b50f1cd..678fd93fe05 100644 --- a/homeassistant/components/wemo/fan.py +++ b/homeassistant/components/wemo/fan.py @@ -158,7 +158,6 @@ class WemoHumidifier(WemoSubscriptionEntity, FanEntity): except ActionException as err: _LOGGER.warning("Could not update status for %s (%s)", self.name, err) self._available = False - self.wemo.reconnect_with_device() def turn_on( self, diff --git a/homeassistant/components/wemo/light.py b/homeassistant/components/wemo/light.py index 9aa7c945671..169534bf0c5 100644 --- a/homeassistant/components/wemo/light.py +++ b/homeassistant/components/wemo/light.py @@ -194,7 +194,6 @@ class WemoLight(WemoEntity, LightEntity): except ActionException as err: _LOGGER.warning("Could not update status for %s (%s)", self.name, err) self._available = False - self.wemo.bridge.reconnect_with_device() else: self._is_on = self._state.get("onoff") != WEMO_OFF self._brightness = self._state.get("level", 255) @@ -241,7 +240,6 @@ class WemoDimmer(WemoSubscriptionEntity, LightEntity): except ActionException as err: _LOGGER.warning("Could not update status for %s (%s)", self.name, err) self._available = False - self.wemo.reconnect_with_device() def turn_on(self, **kwargs): """Turn the dimmer on.""" diff --git a/homeassistant/components/wemo/switch.py b/homeassistant/components/wemo/switch.py index 4d2b9c007d4..f925aad3f72 100644 --- a/homeassistant/components/wemo/switch.py +++ b/homeassistant/components/wemo/switch.py @@ -180,4 +180,3 @@ class WemoSwitch(WemoSubscriptionEntity, SwitchEntity): except ActionException as err: _LOGGER.warning("Could not update status for %s (%s)", self.name, err) self._available = False - self.wemo.reconnect_with_device() diff --git a/tests/components/wemo/entity_test_helpers.py b/tests/components/wemo/entity_test_helpers.py index 87bc6fd7f40..4c92640572b 100644 --- a/tests/components/wemo/entity_test_helpers.py +++ b/tests/components/wemo/entity_test_helpers.py @@ -139,7 +139,6 @@ async def test_async_locked_update_with_exception( ) assert hass.states.get(wemo_entity.entity_id).state == STATE_UNAVAILABLE - pywemo_device.reconnect_with_device.assert_called_with() async def test_async_update_with_timeout_and_recovery(hass, wemo_entity, pywemo_device):