Skip to content
This repository was archived by the owner on Apr 30, 2022. It is now read-only.

Commit 2e7c3bd

Browse files
committed
search for the Glow Display deviceTypeId
1 parent ce7bb34 commit 2e7c3bd

File tree

1 file changed

+8
-1
lines changed
  • custom_components/hildebrandglow

1 file changed

+8
-1
lines changed

custom_components/hildebrandglow/glow.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -83,11 +83,18 @@ def retrieve_devices(self) -> List[Dict[str, Any]]:
8383
def retrieve_cad_hardwareId(self) -> str:
8484
"""Locate the Consumer Access Device's hardware ID from the devices list."""
8585
ZIGBEE_GLOW_STICK = "1027b6e8-9bfd-4dcb-8068-c73f6413cfaf"
86+
ZIGBEE_GLOW_DISPLAY_SMETS2 = "b91cf82f-aafe-47f4-930a-b2ed1c7b2691"
8687

8788
devices = self.retrieve_devices()
8889

8990
cad: Dict[str, Any] = next(
90-
(dev for dev in devices if dev["deviceTypeId"] == ZIGBEE_GLOW_STICK), {}
91+
(
92+
dev
93+
for dev in devices
94+
if dev["deviceTypeId"]
95+
in [ZIGBEE_GLOW_STICK, ZIGBEE_GLOW_DISPLAY_SMETS2]
96+
),
97+
{},
9198
)
9299

93100
self.hardwareId = cad["hardwareId"]

0 commit comments

Comments
 (0)