Skip to content

Commit a17af7a

Browse files
authored
Add IKEA Tretakt child lock and LED disable functionality (#4438)
* Move IKEA TRETAKT model to INSPELNING quirk * Rename new plug quirks module to `plug_g2`
1 parent 203b56f commit a17af7a

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

zhaquirks/ikea/plug.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
"""IKEA TRADFRI and TRETAKT plugs quirk."""
1+
"""IKEA TRADFRI plugs quirk."""
22

33
from zigpy.quirks.v2 import QuirkBuilder
44
from zigpy.zcl.clusters.general import LevelControl
55

66
from zhaquirks.ikea import IKEA
77

88
# remove LevelControl for plug to not show config options in ZHA
9-
# TRETAKT likely also has Child Lock and LED control, see INSPELNING
109
(
1110
QuirkBuilder(IKEA, "TRADFRI control outlet")
12-
.also_applies_to(IKEA, "TRETAKT Smart plug")
1311
.removes(LevelControl.cluster_id)
1412
.add_to_registry()
1513
)

zhaquirks/ikea/plug_inspelning.py renamed to zhaquirks/ikea/plug_g2.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""IKEA INSPELNING plug quirk."""
1+
"""IKEA INSPELNING and TRETAKT plug quirk."""
22

33
from zigpy.quirks.v2 import CustomCluster, QuirkBuilder
44
import zigpy.types as t
@@ -29,6 +29,7 @@ class AttributeDefs(BaseAttributeDefs):
2929
# remove LevelControl for plugs to not show config options in ZHA
3030
(
3131
QuirkBuilder(IKEA, "INSPELNING Smart plug")
32+
.applies_to(IKEA, "TRETAKT Smart plug")
3233
.removes(LevelControl.cluster_id)
3334
.replaces(IkeaSmartPlugCluster)
3435
.switch(

0 commit comments

Comments
 (0)