Skip to content

Commit 81e543a

Browse files
maga-1TheJulianJES
andauthored
Allow disabling Sonoff SWV "Water shortage auto-close" (#4207)
Co-authored-by: TheJulianJES <[email protected]>
1 parent bbc5473 commit 81e543a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

zhaquirks/sonoff/swv.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,12 @@ class AttributeDefs(BaseAttributeDefs):
3131
type=ValveState,
3232
)
3333

34+
auto_close_water_shortage = ZCLAttributeDef(
35+
id=0x5011,
36+
type=t.uint16_t,
37+
is_manufacturer_specific=True,
38+
)
39+
3440

3541
(
3642
QuirkBuilder("SONOFF", "SWV")
@@ -56,5 +62,13 @@ class AttributeDefs(BaseAttributeDefs):
5662
translation_key="water_supply",
5763
fallback_name="Water supply",
5864
)
65+
.switch(
66+
CustomSonoffCluster.AttributeDefs.auto_close_water_shortage.name,
67+
CustomSonoffCluster.cluster_id,
68+
off_value=0,
69+
on_value=30,
70+
translation_key="water_shortage_auto_close",
71+
fallback_name="Water shortage auto-close",
72+
)
5973
.add_to_registry()
6074
)

0 commit comments

Comments
 (0)