zigbee-herdsman-converters 25.61.0 → 25.63.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.
@@ -733,6 +733,16 @@ const tzLocal = {
733
733
  });
734
734
  },
735
735
  },
736
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
737
+ TS0004_backlight_mode: {
738
+ key: ["backlight_mode"],
739
+ convertSet: async (entity, key, value, meta) => {
740
+ const lookup = { red_when_on: 0, pink_when_on: 1, red_on_blue_off: 2, pink_on_blue_off: 3 };
741
+ const modeValue = utils.getFromLookup(value, lookup);
742
+ await entity.write("genOnOff", { tuyaBacklightMode: modeValue });
743
+ return { state: { backlight_mode: utils.getFromLookup(modeValue, lookup) } };
744
+ },
745
+ },
736
746
  };
737
747
  const fzLocal = {
738
748
  // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
@@ -962,6 +972,17 @@ const fzLocal = {
962
972
  }
963
973
  },
964
974
  },
975
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
976
+ TS0004_backlight_mode: {
977
+ cluster: "genOnOff",
978
+ type: ["attributeReport", "readResponse"],
979
+ convert: (model, msg, publish, options, meta) => {
980
+ if (msg.data.tuyaBacklightMode !== undefined) {
981
+ const backlightLookup = { 0: "red_when_on", 1: "pink_when_on", 2: "red_on_blue_off", 3: "pink_on_blue_off" };
982
+ return { backlight_mode: backlightLookup[msg.data.tuyaBacklightMode] };
983
+ }
984
+ },
985
+ },
965
986
  };
966
987
  exports.definitions = [
967
988
  {
@@ -2256,6 +2277,9 @@ exports.definitions = [
2256
2277
  color: true,
2257
2278
  }),
2258
2279
  ],
2280
+ meta: {
2281
+ moveToLevelWithOnOffDisable: true,
2282
+ },
2259
2283
  },
2260
2284
  {
2261
2285
  zigbeeModel: ["SM0001"],
@@ -6120,6 +6144,7 @@ exports.definitions = [
6120
6144
  "_TZE200_eevqq1uv",
6121
6145
  "_TZE204_ejh6owwz",
6122
6146
  "_TZE200_ba69l9ol",
6147
+ "_TZE200_68nvbi09",
6123
6148
  ]),
6124
6149
  model: "TS0601_cover_3",
6125
6150
  vendor: "Tuya",
@@ -6135,7 +6160,7 @@ exports.definitions = [
6135
6160
  e.binary("motor_fault", ea.STATE, true, false),
6136
6161
  ],
6137
6162
  whiteLabel: [
6138
- tuya.whitelabel("Zemismart", "ZM16EL-03/33", "Cover motor", ["_TZE200_68nvbio9"]),
6163
+ tuya.whitelabel("Zemismart", "ZM16EL-03/33", "Cover motor", ["_TZE200_68nvbio9", "_TZE200_68nvbi09"]),
6139
6164
  tuya.whitelabel("Zemismart", "ZM25EL", "Cover motor", ["_TZE200_pw7mji0l"]),
6140
6165
  tuya.whitelabel("Zemismart", "ZM85EL-2Z", "Roman Rod I type U curtains track", ["_TZE200_cf1sl3tj", "_TZE200_nw1r9hp6"]),
6141
6166
  tuya.whitelabel("Hiladuo", "B09M3R35GC", "Motorized roller shade", ["_TZE200_9p5xmj5r"]),
@@ -7463,7 +7488,7 @@ exports.definitions = [
7463
7488
  electricalMeasurementsFzConverter: fzLocal.TS011F_electrical_measurement,
7464
7489
  // Conditional features
7465
7490
  powerOutageMemory: (manufacturerName) => manufacturerName !== "_TZ3000_cicwjqth",
7466
- indicatorMode: (manufacturerName) => manufacturerName === "_TZ3000_ww6drja5",
7491
+ indicatorMode: (manufacturerName) => manufacturerName !== "_TZ3000_ww6drja5",
7467
7492
  childLock: (manufacturerName) => manufacturerName !== "_TZ3000_cicwjqth",
7468
7493
  onOffCountdown: (manufacturerName) => manufacturerName !== "_TZ3000_cicwjqth",
7469
7494
  }),
@@ -8785,6 +8810,33 @@ exports.definitions = [
8785
8810
  await reporting.bind(device.getEndpoint(4), coordinatorEndpoint, ["genOnOff"]);
8786
8811
  },
8787
8812
  },
