zigbee-herdsman-converters 25.84.0 → 25.86.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (119) hide show
  1. package/CHANGELOG.md +50 -0
  2. package/dist/converters/toZigbee.d.ts.map +1 -1
  3. package/dist/converters/toZigbee.js +4 -43
  4. package/dist/converters/toZigbee.js.map +1 -1
  5. package/dist/devices/atlantic.d.ts.map +1 -1
  6. package/dist/devices/atlantic.js +0 -2
  7. package/dist/devices/atlantic.js.map +1 -1
  8. package/dist/devices/bituo_technik.d.ts.map +1 -1
  9. package/dist/devices/bituo_technik.js +1 -0
  10. package/dist/devices/bituo_technik.js.map +1 -1
  11. package/dist/devices/ctm.d.ts.map +1 -1
  12. package/dist/devices/ctm.js +11 -0
  13. package/dist/devices/ctm.js.map +1 -1
  14. package/dist/devices/gledopto.d.ts.map +1 -1
  15. package/dist/devices/gledopto.js +0 -1
  16. package/dist/devices/gledopto.js.map +1 -1
  17. package/dist/devices/index.d.ts.map +1 -1
  18. package/dist/devices/index.js +2 -0
  19. package/dist/devices/index.js.map +1 -1
  20. package/dist/devices/inovelli.js +2 -2
  21. package/dist/devices/inovelli.js.map +1 -1
  22. package/dist/devices/lixee.d.ts.map +1 -1
  23. package/dist/devices/lixee.js +1 -0
  24. package/dist/devices/lixee.js.map +1 -1
  25. package/dist/devices/mindy.js +1 -1
  26. package/dist/devices/mindy.js.map +1 -1
  27. package/dist/devices/multiterm.d.ts.map +1 -1
  28. package/dist/devices/multiterm.js +0 -1
  29. package/dist/devices/multiterm.js.map +1 -1
  30. package/dist/devices/onokom.d.ts.map +1 -1
  31. package/dist/devices/onokom.js +117 -99
  32. package/dist/devices/onokom.js.map +1 -1
  33. package/dist/devices/orvibo.d.ts.map +1 -1
  34. package/dist/devices/orvibo.js +0 -2
  35. package/dist/devices/orvibo.js.map +1 -1
  36. package/dist/devices/perenio.js +2 -2
  37. package/dist/devices/perenio.js.map +1 -1
  38. package/dist/devices/philips.d.ts.map +1 -1
  39. package/dist/devices/philips.js +11 -1
  40. package/dist/devices/philips.js.map +1 -1
  41. package/dist/devices/plugwise.d.ts.map +1 -1
  42. package/dist/devices/plugwise.js +7 -2
  43. package/dist/devices/plugwise.js.map +1 -1
  44. package/dist/devices/sber.d.ts.map +1 -1
  45. package/dist/devices/sber.js +0 -2
  46. package/dist/devices/sber.js.map +1 -1
  47. package/dist/devices/schneider_electric.d.ts.map +1 -1
  48. package/dist/devices/schneider_electric.js +22 -22
  49. package/dist/devices/schneider_electric.js.map +1 -1
  50. package/dist/devices/shinasystem.d.ts.map +1 -1
  51. package/dist/devices/shinasystem.js +0 -1
  52. package/dist/devices/shinasystem.js.map +1 -1
  53. package/dist/devices/simon.d.ts.map +1 -1
  54. package/dist/devices/simon.js +42 -2
  55. package/dist/devices/simon.js.map +1 -1
  56. package/dist/devices/sinope.d.ts.map +1 -1
  57. package/dist/devices/sinope.js +2 -4
  58. package/dist/devices/sinope.js.map +1 -1
  59. package/dist/devices/sonoff.d.ts.map +1 -1
  60. package/dist/devices/sonoff.js +0 -1
  61. package/dist/devices/sonoff.js.map +1 -1
  62. package/dist/devices/sunricher.d.ts.map +1 -1
  63. package/dist/devices/sunricher.js +24 -0
  64. package/dist/devices/sunricher.js.map +1 -1
  65. package/dist/devices/tcl.d.ts +3 -0
  66. package/dist/devices/tcl.d.ts.map +1 -0
  67. package/dist/devices/tcl.js +47 -0
  68. package/dist/devices/tcl.js.map +1 -0
  69. package/dist/devices/third_reality.js +2 -2
  70. package/dist/devices/third_reality.js.map +1 -1
  71. package/dist/devices/trust.d.ts.map +1 -1
  72. package/dist/devices/trust.js +1 -0
  73. package/dist/devices/trust.js.map +1 -1
  74. package/dist/devices/tuya.d.ts.map +1 -1
  75. package/dist/devices/tuya.js +390 -9
  76. package/dist/devices/tuya.js.map +1 -1
  77. package/dist/devices/ubisys.d.ts.map +1 -1
  78. package/dist/devices/ubisys.js +0 -2
  79. package/dist/devices/ubisys.js.map +1 -1
  80. package/dist/devices/wirenboard.d.ts.map +1 -1
  81. package/dist/devices/wirenboard.js +6 -8
  82. package/dist/devices/wirenboard.js.map +1 -1
  83. package/dist/devices/xyzroe.js +2 -2
  84. package/dist/devices/xyzroe.js.map +1 -1
  85. package/dist/indexer.d.ts.map +1 -1
  86. package/dist/indexer.js +0 -1
  87. package/dist/indexer.js.map +1 -1
  88. package/dist/lib/color.d.ts.map +1 -1
  89. package/dist/lib/color.js +0 -3
  90. package/dist/lib/color.js.map +1 -1
  91. package/dist/lib/exposes.d.ts.map +1 -1
  92. package/dist/lib/exposes.js +2 -2
  93. package/dist/lib/exposes.js.map +1 -1
  94. package/dist/lib/ikea.d.ts.map +1 -1
  95. package/dist/lib/ikea.js +0 -5
  96. package/dist/lib/ikea.js.map +1 -1
  97. package/dist/lib/ledvance.d.ts.map +1 -1
  98. package/dist/lib/ledvance.js +0 -2
  99. package/dist/lib/ledvance.js.map +1 -1
  100. package/dist/lib/legacy.d.ts.map +1 -1
  101. package/dist/lib/legacy.js +0 -44
  102. package/dist/lib/legacy.js.map +1 -1
  103. package/dist/lib/lumi.d.ts.map +1 -1
  104. package/dist/lib/lumi.js +0 -23
  105. package/dist/lib/lumi.js.map +1 -1
  106. package/dist/lib/ota.d.ts.map +1 -1
  107. package/dist/lib/ota.js +0 -5
  108. package/dist/lib/ota.js.map +1 -1
  109. package/dist/lib/philips.d.ts.map +1 -1
  110. package/dist/lib/philips.js +0 -19
  111. package/dist/lib/philips.js.map +1 -1
  112. package/dist/lib/tuya.d.ts.map +1 -1
  113. package/dist/lib/tuya.js +0 -4
  114. package/dist/lib/tuya.js.map +1 -1
  115. package/dist/lib/utils.d.ts.map +1 -1
  116. package/dist/lib/utils.js +0 -5
  117. package/dist/lib/utils.js.map +1 -1
  118. package/dist/models-index.json +1 -1
  119. package/package.json +3 -3
