Skip to content

Commit

Permalink
Also apply custom configuration to v1 quirks (#231)
Browse files Browse the repository at this point in the history
* Also apply custom configuration to v1 quirks

* Change to `BaseCustomDevice` to apply to v1 and v2 quirks
  • Loading branch information
TheJulianJES authored Oct 11, 2024
1 parent 01d0da4 commit 4c5fc06
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions zha/zigbee/device.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 4c5fc06

Please sign in to comment.