8813
+ {
8814
+ fingerprint: tuya.fingerprint("TS0004", ["_TZ3000_ncb6mkx8"]),
8815
+ model: "TS0004_fan_light_switch",
8816
+ vendor: "Tuya",
8817
+ description: "Fan and light controller with 3 speeds",
8818
+ fromZigbee: [fz.on_off, fzLocal.TS0004_backlight_mode],
8819
+ toZigbee: [tz.on_off, tzLocal.TS0004_backlight_mode],
8820
+ exposes: [
8821
+ e.switch().withEndpoint("lights").withDescription("Light control"),
8822
+ e.switch().withEndpoint("low").withDescription("Fan speed: low"),
8823
+ e.switch().withEndpoint("medium").withDescription("Fan speed: medium"),
8824
+ e.switch().withEndpoint("high").withDescription("Fan speed: high"),
8825
+ e
8826
+ .enum("backlight_mode", ea.ALL, ["red_when_on", "pink_when_on", "red_on_blue_off", "pink_on_blue_off"])
8827
+ .withDescription("Backlight color mode"),
8828
+ ],
8829
+ endpoint: (device) => {
8830
+ return { lights: 1, high: 2, low: 3, medium: 4 };
8831
+ },
8832
+ meta: { multiEndpoint: true },
8833
+ configure: async (device, coordinatorEndpoint) => {
8834
+ await tuya.configureMagicPacket(device, coordinatorEndpoint);
8835
+ for (const ID of [1, 2, 3, 4]) {
8836
+ await reporting.bind(device.getEndpoint(ID), coordinatorEndpoint, ["genOnOff"]);
8837
+ }
8838
+ },
8839
+ },
8788
8840
  {
8789
8841
  fingerprint: tuya.fingerprint("TS0726", ["_TZ3002_1s0vfmtv", "_TZ3002_gdwja9a7"]),
8790
8842
  model: "TS0726_2_gang",
@@ -11546,7 +11598,8 @@ exports.definitions = [
11546
11598
  meta: {
11547
11599
  tuyaDatapoints: [
11548
11600
  [1, "presence", tuya.valueConverter.trueFalse1],
11549
- [106, "illuminance", tuya.valueConverter.raw],
11601
+ [2, "static_detection_sensitivity", tuya.valueConverter.raw],
11602
+ [4, "static_detection_distance", tuya.valueConverter.divideBy100],
11550
11603
  [
11551
11604
  101,
11552
11605
  "motion_state",
@@ -11558,8 +11611,7 @@ exports.definitions = [
11558
11611
  }),
11559
11612
  ],
11560
11613
  [102, "fading_time", tuya.valueConverter.raw],
11561
- [4, "static_detection_distance", tuya.valueConverter.divideBy100],
11562
- [2, "static_detection_sensitivity", tuya.valueConverter.raw],
11614
+ [106, "illuminance", tuya.valueConverter.raw],
11563
11615
  [107, "indicator", tuya.valueConverter.onOff],
11564
11616
  [121, "battery", tuya.valueConverter.raw],
11565
11617
  [
@@ -11676,7 +11728,7 @@ exports.definitions = [
11676
11728
  vendor: "Tuya",
11677
11729
  description: "2 channel dimmer",
11678
11730
  whiteLabel: [tuya.whitelabel("Nedis", "ZBWD20RD", "SmartLife Triac Dimmer", ["_TZ3210_mt5xjoy6"])],
11679
- fromZigbee: [fz.TS110E, fz.TS110E_light_type, tuya.fz.power_on_behavior_1, fz.on_off],
11731
+ fromZigbee: [fz.TS110E, fz.TS110E_switch_type, tuya.fz.power_on_behavior_1, fz.on_off],
11680
11732
  toZigbee: [tz.TS110E_onoff_brightness, tz.TS110E_options, tuya.tz.power_on_behavior_1, tz.light_brightness_move],
11681
11733
  meta: { multiEndpoint: true },
11682
11734
  exposes: [
@@ -14481,6 +14533,165 @@ exports.definitions = [
14481
14533
  ],
14482
14534
  },
14483
14535
  },
14536
+ {
14537
+ fingerprint: tuya.fingerprint("TS0601", ["_TZE284_aai5grix", "_TZE204_aai5grix"]),
14538
+ model: "MTD285-ZB",
14539
+ vendor: "Wenzhi",
14540
+ description: "24GHz mmWave human presence sensor",
14541
+ extend: [tuya.modernExtend.tuyaBase({ dp: true })],
14542
+ exposes: [
14543
+ e.presence(),
14544
+ e.enum("state", ea.STATE, ["none", "presence", "move"]).withDescription("Presence state"),
14545
+ e.illuminance().withDescription("Measured illuminance"),
14546
+ e
14547
+ .numeric("min_distance", ea.STATE_SET)
14548
+ .withValueMin(0)
14549
+ .withValueMax(8.4)
14550
+ .withValueStep(0.1)
14551
+ .withUnit("m")
14552
+ .withDescription("Minimum detection distance"),
14553
+ e
14554
+ .numeric("max_distance", ea.STATE_SET)
14555
+ .withValueMin(0)
14556
+ .withValueMax(8.4)
14557
+ .withValueStep(0.1)
14558
+ .withUnit("m")
14559
+ .withDescription("Maximum detection distance"),
14560
+ e.numeric("target_distance", ea.STATE).withValueMin(0).withValueMax(9.9).withUnit("m").withDescription("Target distance"),
14561
+ ...Array.from({ length: 11 }, (_, i) => e
14562
+ .enum(`gate_enable_${String(i + 1).padStart(2, "0")}`, ea.STATE_SET, ["disable", "enable"])
14563
+ .withDescription(`Distance gate ${i + 1} enable`)),
14564
+ e.numeric("configuration_gate", ea.STATE_SET).withValueMin(1).withValueMax(11).withDescription("Select gate for threshold config"),
14565
+ e.numeric("move_threshold", ea.STATE_SET).withValueMin(0).withValueMax(99).withDescription("Configure motion detection threshold"),
14566
+ e.numeric("presence_threshold", ea.STATE_SET).withValueMin(0).withValueMax(99).withDescription("Configure presence detection threshold"),
14567
+ e.numeric("nearest_target_gate", ea.STATE).withValueMin(0).withValueMax(11).withDescription("Nearest active gate"),
14568
+ e
14569
+ .numeric("target_countdown", ea.STATE)
14570
+ .withValueMin(0)
14571
+ .withValueMax(3600)
14572
+ .withUnit("s")
14573
+ .withDescription("Target timeout countdown (debug only)"),
14574
+ e
14575
+ .numeric("target_velocity", ea.STATE)
14576
+ .withValueMin(-9.99)
14577
+ .withValueMax(9.99)
14578
+ .withUnit("m/s")
14579
+ .withDescription("Target speed with direction"),
14580
+ e.enum("debug_switch", ea.STATE_SET, ["off", "on"]).withDescription("Debug mode toggle"),
14581
+ e
14582
+ .enum("led_mode", ea.STATE_SET, ["silence", "status"]) // same as in the app
14583
+ .withDescription("LED indicator mode"),
14584
+ e.numeric("delay_time", ea.STATE_SET).withValueMin(5).withValueMax(3600).withUnit("s").withDescription("Departure delay time"),
14585
+ e
14586
+ .numeric("block_time", ea.STATE_SET)
14587
+ .withValueMin(0)
14588
+ .withValueMax(10)
14589
+ .withValueStep(0.5)
14590
+ .withUnit("s")
14591
+ .withDescription("Block time after unoccupancy"), // same as in the app
14592
+ e
14593
+ .enum("judge_logic", ea.STATE_SET, ["large_move", "small_move", "custom_move"]) // same as in the app
14594
+ .withDescription("Presence detection algorithm"),
14595
+ e
14596
+ .enum("environmental_noise_collect", ea.STATE_SET, ["start", "ongoing", "complete"])
14597
+ .withDescription("Environmental background noise collection status"),
14598
+ e.enum("device_control", ea.STATE_SET, ["no_action", "restart", "reset_param"]).withDescription("Device control commands"),
14599
+ e.enum("presence_sensitivity", ea.STATE_SET, ["high", "medium", "low", "custom"]).withDescription("Presence sensitivity"),
14600
+ e.enum("move_sensitivity", ea.STATE_SET, ["high", "medium", "low", "custom"]).withDescription("Motion sensitivity"),
14601
+ e
14602
+ .enum("scene_mode", ea.STATE_SET, [
14603
+ "custom", // more fitting and same as in the app
14604
+ "toilet",
14605
+ "kitchen",
14606
+ "corridor",
14607
+ "bedroom",
14608
+ "living_room",
14609
+ "meeting_room", // same as in the app
14610
+ ])
14611
+ .withDescription("Scene mode preset"),
14612
+ e.binary("illuminance_report", ea.STATE_SET, "on", "off").withDescription("Illuminance reporting toggle"),
14613
+ e.binary("move_detect", ea.STATE_SET, "on", "off").withDescription("Motion detection toggle"),
14614
+ e.binary("distance_report", ea.STATE_SET, "on", "off").withDescription("Distance reporting toggle"),
14615
+ e.binary("speed_report", ea.STATE_SET, "on", "off").withDescription("Speed reporting toggle"),
14616
+ ],
14617
+ meta: {
14618
+ tuyaDatapoints: [
14619
+ [
14620
+ 1,
14621
+ null,
14622
+ {
14623
+ from: (v) => ({
14624
+ presence: v !== 0,
14625
+ state: v === 0 ? "none" : v === 1 ? "presence" : "move",
14626
+ }),
14627
+ },
14628
+ ],
14629
+ [3, "min_distance", tuya.valueConverter.divideBy10],
14630
+ [4, "max_distance", tuya.valueConverter.divideBy10],
14631
+ [9, "target_distance", tuya.valueConverter.divideBy10],
14632
+ [101, "gate_enable_01", tuya.valueConverterBasic.lookup({ disable: tuya.enum(0), enable: tuya.enum(1) })],
14633
+ [102, "gate_enable_02", tuya.valueConverterBasic.lookup({ disable: tuya.enum(0), enable: tuya.enum(1) })],
14634
+ [103, "gate_enable_03", tuya.valueConverterBasic.lookup({ disable: tuya.enum(0), enable: tuya.enum(1) })],
14635
+ [104, "gate_enable_04", tuya.valueConverterBasic.lookup({ disable: tuya.enum(0), enable: tuya.enum(1) })],
14636
+ [105, "gate_enable_05", tuya.valueConverterBasic.lookup({ disable: tuya.enum(0), enable: tuya.enum(1) })],
14637
+ [106, "gate_enable_06", tuya.valueConverterBasic.lookup({ disable: tuya.enum(0), enable: tuya.enum(1) })],
14638
+ [107, "gate_enable_07", tuya.valueConverterBasic.lookup({ disable: tuya.enum(0), enable: tuya.enum(1) })],
14639
+ [108, "gate_enable_08", tuya.valueConverterBasic.lookup({ disable: tuya.enum(0), enable: tuya.enum(1) })],
14640
+ [109, "gate_enable_09", tuya.valueConverterBasic.lookup({ disable: tuya.enum(0), enable: tuya.enum(1) })],
14641
+ [110, "gate_enable_10", tuya.valueConverterBasic.lookup({ disable: tuya.enum(0), enable: tuya.enum(1) })],
14642
+ [111, "gate_enable_11", tuya.valueConverterBasic.lookup({ disable: tuya.enum(0), enable: tuya.enum(1) })],
14643
+ [112, "configuration_gate", tuya.valueConverter.raw],
14644
+ [113, "move_threshold", tuya.valueConverter.raw],
14645
+ [114, "presence_threshold", tuya.valueConverter.raw],
14646
+ [115, "nearest_target_gate", tuya.valueConverter.raw],
14647
+ [116, "target_countdown", tuya.valueConverter.raw],
14648
+ [117, "target_velocity", tuya.valueConverter.divideBy100],
14649
+ [118, "debug_switch", tuya.valueConverterBasic.lookup({ off: tuya.enum(0), on: tuya.enum(1) })],
14650
+ [119, "led_mode", tuya.valueConverterBasic.lookup({ silence: tuya.enum(0), status: tuya.enum(1) })],
14651
+ [120, "delay_time", tuya.valueConverter.raw],
14652
+ [121, "block_time", tuya.valueConverter.divideBy10],
14653
+ [
14654
+ 122,
14655
+ "judge_logic",
14656
+ tuya.valueConverterBasic.lookup({ large_move: tuya.enum(0), small_move: tuya.enum(1), custom_move: tuya.enum(2) }),
14657
+ ],
14658
+ [
14659
+ 123,
14660
+ "environmental_noise_collect",
14661
+ tuya.valueConverterBasic.lookup({ start: tuya.enum(0), ongoing: tuya.enum(1), complete: tuya.enum(2) }),
14662
+ ],
14663
+ [124, "device_control", tuya.valueConverterBasic.lookup({ no_action: tuya.enum(0), restart: tuya.enum(1), reset_param: tuya.enum(2) })],
14664
+ [125, "illuminance", tuya.valueConverter.raw],
14665
+ [
14666
+ 126,
14667
+ "presence_sensitivity",
14668
+ tuya.valueConverterBasic.lookup({ high: tuya.enum(0), medium: tuya.enum(1), low: tuya.enum(2), custom: tuya.enum(3) }),
14669
+ ],
14670
+ [
14671
+ 127,
14672
+ "move_sensitivity",
14673
+ tuya.valueConverterBasic.lookup({ high: tuya.enum(0), medium: tuya.enum(1), low: tuya.enum(2), custom: tuya.enum(3) }),
14674
+ ],
14675
+ [
14676
+ 128,
14677
+ "scene_mode",
14678
+ tuya.valueConverterBasic.lookup({
14679
+ custom: tuya.enum(0), // more fitting and same as in the app
14680
+ toilet: tuya.enum(1),
14681
+ kitchen: tuya.enum(2),
14682
+ corridor: tuya.enum(3),
14683
+ bedroom: tuya.enum(4),
14684
+ living_room: tuya.enum(5),
14685
+ meeting_room: tuya.enum(6), // same as in the app
14686
+ }),
14687
+ ],
14688
+ [129, "illuminance_report", tuya.valueConverterBasic.lookup({ off: tuya.enum(0), on: tuya.enum(1) })],
14689
+ [130, "move_detect", tuya.valueConverterBasic.lookup({ off: tuya.enum(0), on: tuya.enum(1) })],
14690
+ [131, "distance_report", tuya.valueConverterBasic.lookup({ off: tuya.enum(0), on: tuya.enum(1) })],
14691
+ [132, "speed_report", tuya.valueConverterBasic.lookup({ off: tuya.enum(0), on: tuya.enum(1) })],
14692
+ ],
14693
+ },
14694
+ },
14484
14695
  {
14485
14696
  fingerprint: tuya.fingerprint("TS0601", ["_TZE204_81yrt3lo", "_TZE284_81yrt3lo"]),
14486
14697
  model: "PJ-1203A",
@@ -20313,5 +20524,58 @@ exports.definitions = [
20313
20524
  ],
20314
20525
  },
20315
20526
  },
20527
+ {
20528
+ fingerprint: tuya.fingerprint("TS0601", ["_TZE200_fodv6bkr"]),
20529
+ model: "RM28-LE",
20530
+ vendor: "Ronco",
20531
+ description: "Zigbee roller shade motor",
20532
+ extend: [tuya.modernExtend.tuyaBase({ dp: true })],
20533
+ options: [exposes.options.invert_cover()],
20534
+ exposes: [
20535
+ e.battery(),
20536
+ e.cover_position().setAccess("position", ea.STATE_SET),
20537
+ e.enum("reverse_direction", ea.STATE_SET, ["forward", "back"]).withDescription("Reverse the motor direction"),
20538
+ e.text("work_state", ea.STATE),
20539
+ e.enum("click_control", ea.STATE_SET, ["up", "down"]).withDescription("Single motor steps"),
20540
+ e.enum("border", ea.STATE_SET, ["up", "down", "up_delete", "down_delete", "remove_top_bottom"]),
20541
+ e.binary("motor_fault", ea.STATE, true, false),
20542
+ ],
20543
+ meta: {
20544
+ // All datapoints go in here
20545
+ tuyaDatapoints: [
20546
+ [
20547
+ 1,
20548
+ "state",
20549
+ tuya.valueConverterBasic.lookup({
20550
+ OPEN: tuya.enum(0),
20551
+ STOP: tuya.enum(1),
20552
+ CLOSE: tuya.enum(2),
20553
+ }),
20554
+ ],
20555
+ [2, "position", tuya.valueConverter.coverPosition],
20556
+ [3, "position", tuya.valueConverter.coverPosition],
20557
+ [5, "reverse_direction", tuya.valueConverterBasic.lookup({ forward: tuya.enum(0), back: tuya.enum(1) })],
20558
+ [
20559
+ 7,
20560
+ "work_state",
20561
+ tuya.valueConverterBasic.lookup((options) => options.invert_cover ? { opening: tuya.enum(1), closing: tuya.enum(0) } : { opening: tuya.enum(0), closing: tuya.enum(1) }),
20562
+ ],
20563
+ [12, "motor_fault", tuya.valueConverter.trueFalse1],
20564
+ [13, "battery", tuya.valueConverter.raw],
20565
+ [
20566
+ 16,
20567
+ "border",
20568
+ tuya.valueConverterBasic.lookup({
20569
+ up: tuya.enum(0),
20570
+ down: tuya.enum(1),
20571
+ up_delete: tuya.enum(2),
20572
+ down_delete: tuya.enum(3),
20573
+ remove_top_bottom: tuya.enum(4),
20574
+ }),
20575
+ ],
20576
+ [20, "click_control", tuya.valueConverterBasic.lookup({ up: tuya.enum(0), down: tuya.enum(1) })],
20577
+ ],
20578
+ },
20579
+ },
20316
20580
  ];
20317
20581
  //# sourceMappingURL=tuya.js.map