@@ -591,7 +591,6 @@ const tzLocal = {
591
591
  const lookup = { mute: 0, low: 10, medium: 30, high: 50 };
592
592
  utils.assertString(value, "volume");
593
593
  const lookupValue = lookup[value];
594
- // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
595
594
  value = value.toLowerCase();
596
595
  utils.validateValue(value, Object.keys(lookup));
597
596
  await entity.write("ssIasWd", { 2: { value: lookupValue, type: 0x0a } }, utils.getOptions(meta.mapped, entity));
@@ -2609,7 +2608,12 @@ exports.definitions = [
2609
2608
  tuya.whitelabel("Moes", "ZLD-RCW_1", "RGB+CCT Zigbee LED controller", ["_TZ3000_7hcgjxpc"]),
2610
2609
  tuya.whitelabel("Moes", "ZB-TD5-RCW-GU10", "RGB+CCT 4.7W GU10 LED bulb", ["_TZ3210_rcggc0ys", "_TZ3210_ljoasixl"]),
2611
2610
  tuya.whitelabel("Moes", "ZB-TDA9-RCW-E27-MS", "RGB+CCT 9W E27 LED bulb", ["_TZ3210_wxa85bwk"]),
2612
- tuya.whitelabel("Moes", "ZB-LZD10-RCW", "10W RGB+CCT Smart Downlight", ["_TZ3210_s9lumfhn", "_TZ3210_jjqdqxfq", "_TZ3210_dwzfzfjc"]),
2611
+ tuya.whitelabel("Moes", "ZB-LZD10-RCW", "10W RGB+CCT Smart Downlight", [
2612
+ "_TZ3210_s9lumfhn",
2613
+ "_TZ3210_jjqdqxfq",
2614
+ "_TZ3210_dwzfzfjc",
2615
+ "_TZ3210_wbsgmojq",
2616
+ ]),
2613
2617
  tuya.whitelabel("Moes", "ZB-TDC6-RCW-E14", "RGB+CCT 5W E14 LED bulb", ["_TZ3210_ifga63rg"]),
2614
2618
  tuya.whitelabel("MiBoxer", "E3-ZR", "3 in 1 LED Controller", ["_TZB210_wy1pyu1q", "_TZB210_yatkpuha"]),
2615
2619
  tuya.whitelabel("MiBoxer", "SZ5", "5 in 1 LED Controller", ["_TZB210_w9hcix2r"]),
@@ -3014,7 +3018,7 @@ exports.definitions = [
3014
3018
  fromZigbee: [tuya.fz.datapoints],
3015
3019
  extend: [m.iasZoneAlarm({ zoneType: "rain", zoneAttributes: ["alarm_1"] }), m.battery({ percentageReporting: true })],
3016
3020
  exposes: [
3017
- e.illuminance().withUnit("mV"),
3021
+ e.illuminance_raw(),
3018
3022
  e.numeric("illuminance_average_20min", ea.STATE).withUnit("mV").withDescription("Illuminance average for the last 20 minutes"),
3019
3023
  e.numeric("illuminance_maximum_today", ea.STATE).withUnit("mV").withDescription("Illuminance maximum for the last 24 hours"),
3020
3024
  e.binary("cleaning_reminder", ea.STATE, true, false).withDescription("Cleaning reminder"),
@@ -3023,7 +3027,7 @@ exports.definitions = [
3023
3027
  meta: {
3024
3028
  tuyaDatapoints: [
3025
3029
  [4, "battery", tuya.valueConverter.raw],
3026
- [101, "illuminance", tuya.valueConverter.raw],
3030
+ [101, "illuminance_raw", tuya.valueConverter.raw],
3027
3031
  [102, "illuminance_average_20min", tuya.valueConverter.raw],
3028
3032
  [103, "illuminance_maximum_today", tuya.valueConverter.raw],
3029
3033
  [104, "cleaning_reminder", tuya.valueConverter.trueFalse0],
@@ -4488,7 +4492,7 @@ exports.definitions = [
4488
4492
  { vendor: "Smart9", model: "S9TSZGB" },
4489
4493
  { vendor: "Lonsonho", model: "TS0041" },
4490
4494
  { vendor: "Benexmart", model: "ZM-sui1" },
4491
- tuya.whitelabel("Tuya", "SH-SC07", "Button scene switch", ["_TZ3000_mrpevh8p", "_TZ3000_5bpeda8u"]),
4495
+ tuya.whitelabel("Tuya", "SH-SC07", "Button scene switch", ["_TZ3000_mrpevh8p", "_TZ3000_5bpeda8u", "_TZ3000_b4awzgct"]),
4492
4496
  tuya.whitelabel("Tuya", "MINI-ZSB", "Smart button", ["_TZ3000_qgwcxxws"]),
4493
4497
  tuya.whitelabel("Nous", "LZ4", "Wireless switch button", ["_TZ3000_6km7djcm"]),
4494
4498
  tuya.whitelabel("Marmitek", "Push_LE", "Smart switch", ["_TZ3000_4upl1fcj"]),
@@ -5192,7 +5196,7 @@ exports.definitions = [
5192
5196
  tuya.modernExtend.tuyaOnOff({
5193
5197
  switchType: true,
5194
5198
  endpoints: ["l1", "l2"],
5195
- powerOutageMemory: (manufacturerName) => manufacturerName !== "_TZ3000_qaa59zqd",
5199
+ powerOutageMemory: true,
5196
5200
  }),
5197
5201
  ],
5198
5202
  endpoint: (device) => {
@@ -5626,6 +5630,7 @@ exports.definitions = [
5626
5630
  "_TZE204_bjzrowv2",
5627
5631
  "_TZE200_axgvo9jh",
5628
5632
  "_TZE200_gaj531w3",
5633
+ "_TZE284_gaj531w3",
5629
5634
  "_TZE200_yia0p3tr",
5630
5635
  "_TZE200_rsj5pu8y",
5631
5636
  "_TZE200_yrugsphv",
@@ -5651,7 +5656,7 @@ exports.definitions = [
5651
5656
  description: "Curtain motor/roller blind motor/window pusher/tubular motor",
5652
5657
  whiteLabel: [
5653
5658
  { vendor: "Yushun", model: "YS-MT750" },
5654
- tuya.whitelabel("Yushun", "YS-MT750L", "Curtain motor", ["_TZE200_bqcqqjpb", "_TZE200_gaj531w3"]),
5659
+ tuya.whitelabel("Yushun", "YS-MT750L", "Curtain motor", ["_TZE200_bqcqqjpb", "_TZE200_gaj531w3", "_TZE284_gaj531w3"]),
5655
5660
  { vendor: "Zemismart", model: "ZM79E-DT" },
5656
5661
  { vendor: "Binthen", model: "BCM100D" },
5657
5662
  { vendor: "Binthen", model: "CV01A" },
@@ -9855,7 +9860,7 @@ exports.definitions = [
9855
9860
  .withDescription("Holidays (2 times `hh:mm/cc.c°C)`"),
9856
9861
  // ============== exposes for found, but not functional datapoints:
9857
9862
  /*
9858
- e.min_temperature_limit() // dp 16
9863
+ e.min_temperature_limit()
9859
9864
  .withValueMin(5)
9860
9865
  .withValueMax(15)
9861
9866
  .withValueStep(0.5)
@@ -12358,6 +12363,24 @@ exports.definitions = [
12358
12363
  },
12359
12364
  whiteLabel: [{ vendor: "Liwokit", model: "Fan+Light-01" }],
12360
12365
  },
12366
+ {
12367
+ fingerprint: tuya.fingerprint("TS0601", ["_TZE204_bql5khqx"]),
12368
+ model: "X99-G-kbFan-1g-ZG-LN-11",
12369
+ vendor: "Coswall",
12370
+ description: "Fan & light switch",
12371
+ extend: [tuya.modernExtend.tuyaBase({ dp: true })],
12372
+ exposes: [
12373
+ e.binary("status_indication", ea.STATE_SET, "ON", "OFF").withDescription("Light switch"),
12374
+ e.numeric("fan_speed", ea.STATE_SET).withValueMin(0).withValueMax(100).withValueStep(1).withDescription("Fan Speed %"),
12375
+ ],
12376
+ meta: {
12377
+ tuyaDatapoints: [
12378
+ [1, "state", tuya.valueConverter.onOff],
12379
+ [4, "fan_speed", tuya.valueConverter.raw],
12380
+ [5, "status_indication", tuya.valueConverter.onOff],
12381
+ ],
12382
+ },
12383
+ },
12361
12384
  {
12362
12385
  fingerprint: tuya.fingerprint("TS0601", ["_TZE200_lawxy9e2", "_TZE204_lawxy9e2"]),
12363
12386
  model: "TS0601_fan_5_levels_and_light_switch",
@@ -20566,6 +20589,7 @@ exports.definitions = [
20566
20589
  },
20567
20590
  },
20568
20591
  {
20592
+ zigbeeModel: ["ZS-304Z"],
20569
20593
  fingerprint: tuya.fingerprint("TS0601", ["_TZE284_k7p2q5d9", "_TZE284_65gzcss7", "_TZE284_0ints6wl", "_TZE284_yzr43ayq"]),
20570
20594
  model: "ZS-300Z",
20571
20595
  vendor: "Arteco",
@@ -20573,7 +20597,7 @@ exports.definitions = [
20573
20597
  extend: [tuya.modernExtend.tuyaBase({ dp: true })],
20574
20598
  whiteLabel: [
20575
20599
  tuya.whitelabel("Arteco", "ZS-302Z", "Soil moisture sensor", ["_TZE284_65gzcss7"]),
20576
- tuya.whitelabel("Arteco", "ZS-304Z", "Soil moisture sensor", ["_TZE284_0ints6wl", "_TZE284_yzr43ayq"]),
20600
+ { model: "ZS-304Z", fingerprint: [{ manufacturerName: "_TZE284_0ints6wl" }, { manufacturerName: "_TZE284_yzr43ayq" }, { modelID: "ZS-304Z" }] },
20577
20601
  ],
20578
20602
  exposes: [
20579
20603
  e.enum("water_warning", ea.STATE, ["none", "alarm"]).withDescription("Water shortage warning"),
@@ -21497,5 +21521,362 @@ exports.definitions = [
21497
21521
  ],
21498
21522
  },
21499
21523
  },
21524
+ {
21525
+ fingerprint: tuya.fingerprint("TS0601", ["_TZE200_eqpaxqdv"]),
21526
+ model: "PIMS3028",
21527
+ vendor: "KnockautX",
21528
+ description: "Cover plug-in receiver multi STAK 3/STAS 3",
21529
+ extend: [tuya.modernExtend.tuyaBase({ dp: true })],
21530
+ exposes: [
21531
+ e.enum("state", ea.STATE_SET, ["open", "stop", "close", "lock", "unlock"]).withDescription("Control commands"),
21532
+ e.cover_position().setAccess("position", ea.STATE_SET),
21533
+ e.enum("mode", ea.STATE_SET, ["up", "up_delete", "remove_up_down"]).withDescription("Set mode"),
21534
+ e.enum("control_back", ea.STATE_SET, ["forward", "back"]).withDescription("Set the motor running direction"),
21535
+ e.binary("auto_power", ea.STATE_SET, true, false).withDescription("Add wireless remote"),
21536
+ e.enum("work_state", ea.STATE, ["opening", "closing", "123"]).withDescription("Work state"),
21537
+ e.numeric("time_total", ea.STATE).withValueMin(0).withValueMax(600).withUnit("s").withDescription("Total travel time"),
21538
+ e.enum("situation_set", ea.STATE, ["fully_open", "fully_close"]).withDescription("Situation of the blinds"),
21539
+ e.binary("fault", ea.STATE, true, false).withDescription("Motor fault"),
21540
+ e.enum("border", ea.STATE_SET, ["down_delete", "remove_top_bottom"]).withDescription("Set lower/upper limit"),
21541
+ e.numeric("position_best", ea.STATE_SET).withValueMin(1).withValueMax(100).withDescription("Set the best position"),
21542
+ e
21543
+ .numeric("angle_horizontal", ea.STATE_SET)
21544
+ .withValueMin(0)
21545
+ .withValueMax(100)
21546
+ .withValueStep(25)
21547
+ .withUnit("°")
21548
+ .withDescription("Set the angle"),
21549
+ e.enum("calibration", ea.STATE_SET, ["start", "end"]).withDescription("Calibrate the travel limits"),
21550
+ e.numeric("quick_calibration", ea.STATE_SET).withValueMin(0).withValueMax(900).withUnit("s").withDescription("Set quick calibration"),
21551
+ e.binary("switch", ea.STATE_SET, true, false).withDescription("Trigger best position"),
21552
+ e.enum("reset", ea.STATE_SET, ["reset"]).withDescription("Trigger factory reset"),
21553
+ ],
21554
+ meta: {
21555
+ tuyaDatapoints: [
21556
+ [
21557
+ 1,
21558
+ "state",
21559
+ tuya.valueConverterBasic.lookup({
21560
+ open: tuya.enum(0),
21561
+ stop: tuya.enum(1),
21562
+ close: tuya.enum(2),
21563
+ lock: tuya.enum(3),
21564
+ unlock: tuya.enum(4),
21565
+ }),
21566
+ ],
21567
+ [2, "position", tuya.valueConverter.coverPosition],
21568
+ [3, "position", tuya.valueConverter.coverPositionInverted],
21569
+ [4, "mode", tuya.valueConverterBasic.lookup({ up: tuya.enum(0), up_delete: tuya.enum(1), remove_up_down: tuya.enum(2) })],
21570
+ [5, "control_back", tuya.valueConverterBasic.lookup({ forward: tuya.enum(0), back: tuya.enum(1) })],
21571
+ [6, "auto_power", tuya.valueConverter.raw],
21572
+ [7, "work_state", tuya.valueConverterBasic.lookup({ opening: tuya.enum(0), closing: tuya.enum(1), 123: tuya.enum(2) })],
21573
+ [10, "time_total", tuya.valueConverter.raw],
21574
+ [11, "situation_set", tuya.valueConverterBasic.lookup({ fully_open: tuya.enum(0), fully_close: tuya.enum(1) })],
21575
+ [12, "fault", tuya.valueConverter.raw],
21576
+ [16, "border", tuya.valueConverterBasic.lookup({ down_delete: tuya.enum(0), remove_top_bottom: tuya.enum(1) })],
21577
+ [19, "position_best", tuya.valueConverter.setLimit],
21578
+ [21, "angle_horizontal", tuya.valueConverter.raw],
21579
+ [101, "calibration", tuya.valueConverterBasic.lookup({ start: tuya.enum(0), end: tuya.enum(1) })],
21580
+ [102, "quick_calibration", tuya.valueConverter.raw],
21581
+ [103, "switch", tuya.valueConverter.raw],
21582
+ [104, "reset", tuya.valueConverterBasic.lookup({ reset: tuya.enum(0) })],
21583
+ ],
21584
+ },
21585
+ },
21586
+ {
21587
+ fingerprint: tuya.fingerprint("TS0601", ["_TZE284_ajuasrmx"]),
21588
+ model: "MSA201Z",
21589
+ vendor: "Merrytek",
21590
+ description: "24 GHz human presence sensor (TS0601, _TZE284_ajuasrmx)",
21591
+ extend: [tuya.modernExtend.tuyaBase({ dp: true })],
21592
+ exposes: [
21593
+ e.enum("state", ea.STATE, ["absence", "presence", "disabled"]).withLabel("Status"),
21594
+ e.presence(),
21595
+ e.enum("current_status", ea.STATE, ["approaching", "departing", "clear"]),
21596
+ e.illuminance().withLabel("Luminance"),
21597
+ e
21598
+ .numeric("hold_delay_time", ea.STATE_SET)
21599
+ .withUnit("s")
21600
+ .withValueMin(0)
21601
+ .withValueMax(300)
21602
+ .withValueStep(1)
21603
+ .withCategory("config")
21604
+ .withDescription(`Delay (seconds) before switching from Presence to Absence after no motion is detected.
21605
+ Recommended ≥ 15s to avoid premature Absence switching.`),
21606
+ e
21607
+ .enum("sensitivity", ea.STATE_SET, ["low", "medium", "high"])
21608
+ .withCategory("config")
21609
+ .withDescription(`
21610
+ Sensitivity of human presence detection:
21611
+ • High: suitable for environments with minimal motion interference, such as meeting rooms or cloakrooms away from windows.
21612
+ • Medium: suitable for most scenarios, such as living rooms or restaurants.
21613
+ • Low: suitable for environments with some minor motion interference, such as bedrooms.
21614
+ `),
21615
+ e
21616
+ .numeric("trigger_distance", ea.STATE_SET)
21617
+ .withUnit("m")
21618
+ .withValueMin(0.5)
21619
+ .withValueMax(4)
21620
+ .withValueStep(0.5)
21621
+ .withCategory("config")
21622
+ .withDescription("Distance within which the sensor detects motion, adjustable from 0.5m to 4m, in 0.5m steps."),
21623
+ e
21624
+ .numeric("forbidden_area", ea.STATE_SET)
21625
+ .withUnit("m")
21626
+ .withValueMin(0)
21627
+ .withValueMax(1.8)
21628
+ .withValueStep(0.1)
21629
+ .withCategory("config")
21630
+ .withDescription("Distance from the sensor within which motion is ignored to prevent false detection (0-1.8m)."),
21631
+ e
21632
+ .enum("ai_self_learning", ea.SET, ["AI self-learning"])
21633
+ .withLabel("AI environment self-learning")
21634
+ .withCategory("config")
21635
+ .withDescription(`AI self-learning to help the sensor ignore non-human motion in the environment.
21636
+ The learning process takes 1 minute, during which the sensor will blink. Ensure the area is completely empty
21637
+ during this time.`),
21638
+ e
21639
+ .enum("fast_setting", ea.STATE_SET, ["small", "medium", "large"])
21640
+ .withCategory("config")
21641
+ .withDescription(`
21642
+ Fast setting based on the size of the space:
21643
+ • Small: area less than 16m², e.g., tea room, bathroom.
21644
+ • Medium: area 16–25m², e.g., private office, public toilet, kitchen.
21645
+ • Large: area greater than 25m², e.g., open office, large conference room, living room.
21646
+ `),
21647
+ e
21648
+ .binary("indicator", ea.STATE_SET, "ON", "OFF")
21649
+ .withLabel("LED indicator")
21650
+ .withCategory("config")
21651
+ .withDescription("LED indicator providing a visual signal when motion is detected or the sensor changes state."),
21652
+ e
21653
+ .enum("sensor_mode", ea.STATE_SET, ["presence", "motion"])
21654
+ .withCategory("config")
21655
+ .withDescription(`
21656
+ Operating mode of the radar sensor:
21657
+ • Presence: detects micro-movements for continuous occupancy detection.
21658
+ • Motion: detects larger movements while ignoring small activity to reduce false triggers.
21659
+ `),
21660
+ e
21661
+ .binary("single_mode", ea.STATE_SET, "ON", "OFF")
21662
+ .withCategory("config")
21663
+ .withDescription(`Suitable for spaces where only one person is present at a time. The sensor maintains Presence
21664
+ while the person is within range and automatically switches to Absence 15 seconds after they leave.`),
21665
+ e
21666
+ .binary("absence_circling_report", ea.STATE_SET, "ON", "OFF")
21667
+ .withCategory("config")
21668
+ .withDescription(`Periodic reporting of the Absence state after the sensor switches to Absence, it will
21669
+ send regular status updates automatically.`),
21670
+ e
21671
+ .numeric("absence_circling_interval", ea.STATE_SET)
21672
+ .withUnit("min")
21673
+ .withValueMin(2)
21674
+ .withValueMax(30)
21675
+ .withValueStep(1)
21676
+ .withCategory("config")
21677
+ .withDescription("Interval (minutes) between periodic Absence reports after switching to Absence."),
21678
+ // Internal DP; for internal use only, not exposed in UI
21679
+ /*
21680
+ e
21681
+ .binary("status_flip", ea.STATE_SET, "ON", "OFF")
21682
+ .withCategory("config")
21683
+ .withDescription("Invert reported presence state. When enabled, Presence becomes Absence and vice-versa."),
21684
+ */
21685
+ e
21686
+ .binary("find_device", ea.STATE_SET, "ON", "OFF")
21687
+ .withCategory("config")
21688
+ .withDescription("Indicator LED flashes to help locate the sensor."),
21689
+ e.binary("enable_sensor", ea.STATE_SET, "ON", "OFF").withCategory("config").withDescription("Enable or disable the sensor."),
21690
+ e
21691
+ .enum("factory_reset", ea.SET, ["factory reset"])
21692
+ .withCategory("config")
21693
+ .withDescription("Restores factory defaults, removing all customized settings."),
21694
+ e
21695
+ .enum("lux_mode", ea.STATE_SET, ["threshold", "report"])
21696
+ .withCategory("config")
21697
+ .withDescription(`
21698
+ Lux sensor operation mode:
21699
+ • Threshold: triggers based on a fixed daylight level.
21700
+ • Report: periodically reports light levels using time-based or change-based intervals.
21701
+ `),
21702
+ e
21703
+ .numeric("daylight_threshold", ea.STATE_SET)
21704
+ .withUnit("lux")
21705
+ .withValueMin(1)
21706
+ .withValueMax(3000)
21707
+ .withValueStep(1)
21708
+ .withCategory("config")
21709
+ .withDescription(`Lux level defining sufficient natural light (daylight), applicable only when Lux mode is set to
21710
+ Threshold.`),
21711
+ e
21712
+ .enum("lux_report_mode", ea.STATE_SET, ["timed", "difference"])
21713
+ .withCategory("config")
21714
+ .withDescription(`
21715
+ Reporting style when Lux mode is set to Report:
21716
+ • Timed: sends light level updates at fixed intervals.
21717
+ • Difference: (Not implemented on this device) reports only when lux changes exceed a set threshold.
21718
+ `),
21719
+ e
21720
+ .numeric("lux_timed_interval", ea.STATE_SET)
21721
+ .withUnit("s")
21722
+ .withValueMin(5)
21723
+ .withValueMax(3600)
21724
+ .withValueStep(5)
21725
+ .withCategory("config")
21726
+ .withDescription("Interval (seconds) for timed lux reports when Lux report mode is set to Timed."),
21727
+ e
21728
+ .numeric("lux_difference_threshold", ea.STATE_SET)
21729
+ .withUnit("lux")
21730
+ .withValueMin(1)
21731
+ .withValueMax(2000)
21732
+ .withValueStep(1)
21733
+ .withCategory("config")
21734
+ .withDescription(`
21735
+ Lux change required to trigger a report when Lux report mode is set to Difference.
21736
+ Note: This device does not support Difference reporting, so this setting has no effect.
21737
+ `),
21738
+ e
21739
+ .numeric("lux_difference_value", ea.STATE)
21740
+ .withCategory("diagnostic")
21741
+ .withDescription(`
21742
+ Reported lux value for Difference mode.
21743
+ Note: This device does not support Difference reporting, so this setting has no effect.
21744
+ `),
21745
+ e
21746
+ .text("interference_positions", ea.STATE)
21747
+ .withCategory("diagnostic")
21748
+ .withDescription("List of distances (m) where non-human interference was detected."),
21749
+ e
21750
+ .enum("home_environment", ea.STATE, ["normal", "slight", "strong", "severe"])
21751
+ .withCategory("diagnostic")
21752
+ .withDescription("Environmental interference level detected by the sensor."),
21753
+ ],
21754
+ meta: {
21755
+ tuyaDatapoints: [
21756
+ [
21757
+ 1,
21758
+ null,
21759
+ {
21760
+ from: (v) => {
21761
+ switch (v) {
21762
+ case 0:
21763
+ return { state: "absence", presence: false };
21764
+ case 1:
21765
+ return { state: "presence", presence: true };
21766
+ case 2:
21767
+ return { state: "disabled", presence: false };
21768
+ default:
21769
+ console.warn("Unknown DP1 value:", v);
21770
+ return { state: "absence", presence: false };
21771
+ }
21772
+ },
21773
+ to: (value) => {
21774
+ switch (value.state) {
21775
+ case "presence":
21776
+ return 1;
21777
+ case "absence":
21778
+ return 0;
21779
+ case "disabled":
21780
+ return 2;
21781
+ default:
21782
+ return 0;
21783
+ }
21784
+ },
21785
+ },
21786
+ ],
21787
+ [2, "trigger_distance", tuya.valueConverter.divideBy10],
21788
+ [101, "illuminance", tuya.valueConverter.raw],
21789
+ [102, "lux_difference_value", tuya.valueConverter.raw],
21790
+ [
21791
+ 103,
21792
+ "ai_self_learning",
21793
+ {
21794
+ from: (v) => ({ 0: "end", 4: "learning" })[v],
21795
+ to: () => 1,
21796
+ },
21797
+ ],
21798
+ [
21799
+ 104,
21800
+ "factory_reset",
21801
+ {
21802
+ from: () => "idle",
21803
+ to: (v) => ({ "factory reset": 1 })[v] || 0,
21804
+ },
21805
+ ],
21806
+ [
21807
+ 105,
21808
+ "fast_setting",
21809
+ {
21810
+ from: (v) => ({ 1: "large", 2: "medium", 3: "small" })[v] ?? "medium",
21811
+ to: (v) => ({ Small: 3, Medium: 2, Large: 1 })[v] ?? 2,
21812
+ },
21813
+ ],
21814
+ [107, "indicator", tuya.valueConverter.onOff],
21815
+ [106, "hold_delay_time", tuya.valueConverter.raw],
21816
+ [
21817
+ 108,
21818
+ "current_status",
21819
+ tuya.valueConverterBasic.lookup({
21820
+ approaching: tuya.enum(0),
21821
+ departing: tuya.enum(1),
21822
+ clear: tuya.enum(2),
21823
+ }),
21824
+ ],
21825
+ [109, "enable_sensor", tuya.valueConverter.onOff],
21826
+ [
21827
+ 110,
21828
+ "sensitivity",
21829
+ tuya.valueConverterBasic.lookup({
21830
+ low: tuya.enum(3),
21831
+ medium: tuya.enum(2),
21832
+ high: tuya.enum(1),
21833
+ }),
21834
+ ],
21835
+ //[111, 'presence', tuya.valueConverter.trueFalse],
21836
+ [112, "status_flip", tuya.valueConverter.onOff],
21837
+ [113, "interference_positions", tuya.valueConverter.raw],
21838
+ [114, "forbidden_area", tuya.valueConverter.divideBy10],
21839
+ [115, "daylight_threshold", tuya.valueConverter.raw],
21840
+ [
21841
+ 116,
21842
+ "sensor_mode",
21843
+ {
21844
+ from: (v) => ({ 1: "presence", 2: "motion" })[v] ?? "unknown",
21845
+ to: (v) => ({ presence: 1, motion: 2 })[v] ?? 1,
21846
+ },
21847
+ ],
21848
+ [117, "single_mode", tuya.valueConverter.onOff],
21849
+ [118, "find_device", tuya.valueConverter.onOff],
21850
+ [
21851
+ 119,
21852
+ "lux_mode",
21853
+ tuya.valueConverterBasic.lookup({
21854
+ threshold: tuya.enum(0),
21855
+ report: tuya.enum(1),
21856
+ }),
21857
+ ],
21858
+ [
21859
+ 120,
21860
+ "lux_report_mode",
21861
+ tuya.valueConverterBasic.lookup({
21862
+ timed: tuya.enum(0),
21863
+ difference: tuya.enum(1),
21864
+ }),
21865
+ ],
21866
+ [121, "lux_difference_threshold", tuya.valueConverter.raw],
21867
+ [122, "lux_timed_interval", tuya.valueConverter.raw],
21868
+ [123, "absence_circling_report", tuya.valueConverter.onOff],
21869
+ [124, "absence_circling_interval", tuya.valueConverter.raw],
21870
+ [
21871
+ 125,
21872
+ "home_environment",
21873
+ {
21874
+ from: (v) => ({ 0: "normal", 1: "slight", 2: "strong", 3: "severe" })[v] ?? "unknown",
21875
+ to: (v) => ({ normal: 0, slight: 1, strong: 2, severe: 3 })[v] ?? 0,
21876
+ },
21877
+ ],
21878
+ ],
21879
+ },
21880
+ },
21500
21881
  ];
21501
21882
  //# sourceMappingURL=tuya.js.map