Skip to content

Commit ff1988c

Browse files
Use manufacturer ID override for Sonoff ZBminiR2 (#4084)
1 parent 81108c4 commit ff1988c

File tree

1 file changed

+5
-19
lines changed

1 file changed

+5
-19
lines changed

zhaquirks/sonoff/zbminir2.py

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,41 +13,27 @@ class SonoffCluster(CustomCluster):
1313

1414
cluster_id = 0xFC11
1515

16+
manufacturer_id_override = foundation.ZCLHeader.NO_MANUFACTURER_ID
17+
1618
class AttributeDefs(BaseAttributeDefs):
1719
"""Attribute definitions."""
1820

1921
external_trigger_mode = ZCLAttributeDef(
2022
id=0x0016,
2123
type=t.uint8_t,
24+
is_manufacturer_specific=True,
2225
)
2326
detach_relay = ZCLAttributeDef(
2427
id=0x0017,
2528
type=t.Bool,
29+
is_manufacturer_specific=True,
2630
)
2731
turbo_mode = ZCLAttributeDef(
2832
id=0x0012,
2933
type=t.int16s,
34+
is_manufacturer_specific=True,
3035
)
3136

32-
async def _read_attributes(
33-
self,
34-
attribute_ids: list[t.uint16_t],
35-
*args,
36-
manufacturer: int | t.uint16_t | None = None,
37-
**kwargs,
38-
):
39-
"""Read attributes ZCL foundation command."""
40-
return await super()._read_attributes(
41-
attribute_ids,
42-
*args,
43-
manufacturer=foundation.ZCLHeader.NO_MANUFACTURER_ID,
44-
**kwargs,
45-
)
46-
47-
@property
48-
def _is_manuf_specific(self):
49-
return False
50-
5137

5238
class SonoffExternalSwitchTriggerType(types.enum8):
5339
"""extern switch trigger type."""

0 commit comments

Comments
 (0)