From 29e8b9f2acc6d777193d7fe061dd0424f3f37989 Mon Sep 17 00:00:00 2001 From: Alex Yao <33379584+alexyao2015@users.noreply.github.com> Date: Mon, 4 Apr 2022 07:47:44 +0000 Subject: [PATCH] Bump Yeelight to v0.7.10 (#69147) --- homeassistant/components/yeelight/device.py | 1 + homeassistant/components/yeelight/light.py | 4 ++-- homeassistant/components/yeelight/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 5 files changed, 6 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/yeelight/device.py b/homeassistant/components/yeelight/device.py index 02228e5d9fc..6737f96c169 100644 --- a/homeassistant/components/yeelight/device.py +++ b/homeassistant/components/yeelight/device.py @@ -219,6 +219,7 @@ class YeelightDevice: @callback def async_update_callback(self, data): """Update push from device.""" + _LOGGER.debug("Received callback: %s", data) was_available = self._available self._available = data.get(KEY_CONNECTED, True) if update_needs_bg_power_workaround(data) or ( diff --git a/homeassistant/components/yeelight/light.py b/homeassistant/components/yeelight/light.py index 0c906b3e268..1de97c45fd0 100644 --- a/homeassistant/components/yeelight/light.py +++ b/homeassistant/components/yeelight/light.py @@ -245,7 +245,7 @@ def _parse_custom_effects(effects_config): def _async_cmd(func): """Define a wrapper to catch exceptions from the bulb.""" - async def _async_wrap(self, *args, **kwargs): + async def _async_wrap(self: "YeelightGenericLight", *args, **kwargs): for attempts in range(2): try: _LOGGER.debug("Calling %s with %s %s", func, args, kwargs) @@ -708,7 +708,7 @@ class YeelightGenericLight(YeelightEntity, LightEntity): """Activate flash.""" if not flash: return - if int(self._bulb.last_properties["color_mode"]) != 1: + if int(self._get_property("color_mode")) != 1: _LOGGER.error("Flash supported currently only in RGB mode") return diff --git a/homeassistant/components/yeelight/manifest.json b/homeassistant/components/yeelight/manifest.json index cd47b1ee049..1967793b855 100644 --- a/homeassistant/components/yeelight/manifest.json +++ b/homeassistant/components/yeelight/manifest.json @@ -2,7 +2,7 @@ "domain": "yeelight", "name": "Yeelight", "documentation": "https://www.home-assistant.io/integrations/yeelight", - "requirements": ["yeelight==0.7.9", "async-upnp-client==0.27.0"], + "requirements": ["yeelight==0.7.10", "async-upnp-client==0.27.0"], "codeowners": ["@zewelor", "@shenxn", "@starkillerOG", "@alexyao2015"], "config_flow": true, "dependencies": ["network"], diff --git a/requirements_all.txt b/requirements_all.txt index 266a075d623..33f17392cf6 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2455,7 +2455,7 @@ yalesmartalarmclient==0.3.8 yalexs==1.1.23 # homeassistant.components.yeelight -yeelight==0.7.9 +yeelight==0.7.10 # homeassistant.components.yeelightsunflower yeelightsunflower==0.0.10 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 2e5ac65888c..180a9671abd 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1595,7 +1595,7 @@ yalesmartalarmclient==0.3.8 yalexs==1.1.23 # homeassistant.components.yeelight -yeelight==0.7.9 +yeelight==0.7.10 # homeassistant.components.youless youless-api==0.16