diff --git a/homeassistant/components/zha/core/channels/__init__.py b/homeassistant/components/zha/core/channels/__init__.py index a5ecf21e0c3..d899f51b487 100644 --- a/homeassistant/components/zha/core/channels/__init__.py +++ b/homeassistant/components/zha/core/channels/__init__.py @@ -194,8 +194,7 @@ class ZigbeeChannel(LogMixin): async def async_configure(self): """Set cluster binding and attribute reporting.""" - # Xiaomi devices don't need this and it disrupts pairing - if self._zha_device.manufacturer != "LUMI": + if not self._zha_device.skip_configuration: await self.bind() if self.cluster.is_server: for report_config in self._report_config: @@ -203,8 +202,9 @@ class ZigbeeChannel(LogMixin): report_config["attr"], report_config["config"] ) await asyncio.sleep(uniform(0.1, 0.5)) - - self.debug("finished channel configuration") + self.debug("finished channel configuration") + else: + self.debug("skipping channel configuration") self._status = ChannelStatus.CONFIGURED async def async_initialize(self, from_cache): @@ -264,7 +264,7 @@ class ZigbeeChannel(LogMixin): def log(self, level, msg, *args): """Log a message.""" msg = f"[%s:%s]: {msg}" - args = (self.device.nwk, self._id,) + args + args = (self.device.nwk, self._id) + args _LOGGER.log(level, msg, *args) def __getattr__(self, name): diff --git a/homeassistant/components/zha/core/channels/security.py b/homeassistant/components/zha/core/channels/security.py index 69e4ea1a27a..781738fc048 100644 --- a/homeassistant/components/zha/core/channels/security.py +++ b/homeassistant/components/zha/core/channels/security.py @@ -146,9 +146,8 @@ class IASZoneChannel(ZigbeeChannel): async def async_configure(self): """Configure IAS device.""" - # Xiaomi devices don't need this and it disrupts pairing - if self._zha_device.manufacturer == "LUMI": - self.debug("finished IASZoneChannel configuration") + if self._zha_device.skip_configuration: + self.debug("skipping IASZoneChannel configuration") return self.debug("started IASZoneChannel configuration") diff --git a/homeassistant/components/zha/core/device.py b/homeassistant/components/zha/core/device.py index 8810fd77fe7..2e7c48c639f 100644 --- a/homeassistant/components/zha/core/device.py +++ b/homeassistant/components/zha/core/device.py @@ -213,6 +213,11 @@ class ZHADevice(LogMixin): if Groups.cluster_id in clusters: return True + @property + def skip_configuration(self): + """Return true if the device should not issue configuration related commands.""" + return self._zigpy_device.skip_configuration + @property def gateway(self): """Return the gateway for this device.""" diff --git a/homeassistant/components/zha/manifest.json b/homeassistant/components/zha/manifest.json index c0b7a0719f8..16c5604587d 100644 --- a/homeassistant/components/zha/manifest.json +++ b/homeassistant/components/zha/manifest.json @@ -5,7 +5,7 @@ "documentation": "https://www.home-assistant.io/integrations/zha", "requirements": [ "bellows-homeassistant==0.13.2", - "zha-quirks==0.0.32", + "zha-quirks==0.0.33", "zigpy-cc==0.1.0", "zigpy-deconz==0.7.0", "zigpy-homeassistant==0.13.2", diff --git a/requirements_all.txt b/requirements_all.txt index b72a61f57f3..9bde09768bb 100644 --- a/requirements_all.txt +++ b/requirements_all.txt @@ -2130,7 +2130,7 @@ zengge==0.2 zeroconf==0.24.4 # homeassistant.components.zha -zha-quirks==0.0.32 +zha-quirks==0.0.33 # homeassistant.components.zhong_hong zhong_hong_hvac==1.0.9 diff --git a/requirements_test_all.txt b/requirements_test_all.txt index 48863e32db9..86f8e9f12cc 100644 --- a/requirements_test_all.txt +++ b/requirements_test_all.txt @@ -732,7 +732,7 @@ yahooweather==0.10 zeroconf==0.24.4 # homeassistant.components.zha -zha-quirks==0.0.32 +zha-quirks==0.0.33 # homeassistant.components.zha zigpy-cc==0.1.0 diff --git a/tests/components/zha/common.py b/tests/components/zha/common.py index a9f040eda68..03b6ed21148 100644 --- a/tests/components/zha/common.py +++ b/tests/components/zha/common.py @@ -72,6 +72,7 @@ class FakeDevice: self.last_seen = time.time() self.status = 2 self.initializing = False + self.skip_configuration = False self.manufacturer = manufacturer self.model = model self.node_desc = zigpy.zdo.types.NodeDescriptor()