From 743833e5f3677288e9a51e6f317852b84f6cb116 Mon Sep 17 00:00:00 2001 From: Alexei Chetroi Date: Mon, 9 Mar 2020 12:39:41 -0400 Subject: [PATCH] Bump up ZHA dependencies. (#32609) * Bump up ZHA dependencies. * Update tests to match library changes. --- homeassistant/components/zha/manifest.json | 8 ++++---- requirements_all.txt | 8 ++++---- requirements_test_all.txt | 8 ++++---- tests/components/zha/test_cover.py | 14 ++++++++++---- tests/components/zha/test_discover.py | 1 + tests/components/zha/test_light.py | 14 +++++++++----- tests/components/zha/test_switch.py | 4 ++-- 7 files changed, 34 insertions(+), 23 deletions(-) diff --git a/homeassistant/components/zha/manifest.json b/homeassistant/components/zha/manifest.json index 235a3872ec0..fec85625ee4 100644 --- a/homeassistant/components/zha/manifest.json +++ b/homeassistant/components/zha/manifest.json @@ -4,12 +4,12 @@ "config_flow": true, "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ - "bellows-homeassistant==0.13.2", - "zha-quirks==0.0.35", + "bellows-homeassistant==0.14.0", + "zha-quirks==0.0.36", "zigpy-cc==0.1.0", "zigpy-deconz==0.7.0", - "zigpy-homeassistant==0.15.0", - "zigpy-xbee-homeassistant==0.9.0", + "zigpy-homeassistant==0.16.0", + "zigpy-xbee-homeassistant==0.10.0", "zigpy-zigate==0.5.1" ], "dependencies": [], diff --git a/requirements_all.txt b/requirements_all.txt index 4de51512bd1..77e1a240241 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -309,7 +309,7 @@ beautifulsoup4==4.8.2 beewi_smartclim==0.0.7 # homeassistant.components.zha -bellows-homeassistant==0.13.2 +bellows-homeassistant==0.14.0 # homeassistant.components.bmw_connected_drive bimmer_connected==0.7.1 @@ -2152,7 +2152,7 @@ zengge==0.2 zeroconf==0.24.5 # homeassistant.components.zha -zha-quirks==0.0.35 +zha-quirks==0.0.36 # homeassistant.components.zhong_hong zhong_hong_hvac==1.0.9 @@ -2167,10 +2167,10 @@ zigpy-cc==0.1.0 zigpy-deconz==0.7.0 # homeassistant.components.zha -zigpy-homeassistant==0.15.0 +zigpy-homeassistant==0.16.0 # homeassistant.components.zha -zigpy-xbee-homeassistant==0.9.0 +zigpy-xbee-homeassistant==0.10.0 # homeassistant.components.zha zigpy-zigate==0.5.1 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 81ee9addeac..8f5e2fb5509 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -118,7 +118,7 @@ av==6.1.2 axis==25 # homeassistant.components.zha -bellows-homeassistant==0.13.2 +bellows-homeassistant==0.14.0 # homeassistant.components.bom bomradarloop==0.1.3 @@ -741,7 +741,7 @@ yahooweather==0.10 zeroconf==0.24.5 # homeassistant.components.zha -zha-quirks==0.0.35 +zha-quirks==0.0.36 # homeassistant.components.zha zigpy-cc==0.1.0 @@ -750,10 +750,10 @@ zigpy-cc==0.1.0 zigpy-deconz==0.7.0 # homeassistant.components.zha -zigpy-homeassistant==0.15.0 +zigpy-homeassistant==0.16.0 # homeassistant.components.zha -zigpy-xbee-homeassistant==0.9.0 +zigpy-xbee-homeassistant==0.10.0 # homeassistant.components.zha zigpy-zigate==0.5.1 diff --git a/tests/components/zha/test_cover.py b/tests/components/zha/test_cover.py index 4fbabf4485a..3ece16d8116 100644 --- a/tests/components/zha/test_cover.py +++ b/tests/components/zha/test_cover.py @@ -88,7 +88,7 @@ async def test_cover(m1, hass, zha_device_joined_restored, zigpy_cover_device): ) assert cluster.request.call_count == 1 assert cluster.request.call_args == call( - False, 0x1, (), expect_reply=True, manufacturer=None + False, 0x1, (), expect_reply=True, manufacturer=None, tsn=None ) # open from UI @@ -100,7 +100,7 @@ async def test_cover(m1, hass, zha_device_joined_restored, zigpy_cover_device): ) assert cluster.request.call_count == 1 assert cluster.request.call_args == call( - False, 0x0, (), expect_reply=True, manufacturer=None + False, 0x0, (), expect_reply=True, manufacturer=None, tsn=None ) # set position UI @@ -115,7 +115,13 @@ async def test_cover(m1, hass, zha_device_joined_restored, zigpy_cover_device): ) assert cluster.request.call_count == 1 assert cluster.request.call_args == call( - False, 0x5, (zigpy.types.uint8_t,), 53, expect_reply=True, manufacturer=None + False, + 0x5, + (zigpy.types.uint8_t,), + 53, + expect_reply=True, + manufacturer=None, + tsn=None, ) # stop from UI @@ -127,7 +133,7 @@ async def test_cover(m1, hass, zha_device_joined_restored, zigpy_cover_device): ) assert cluster.request.call_count == 1 assert cluster.request.call_args == call( - False, 0x2, (), expect_reply=True, manufacturer=None + False, 0x2, (), expect_reply=True, manufacturer=None, tsn=None ) # test rejoin diff --git a/tests/components/zha/test_discover.py b/tests/components/zha/test_discover.py index 9515de32fcd..e1733ac44bd 100644 --- a/tests/components/zha/test_discover.py +++ b/tests/components/zha/test_discover.py @@ -107,6 +107,7 @@ async def test_devices( 0, expect_reply=True, manufacturer=None, + tsn=None, ) event_channels = { diff --git a/tests/components/zha/test_light.py b/tests/components/zha/test_light.py index 726def23fc3..fba57a0020e 100644 --- a/tests/components/zha/test_light.py +++ b/tests/components/zha/test_light.py @@ -181,7 +181,7 @@ async def async_test_on_off_from_hass(hass, cluster, entity_id): assert cluster.request.call_count == 1 assert cluster.request.await_count == 1 assert cluster.request.call_args == call( - False, ON, (), expect_reply=True, manufacturer=None + False, ON, (), expect_reply=True, manufacturer=None, tsn=None ) await async_test_off_from_hass(hass, cluster, entity_id) @@ -198,7 +198,7 @@ async def async_test_off_from_hass(hass, cluster, entity_id): assert cluster.request.call_count == 1 assert cluster.request.await_count == 1 assert cluster.request.call_args == call( - False, OFF, (), expect_reply=True, manufacturer=None + False, OFF, (), expect_reply=True, manufacturer=None, tsn=None ) @@ -208,6 +208,7 @@ async def async_test_level_on_off_from_hass( """Test on off functionality from hass.""" on_off_cluster.request.reset_mock() + level_cluster.request.reset_mock() # turn on via UI await hass.services.async_call( DOMAIN, "turn_on", {"entity_id": entity_id}, blocking=True @@ -217,7 +218,7 @@ async def async_test_level_on_off_from_hass( assert level_cluster.request.call_count == 0 assert level_cluster.request.await_count == 0 assert on_off_cluster.request.call_args == call( - False, ON, (), expect_reply=True, manufacturer=None + False, ON, (), expect_reply=True, manufacturer=None, tsn=None ) on_off_cluster.request.reset_mock() level_cluster.request.reset_mock() @@ -230,7 +231,7 @@ async def async_test_level_on_off_from_hass( assert level_cluster.request.call_count == 1 assert level_cluster.request.await_count == 1 assert on_off_cluster.request.call_args == call( - False, ON, (), expect_reply=True, manufacturer=None + False, ON, (), expect_reply=True, manufacturer=None, tsn=None ) assert level_cluster.request.call_args == call( False, @@ -240,6 +241,7 @@ async def async_test_level_on_off_from_hass( 100.0, expect_reply=True, manufacturer=None, + tsn=None, ) on_off_cluster.request.reset_mock() level_cluster.request.reset_mock() @@ -252,7 +254,7 @@ async def async_test_level_on_off_from_hass( assert level_cluster.request.call_count == 1 assert level_cluster.request.await_count == 1 assert on_off_cluster.request.call_args == call( - False, ON, (), expect_reply=True, manufacturer=None + False, ON, (), expect_reply=True, manufacturer=None, tsn=None ) assert level_cluster.request.call_args == call( False, @@ -262,6 +264,7 @@ async def async_test_level_on_off_from_hass( 0, expect_reply=True, manufacturer=None, + tsn=None, ) on_off_cluster.request.reset_mock() level_cluster.request.reset_mock() @@ -299,4 +302,5 @@ async def async_test_flash_from_hass(hass, cluster, entity_id, flash): 0, expect_reply=True, manufacturer=None, + tsn=None, ) diff --git a/tests/components/zha/test_switch.py b/tests/components/zha/test_switch.py index a088283834b..22ceb629009 100644 --- a/tests/components/zha/test_switch.py +++ b/tests/components/zha/test_switch.py @@ -76,7 +76,7 @@ async def test_switch(hass, zha_device_joined_restored, zigpy_device): ) assert len(cluster.request.mock_calls) == 1 assert cluster.request.call_args == call( - False, ON, (), expect_reply=True, manufacturer=None + False, ON, (), expect_reply=True, manufacturer=None, tsn=None ) # turn off from HA @@ -90,7 +90,7 @@ async def test_switch(hass, zha_device_joined_restored, zigpy_device): ) assert len(cluster.request.mock_calls) == 1 assert cluster.request.call_args == call( - False, OFF, (), expect_reply=True, manufacturer=None + False, OFF, (), expect_reply=True, manufacturer=None, tsn=None ) # test joining a new switch to the network and HA