From 4c5fc061374aeaae5a80769040d552177dc8c6d0 Mon Sep 17 00:00:00 2001 From: TheJulianJES Date: Fri, 11 Oct 2024 16:22:24 +0200 Subject: [PATCH] Also apply custom configuration to v1 quirks (#231) * Also apply custom configuration to v1 quirks * Change to `BaseCustomDevice` to apply to v1 and v2 quirks --- zha/zigbee/device.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zha/zigbee/device.py b/zha/zigbee/device.py index c7c3f2af..f43612b5 100644 --- a/zha/zigbee/device.py +++ b/zha/zigbee/device.py @@ -16,7 +16,6 @@ import zigpy.exceptions from zigpy.profiles import PROFILES import zigpy.quirks -from zigpy.quirks.v2 import CustomDeviceV2 from zigpy.types import uint1_t, uint8_t, uint16_t from zigpy.types.named import EUI64, NWK, ExtendedPanId from zigpy.zcl.clusters import Cluster @@ -723,8 +722,8 @@ async def async_configure(self) -> None: await asyncio.gather( *(endpoint.async_configure() for endpoint in self._endpoints.values()) ) - if isinstance(self._zigpy_device, CustomDeviceV2): - self.debug("applying quirks v2 custom device configuration") + if isinstance(self._zigpy_device, zigpy.quirks.BaseCustomDevice): + self.debug("applying quirks custom device configuration") await self._zigpy_device.apply_custom_configuration() self.emit(