From 53e6c7f0c4e58d8a1cc79b2dd9d0a1cd48de4600 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 17 Aug 2020 15:52:54 -0500 Subject: [PATCH 1/7] Update zeroconf to fix ServiceBrowser leak on cancelation (#38933) --- homeassistant/components/zeroconf/manifest.json | 2 +- homeassistant/package_constraints.txt | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/zeroconf/manifest.json b/homeassistant/components/zeroconf/manifest.json index b93e47f8a65..883188b31cf 100644 --- a/homeassistant/components/zeroconf/manifest.json +++ b/homeassistant/components/zeroconf/manifest.json @@ -2,7 +2,7 @@ "domain": "zeroconf", "name": "Zero-configuration networking (zeroconf)", "documentation": "https://www.home-assistant.io/integrations/zeroconf", - "requirements": ["zeroconf==0.28.0"], + "requirements": ["zeroconf==0.28.1"], "dependencies": ["api"], "codeowners": ["@Kane610"], "quality_scale": "internal" diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index e709bf68aa4..f3b862341d4 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -28,7 +28,7 @@ sqlalchemy==1.3.18 voluptuous-serialize==2.4.0 voluptuous==0.11.7 yarl==1.4.2 -zeroconf==0.28.0 +zeroconf==0.28.1 pycryptodome>=3.6.6 diff --git a/requirements_all.txt b/requirements_all.txt index 80785d00943..88d24850e2e 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2269,7 +2269,7 @@ youtube_dl==2020.07.28 zengge==0.2 # homeassistant.components.zeroconf -zeroconf==0.28.0 +zeroconf==0.28.1 # homeassistant.components.zha zha-quirks==0.0.43 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 6f7f0b3f710..79cff20d811 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -1005,7 +1005,7 @@ xmltodict==0.12.0 yeelight==0.5.2 # homeassistant.components.zeroconf -zeroconf==0.28.0 +zeroconf==0.28.1 # homeassistant.components.zha zha-quirks==0.0.43 From f1f09f7156002ed7529de65a62daf30021e84cbd Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Mon, 17 Aug 2020 02:46:30 -0500 Subject: [PATCH 2/7] Bump netdisco to 2.8.2 to accomodate new zeroconf exception (#38949) --- homeassistant/components/discovery/manifest.json | 2 +- homeassistant/components/ssdp/manifest.json | 2 +- homeassistant/package_constraints.txt | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/homeassistant/components/discovery/manifest.json b/homeassistant/components/discovery/manifest.json index 232237484d1..5744d406dec 100644 --- a/homeassistant/components/discovery/manifest.json +++ b/homeassistant/components/discovery/manifest.json @@ -2,7 +2,7 @@ "domain": "discovery", "name": "Discovery", "documentation": "https://www.home-assistant.io/integrations/discovery", - "requirements": ["netdisco==2.8.1"], + "requirements": ["netdisco==2.8.2"], "after_dependencies": ["zeroconf"], "codeowners": [], "quality_scale": "internal" diff --git a/homeassistant/components/ssdp/manifest.json b/homeassistant/components/ssdp/manifest.json index 85ae4725e93..ed20ae9ead6 100644 --- a/homeassistant/components/ssdp/manifest.json +++ b/homeassistant/components/ssdp/manifest.json @@ -2,7 +2,7 @@ "domain": "ssdp", "name": "Simple Service Discovery Protocol (SSDP)", "documentation": "https://www.home-assistant.io/integrations/ssdp", - "requirements": ["defusedxml==0.6.0", "netdisco==2.8.1"], + "requirements": ["defusedxml==0.6.0", "netdisco==2.8.2"], "after_dependencies": ["zeroconf"], "codeowners": [] } diff --git a/homeassistant/package_constraints.txt b/homeassistant/package_constraints.txt index f3b862341d4..58d3e3be883 100644 --- a/homeassistant/package_constraints.txt +++ b/homeassistant/package_constraints.txt @@ -16,7 +16,7 @@ hass-nabucasa==0.35.0 home-assistant-frontend==20200811.0 importlib-metadata==1.6.0;python_version<'3.8' jinja2>=2.11.1 -netdisco==2.8.1 +netdisco==2.8.2 paho-mqtt==1.5.0 pip>=8.0.3 python-slugify==4.0.1 diff --git a/requirements_all.txt b/requirements_all.txt index 88d24850e2e..63dea043514 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -945,7 +945,7 @@ netdata==0.2.0 # homeassistant.components.discovery # homeassistant.components.ssdp -netdisco==2.8.1 +netdisco==2.8.2 # homeassistant.components.neurio_energy neurio==0.3.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 79cff20d811..fb348a8bb35 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -443,7 +443,7 @@ nessclient==0.9.15 # homeassistant.components.discovery # homeassistant.components.ssdp -netdisco==2.8.1 +netdisco==2.8.2 # homeassistant.components.nexia nexia==0.9.3 From 4f42165c8a89d1272ffac5f130f4ad42b5494ca0 Mon Sep 17 00:00:00 2001 From: lawtancool <26829131+lawtancool@users.noreply.github.com> Date: Wed, 19 Aug 2020 11:05:02 -0700 Subject: [PATCH 3/7] Fix Control4 light setup issues (#38952) * catch KeyError and UnboundLocalError in light setup * add check for no dimmer info from control4 * use existence of light_level data to enable dimming * check if light data is not in dimmer and non_dimmer * add item_variables logging * add await to item_variables call * add full item dump * remove full item list * change logging message * fix typo * reduce code inside try and add all entities at once * Apply suggestions from code review Co-authored-by: J. Nick Koston * format with black Co-authored-by: J. Nick Koston --- homeassistant/components/control4/light.py | 84 ++++++++++++++-------- 1 file changed, 54 insertions(+), 30 deletions(-) diff --git a/homeassistant/components/control4/light.py b/homeassistant/components/control4/light.py index d5a681eac09..36727b21ecf 100644 --- a/homeassistant/components/control4/light.py +++ b/homeassistant/components/control4/light.py @@ -73,40 +73,64 @@ async def async_setup_entry( await dimmer_coordinator.async_refresh() items_of_category = await get_items_of_category(hass, entry, CONTROL4_CATEGORY) + + entity_list = [] for item in items_of_category: - if item["type"] == CONTROL4_ENTITY_TYPE: - item_name = item["name"] - item_id = item["id"] - item_parent_id = item["parentId"] - item_is_dimmer = item["capabilities"]["dimmer"] + try: + if item["type"] == CONTROL4_ENTITY_TYPE: + item_name = item["name"] + item_id = item["id"] + item_parent_id = item["parentId"] - if item_is_dimmer: - item_coordinator = dimmer_coordinator + item_manufacturer = None + item_device_name = None + item_model = None + + for parent_item in items_of_category: + if parent_item["id"] == item_parent_id: + item_manufacturer = parent_item["manufacturer"] + item_device_name = parent_item["name"] + item_model = parent_item["model"] else: - item_coordinator = non_dimmer_coordinator - - for parent_item in items_of_category: - if parent_item["id"] == item_parent_id: - item_manufacturer = parent_item["manufacturer"] - item_device_name = parent_item["name"] - item_model = parent_item["model"] - async_add_entities( - [ - Control4Light( - entry_data, - entry, - item_coordinator, - item_name, - item_id, - item_device_name, - item_manufacturer, - item_model, - item_parent_id, - item_is_dimmer, - ) - ], - True, + continue + except KeyError: + _LOGGER.exception( + "Unknown device properties received from Control4: %s", item, ) + continue + + if item_id in dimmer_coordinator.data: + item_is_dimmer = True + item_coordinator = dimmer_coordinator + elif item_id in non_dimmer_coordinator.data: + item_is_dimmer = False + item_coordinator = non_dimmer_coordinator + else: + director = entry_data[CONF_DIRECTOR] + item_variables = await director.getItemVariables(item_id) + _LOGGER.warning( + "Couldn't get light state data for %s, skipping setup. Available variables from Control4: %s", + item_name, + item_variables, + ) + continue + + entity_list.append( + Control4Light( + entry_data, + entry, + item_coordinator, + item_name, + item_id, + item_device_name, + item_manufacturer, + item_model, + item_parent_id, + item_is_dimmer, + ) + ) + + async_add_entities(entity_list, True) class Control4Light(Control4Entity, LightEntity): From ecb7d7b992ede12ecfb077831b013b5dd873252d Mon Sep 17 00:00:00 2001 From: Erik Montnemery Date: Tue, 18 Aug 2020 23:43:38 +0200 Subject: [PATCH 4/7] Bump pychromecast to 7.2.1 (#39018) --- homeassistant/components/cast/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/homeassistant/components/cast/manifest.json b/homeassistant/components/cast/manifest.json index 1187887e864..49ade045518 100644 --- a/homeassistant/components/cast/manifest.json +++ b/homeassistant/components/cast/manifest.json @@ -3,7 +3,7 @@ "name": "Google Cast", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/cast", - "requirements": ["pychromecast==7.2.0"], + "requirements": ["pychromecast==7.2.1"], "after_dependencies": ["cloud","zeroconf"], "zeroconf": ["_googlecast._tcp.local."], "codeowners": ["@emontnemery"] diff --git a/requirements_all.txt b/requirements_all.txt index 63dea043514..ac9ae596d09 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1256,7 +1256,7 @@ pycfdns==0.0.1 pychannels==1.0.0 # homeassistant.components.cast -pychromecast==7.2.0 +pychromecast==7.2.1 # homeassistant.components.cmus pycmus==0.1.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index fb348a8bb35..f2f6e0a77ff 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -595,7 +595,7 @@ pyblackbird==0.5 pybotvac==0.0.17 # homeassistant.components.cast -pychromecast==7.2.0 +pychromecast==7.2.1 # homeassistant.components.coolmaster pycoolmasternet==0.0.4 From c8e2af80469f5f42d85896ae92d2f21afc84bee9 Mon Sep 17 00:00:00 2001 From: "J. Nick Koston" Date: Thu, 20 Aug 2020 03:27:14 -0500 Subject: [PATCH 5/7] Fix emulated hue on/off devices compatibility with alexa (#39063) --- homeassistant/components/emulated_hue/hue_api.py | 1 + tests/components/emulated_hue/test_hue_api.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/homeassistant/components/emulated_hue/hue_api.py b/homeassistant/components/emulated_hue/hue_api.py index b84e64e6cc6..d979fcbc6e0 100644 --- a/homeassistant/components/emulated_hue/hue_api.py +++ b/homeassistant/components/emulated_hue/hue_api.py @@ -781,6 +781,7 @@ def entity_to_json(config, entity): retval["type"] = "On/Off light" retval["productname"] = "On/Off light" retval["modelid"] = "HASS321" + retval["state"].update({HUE_API_STATE_BRI: HUE_API_STATE_BRI_MAX}) return retval diff --git a/tests/components/emulated_hue/test_hue_api.py b/tests/components/emulated_hue/test_hue_api.py index 510aa0ef8ee..fae391ce5ff 100644 --- a/tests/components/emulated_hue/test_hue_api.py +++ b/tests/components/emulated_hue/test_hue_api.py @@ -22,6 +22,7 @@ from homeassistant.components import ( from homeassistant.components.emulated_hue import Config, hue_api from homeassistant.components.emulated_hue.hue_api import ( HUE_API_STATE_BRI, + HUE_API_STATE_BRI_MAX, HUE_API_STATE_CT, HUE_API_STATE_HUE, HUE_API_STATE_ON, @@ -282,6 +283,12 @@ async def test_light_without_brightness_supported(hass_hue, hue_client): assert light_without_brightness_json["state"][HUE_API_STATE_ON] is True assert light_without_brightness_json["type"] == "On/Off light" + # BRI required for alexa compat + assert ( + light_without_brightness_json["state"][HUE_API_STATE_BRI] + == HUE_API_STATE_BRI_MAX + ) + async def test_light_without_brightness_can_be_turned_off(hass_hue, hue_client): """Test that light without brightness can be turned off.""" From fb1c3f7f1cfc4e48e0da016e6017d5e84bf8298d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Hjelseth=20H=C3=B8yer?= Date: Thu, 20 Aug 2020 10:26:49 +0200 Subject: [PATCH 6/7] Update met.no library (#39076) --- homeassistant/components/met/manifest.json | 2 +- homeassistant/components/norway_air/manifest.json | 2 +- requirements_all.txt | 2 +- requirements_test_all.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/homeassistant/components/met/manifest.json b/homeassistant/components/met/manifest.json index a68a8223ba5..570e3df3bf0 100644 --- a/homeassistant/components/met/manifest.json +++ b/homeassistant/components/met/manifest.json @@ -3,6 +3,6 @@ "name": "Meteorologisk institutt (Met.no)", "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/met", - "requirements": ["pyMetno==0.7.0"], + "requirements": ["pyMetno==0.7.1"], "codeowners": ["@danielhiversen"] } diff --git a/homeassistant/components/norway_air/manifest.json b/homeassistant/components/norway_air/manifest.json index 2898ee6ff64..96ff39bb6dd 100644 --- a/homeassistant/components/norway_air/manifest.json +++ b/homeassistant/components/norway_air/manifest.json @@ -2,6 +2,6 @@ "domain": "norway_air", "name": "Om Luftkvalitet i Norge (Norway Air)", "documentation": "https://www.home-assistant.io/integrations/norway_air", - "requirements": ["pyMetno==0.7.0"], + "requirements": ["pyMetno==0.7.1"], "codeowners": [] } diff --git a/requirements_all.txt b/requirements_all.txt index ac9ae596d09..05998cfa10d 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -1181,7 +1181,7 @@ pyHS100==0.3.5.1 # homeassistant.components.met # homeassistant.components.norway_air -pyMetno==0.7.0 +pyMetno==0.7.1 # homeassistant.components.rfxtrx pyRFXtrx==0.25 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index f2f6e0a77ff..c4c9051c9bf 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -559,7 +559,7 @@ pyHS100==0.3.5.1 # homeassistant.components.met # homeassistant.components.norway_air -pyMetno==0.7.0 +pyMetno==0.7.1 # homeassistant.components.rfxtrx pyRFXtrx==0.25 From 052df518d08aa99781ce6b0122f40cfa851a7a00 Mon Sep 17 00:00:00 2001 From: Paulus Schoutsen Date: Thu, 20 Aug 2020 08:30:04 +0000 Subject: [PATCH 7/7] Bumped version to 0.114.3 --- homeassistant/const.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/homeassistant/const.py b/homeassistant/const.py index 6fedf47ff1a..938e108d58b 100644 --- a/homeassistant/const.py +++ b/homeassistant/const.py @@ -1,7 +1,7 @@ """Constants used by Home Assistant components.""" MAJOR_VERSION = 0 MINOR_VERSION = 114 -PATCH_VERSION = "2" +PATCH_VERSION = "3" __short_version__ = f"{MAJOR_VERSION}.{MINOR_VERSION}" __version__ = f"{__short_version__}.{PATCH_VERSION}" REQUIRED_PYTHON_VER = (3, 7, 1)