From c040be423a20d4e21ba068c0bb59695509caaf48 Mon Sep 17 00:00:00 2001 From: ehendrix23 Date: Wed, 11 Aug 2021 21:17:25 -0600 Subject: [PATCH] Updates to bump MyQ to 3.1.2 (#54488) --- .coveragerc | 1 + homeassistant/components/myq/config_flow.py | 2 +- homeassistant/components/myq/cover.py | 8 ++++++-- homeassistant/components/myq/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 6 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.coveragerc b/.coveragerc index bf51d5ad594..3795f7e49b8 100644 --- a/.coveragerc +++ b/.coveragerc @@ -671,6 +671,7 @@ omit = homeassistant/components/mystrom/light.py homeassistant/components/mystrom/switch.py homeassistant/components/myq/__init__.py + homeassistant/components/myq/cover.py homeassistant/components/nad/media_player.py homeassistant/components/nanoleaf/light.py homeassistant/components/neato/__init__.py diff --git a/homeassistant/components/myq/config_flow.py b/homeassistant/components/myq/config_flow.py index 78a751a18b1..8c088de6715 100644 --- a/homeassistant/components/myq/config_flow.py +++ b/homeassistant/components/myq/config_flow.py @@ -31,7 +31,7 @@ class ConfigFlow(config_entries.ConfigFlow, domain=DOMAIN): """Validate the user input allows us to connect.""" websession = aiohttp_client.async_get_clientsession(self.hass) try: - await pymyq.login(username, password, websession) + await pymyq.login(username, password, websession, True) except InvalidCredentialsError: return {CONF_PASSWORD: "invalid_auth"} except MyQError: diff --git a/homeassistant/components/myq/cover.py b/homeassistant/components/myq/cover.py index 3d587635f2d..8d36db8e0ab 100644 --- a/homeassistant/components/myq/cover.py +++ b/homeassistant/components/myq/cover.py @@ -115,7 +115,9 @@ class MyQDevice(CoordinatorEntity, CoverEntity): # Write closing state to HASS self.async_write_ha_state() - if not await wait_task: + result = wait_task if isinstance(wait_task, bool) else await wait_task + + if not result: _LOGGER.error("Closing of cover %s failed", self._device.name) # Write final state to HASS @@ -137,7 +139,9 @@ class MyQDevice(CoordinatorEntity, CoverEntity): # Write opening state to HASS self.async_write_ha_state() - if not await wait_task: + result = wait_task if isinstance(wait_task, bool) else await wait_task + + if not result: _LOGGER.error("Opening of cover %s failed", self._device.name) # Write final state to HASS diff --git a/homeassistant/components/myq/manifest.json b/homeassistant/components/myq/manifest.json index a93501c941f..a4de12290f1 100644 --- a/homeassistant/components/myq/manifest.json +++ b/homeassistant/components/myq/manifest.json @@ -2,7 +2,7 @@ "domain": "myq", "name": "MyQ", "documentation": "https://www.home-assistant.io/integrations/myq", - "requirements": ["pymyq==3.0.4"], + "requirements": ["pymyq==3.1.2"], "codeowners": ["@bdraco"], "config_flow": true, "homekit": { diff --git a/requirements_all.txt b/requirements_all.txt index bbf9e8344f2..76a9b4f7543 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1610,7 +1610,7 @@ pymonoprice==0.3 pymsteams==0.1.12 # homeassistant.components.myq -pymyq==3.0.4 +pymyq==3.1.2 # homeassistant.components.mysensors pymysensors==0.21.0 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index cf1c915d751..988c2bfb2c0 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -920,7 +920,7 @@ pymodbus==2.5.3rc1 pymonoprice==0.3 # homeassistant.components.myq -pymyq==3.0.4 +pymyq==3.1.2 # homeassistant.components.mysensors pymysensors==0.21.0