Update xknx to 0.22.0 (#75749)

This commit is contained in:
Matthias Alphart 2022-07-26 10:32:26 +02:00 committed by GitHub
parent 47713d9686
commit a98f658854
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 11 additions and 7 deletions

View File

@ -3,7 +3,7 @@
"name": "KNX",
"config_flow": true,
"documentation": "https://www.home-assistant.io/integrations/knx",
"requirements": ["xknx==0.21.5"],
"requirements": ["xknx==0.22.0"],
"codeowners": ["@Julius2342", "@farmio", "@marvin-w"],
"quality_scale": "platinum",
"iot_class": "local_push",

View File

@ -2480,7 +2480,7 @@ xboxapi==2.0.1
xiaomi-ble==0.5.1
# homeassistant.components.knx
xknx==0.21.5
xknx==0.22.0
# homeassistant.components.bluesound
# homeassistant.components.fritz

View File

@ -1665,7 +1665,7 @@ xbox-webapi==2.0.11
xiaomi-ble==0.5.1
# homeassistant.components.knx
xknx==0.21.5
xknx==0.22.0
# homeassistant.components.bluesound
# homeassistant.components.fritz

View File

@ -55,19 +55,23 @@ class KNXTestKit:
async def setup_integration(self, config):
"""Create the KNX integration."""
def disable_rate_limiter():
"""Disable rate limiter for tests."""
# after XKNX.__init__() to not overwrite it by the config entry again
# before StateUpdater starts to avoid slow down of tests
self.xknx.rate_limit = 0
def knx_ip_interface_mock():
"""Create a xknx knx ip interface mock."""
mock = Mock()
mock.start = AsyncMock()
mock.start = AsyncMock(side_effect=disable_rate_limiter)
mock.stop = AsyncMock()
mock.send_telegram = AsyncMock(side_effect=self._outgoing_telegrams.put)
return mock
def fish_xknx(*args, **kwargs):
"""Get the XKNX object from the constructor call."""
self.xknx = kwargs["xknx"]
# disable rate limiter for tests (before StateUpdater starts)
self.xknx.rate_limit = 0
self.xknx = args[0]
return DEFAULT
with patch(