zigbee-herdsman-converters 25.88.0 → 25.90.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 (43) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/dist/devices/bubendorff.d.ts +3 -0
  3. package/dist/devices/bubendorff.d.ts.map +1 -0
  4. package/dist/devices/bubendorff.js +47 -0
  5. package/dist/devices/bubendorff.js.map +1 -0
  6. package/dist/devices/easyiot.js +5 -2
  7. package/dist/devices/easyiot.js.map +1 -1
  8. package/dist/devices/envilar.d.ts.map +1 -1
  9. package/dist/devices/envilar.js +7 -0
  10. package/dist/devices/envilar.js.map +1 -1
  11. package/dist/devices/index.d.ts.map +1 -1
  12. package/dist/devices/index.js +2 -0
  13. package/dist/devices/index.js.map +1 -1
  14. package/dist/devices/innr.d.ts.map +1 -1
  15. package/dist/devices/innr.js +7 -0
  16. package/dist/devices/innr.js.map +1 -1
  17. package/dist/devices/lumi.d.ts.map +1 -1
  18. package/dist/devices/lumi.js +9 -1
  19. package/dist/devices/lumi.js.map +1 -1
  20. package/dist/devices/philips.d.ts.map +1 -1
  21. package/dist/devices/philips.js +63 -30
  22. package/dist/devices/philips.js.map +1 -1
  23. package/dist/devices/schneider_electric.d.ts.map +1 -1
  24. package/dist/devices/schneider_electric.js +5 -1
  25. package/dist/devices/schneider_electric.js.map +1 -1
  26. package/dist/devices/shelly.d.ts.map +1 -1
  27. package/dist/devices/shelly.js +7 -0
  28. package/dist/devices/shelly.js.map +1 -1
  29. package/dist/devices/sinope.d.ts.map +1 -1
  30. package/dist/devices/sinope.js +24 -15
  31. package/dist/devices/sinope.js.map +1 -1
  32. package/dist/devices/third_reality.d.ts.map +1 -1
  33. package/dist/devices/third_reality.js +111 -5
  34. package/dist/devices/third_reality.js.map +1 -1
  35. package/dist/devices/tuya.d.ts.map +1 -1
  36. package/dist/devices/tuya.js +229 -161
  37. package/dist/devices/tuya.js.map +1 -1
  38. package/dist/lib/tuya.d.ts +4 -4
  39. package/dist/lib/tuya.d.ts.map +1 -1
  40. package/dist/lib/tuya.js +28 -15
  41. package/dist/lib/tuya.js.map +1 -1
  42. package/dist/models-index.json +1 -1
  43. package/package.json +2 -2
@@ -2040,58 +2040,67 @@ exports.definitions = [
2040
2040
  timeStart: "1970",
2041
2041
  }),
2042
2042
  ],
2043
- exposes: [
2044
- e.temperature(),
2045
- e.humidity(),
2046
- e.battery(),
2047
- e.enum("temperature_unit", ea.STATE_SET, ["celsius", "fahrenheit"]).withDescription("Temperature unit"),
2048
- e
2049
- .numeric("max_temperature_alarm", ea.STATE_SET)
2050
- .withUnit("°C")
2051
- .withValueMin(-20)
2052
- .withValueMax(60)
2053
- .withDescription("Alarm temperature max"),
2054
- e
2055
- .numeric("min_temperature_alarm", ea.STATE_SET)
2056
- .withUnit("°C")
2057
- .withValueMin(-20)
2058
- .withValueMax(60)
2059
- .withDescription("Alarm temperature min"),
2060
- e.numeric("max_humidity_alarm", ea.STATE_SET).withUnit("%").withValueMin(0).withValueMax(100).withDescription("Alarm humidity max"),
2061
- e.numeric("min_humidity_alarm", ea.STATE_SET).withUnit("%").withValueMin(0).withValueMax(100).withDescription("Alarm humidity min"),
2062
- e.enum("temperature_alarm", ea.STATE, ["lower_alarm", "upper_alarm", "cancel"]).withDescription("Temperature alarm"),
2063
- e.enum("humidity_alarm", ea.STATE, ["lower_alarm", "upper_alarm", "cancel"]).withDescription("Humidity alarm"),
2064
- e
2065
- .numeric("temperature_periodic_report", ea.STATE_SET)
2066
- .withUnit("min")
2067
- .withValueMin(1)
2068
- .withValueMax(120)
2069
- .withDescription("Temp periodic report"),
2070
- e
2071
- .numeric("humidity_periodic_report", ea.STATE_SET)
2072
- .withUnit("min")
2073
- .withValueMin(1)
2074
- .withValueMax(120)
2075
- .withDescription("Humidity periodic report"),
2076
- e
2077
- .numeric("temperature_sensitivity", ea.STATE_SET)
2078
- .withUnit("°C")
2079
- .withValueMin(0.3)
2080
- .withValueMax(1)
2081
- .withValueStep(0.1)
2082
- .withDescription("Sensitivity of temperature"),
2083
- e
2084
- .numeric("humidity_sensitivity", ea.STATE_SET)
2085
- .withUnit("%")
2086
- .withValueMin(3)
2087
- .withValueMax(10)
2088
- .withValueStep(1)
2089
- .withDescription("Sensitivity of humidity"),
2090
- ],
2043
+ exposes: (device, options) => {
2044
+ const exps = [
2045
+ e.temperature(),
2046
+ e.humidity(),
2047
+ e.enum("temperature_unit", ea.STATE_SET, ["celsius", "fahrenheit"]).withDescription("Temperature unit"),
2048
+ e
2049
+ .numeric("max_temperature_alarm", ea.STATE_SET)
2050
+ .withUnit("°C")
2051
+ .withValueMin(-20)
2052
+ .withValueMax(60)
2053
+ .withDescription("Alarm temperature max"),
2054
+ e
2055
+ .numeric("min_temperature_alarm", ea.STATE_SET)
2056
+ .withUnit("°C")
2057
+ .withValueMin(-20)
2058
+ .withValueMax(60)
2059
+ .withDescription("Alarm temperature min"),
2060
+ e.numeric("max_humidity_alarm", ea.STATE_SET).withUnit("%").withValueMin(0).withValueMax(100).withDescription("Alarm humidity max"),
2061
+ e.numeric("min_humidity_alarm", ea.STATE_SET).withUnit("%").withValueMin(0).withValueMax(100).withDescription("Alarm humidity min"),
2062
+ e.enum("temperature_alarm", ea.STATE, ["lower_alarm", "upper_alarm", "cancel"]).withDescription("Temperature alarm"),
2063
+ e.enum("humidity_alarm", ea.STATE, ["lower_alarm", "upper_alarm", "cancel"]).withDescription("Humidity alarm"),
2064
+ e
2065
+ .numeric("temperature_periodic_report", ea.STATE_SET)
2066
+ .withUnit("min")
2067
+ .withValueMin(1)
2068
+ .withValueMax(120)
2069
+ .withDescription("Temp periodic report"),
2070
+ e
2071
+ .numeric("humidity_periodic_report", ea.STATE_SET)
2072
+ .withUnit("min")
2073
+ .withValueMin(1)
2074
+ .withValueMax(120)
2075
+ .withDescription("Humidity periodic report"),
2076
+ e
2077
+ .numeric("temperature_sensitivity", ea.STATE_SET)
2078
+ .withUnit("°C")
2079
+ .withValueMin(0.3)
2080
+ .withValueMax(1)
2081
+ .withValueStep(0.1)
2082
+ .withDescription("Sensitivity of temperature"),
2083
+ e
2084
+ .numeric("humidity_sensitivity", ea.STATE_SET)
2085
+ .withUnit("%")
2086
+ .withValueMin(3)
2087
+ .withValueMax(10)
2088
+ .withValueStep(1)
2089
+ .withDescription("Sensitivity of humidity"),
2090
+ ];
2091
+ if (device && device.manufacturerName === "_TZE284_cwyqwqbf") {
2092
+ exps.push(tuya.exposes.batteryState());
2093
+ }
2094
+ else {
2095
+ exps.push(e.battery());
2096
+ }
2097
+ return exps;
2098
+ },
2091
2099
  meta: {
2092
2100
  tuyaDatapoints: [
2093
2101
  [1, "temperature", tuya.valueConverter.divideBy10],
2094
2102
  [2, "humidity", tuya.valueConverter.raw],
2103
+ [3, "battery_state", tuya.valueConverter.batteryState],
2095
2104
  [4, "battery", tuya.valueConverter.raw],
2096
2105
  [9, "temperature_unit", tuya.valueConverter.temperatureUnitEnum],
2097
2106
  [10, "max_temperature_alarm", tuya.valueConverter.divideBy10],
@@ -2677,6 +2686,7 @@ exports.definitions = [
2677
2686
  ]),
2678
2687
  tuya.whitelabel("MiBoxer", "FUTC11ZR", "Outdoor light", ["_TZB210_zmppwawa"]),
2679
2688
  tuya.whitelabel("TechToy", "_TZ3210_iw0zkcu8", "Smart bulb RGB 9W E27", ["_TZ3210_iw0zkcu8"]),
2689
+ tuya.whitelabel("LUUMR", "10010128", "Smart LED, GU10, 4,7W, RGBW, CCT, Tuya, WLAN, mat", ["_TZ3210_sw9uxoea"]),
2680
2690
  ],
2681
2691
  extend: [
2682
2692
  tuya.modernExtend.tuyaLight({
@@ -2996,6 +3006,7 @@ exports.definitions = [
2996
3006
  "_TZ3000_wmlc9p9z",
2997
3007
  "_TZ3000_shopg9ss",
2998
3008
  "_TZ3000_n0lphcok",
3009
+ "_TZ3000_hgm6k8ku",
2999
3010
  "_TZ3000_r80pzsb9",
3000
3011
  ]),
3001
3012
  ...tuya.fingerprint("TS0001", ["_TZ3000_n0lphcok", "_TZ3000_wn65ixz9"]),
@@ -3595,7 +3606,7 @@ exports.definitions = [
3595
3606
  ],
3596
3607
  },
3597
3608
  {
3598
- fingerprint: tuya.fingerprint("TS0601", ["_TZE204_dcnsggvz"]),
3609
+ fingerprint: tuya.fingerprint("TS0601", ["_TZE204_dcnsggvz", "_TZE200_dcnsggv"]),
3599
3610
  model: "TS0601_dimmer_5",
3600
3611
  vendor: "Tuya",
3601
3612
  description: "1 gang smart dimmer module",
@@ -4806,56 +4817,34 @@ exports.definitions = [
4806
4817
  },
4807
4818
  {
4808
4819
  fingerprint: tuya.fingerprint("TS0601", ["_TZE200_dzuqwsyg", "_TZE204_dzuqwsyg"]),
4809
- model: "BAC-003",
4820
+ model: "BAC-002",
4810
4821
  vendor: "Tuya",
4811
4822
  description: "FCU thermostat temperature controller",
4812
4823
  extend: [tuya.modernExtend.tuyaBase({ dp: true, forceTimeUpdates: true, timeStart: "1970" })],
4813
4824
  options: [
4825
+ e.enum("control_sequence_of_operation", ea.SET, ["cooling_only", "cooling_and_heating_4-pipes"]),
4826
+ e.binary("expose_device_state", ea.SET, true, false),
4827
+ ],
4828
+ exposes: [
4814
4829
  e
4815
- .enum("control_sequence_of_operation", ea.SET, ["cooling_only", "cooling_and_heating_4-pipes"])
4816
- .withDescription("Operating environment of the thermostat"),
4817
- e.binary("expose_device_state", ea.SET, true, false).withDescription("Expose device power state as a separate property when enabled."),
4830
+ .climate()
4831
+ .withLocalTemperature(ea.STATE)
4832
+ .withSystemMode(["off", "cool", "heat", "fan_only"], ea.STATE_SET)
4833
+ .withFanMode(["low", "medium", "high", "auto"], ea.STATE_SET)
4834
+ .withSetpoint("current_heating_setpoint", 5, 35, 1, ea.STATE_SET)
4835
+ .withPreset(["auto", "manual"])
4836
+ .withLocalTemperatureCalibration(-9, 9, 1, ea.STATE_SET),
4837
+ e.child_lock(),
4838
+ e.max_temperature().withValueMin(35).withValueMax(45),
4839
+ e.numeric("deadzone_temperature", ea.STATE_SET).withUnit("°C").withValueMax(5).withValueMin(1),
4840
+ e.text("schedule_text", ea.STATE_SET).withDescription(`Weekly schedule in the format "HH:MM/TT HH:MM/TT ...".
4841
+ Example for 12 segments:
4842
+ "06:00/20 11:30/21 13:30/22 17:30/23 06:00/24 12:00/23 14:30/22 17:30/21 06:00/19 12:30/20 14:30/21 18:30/20".
4843
+ Each segment contains:
4844
+ - HH:MM: Time in 24-hour format.
4845
+ - TT: Temperature in °C.
4846
+ Ensure all 12 segments are defined and separated by spaces.`),
4818
4847
  ],
4819
- exposes: (device, options) => {
4820
- const system_modes = ["off", "cool", "heat", "fan_only"];
4821
- // Device can operate either in 2-pipe or 4-pipe configuration
4822
- // For 2-pipe configurations remove 'heat' mode
4823
- switch (options?.control_sequence_of_operation) {
4824
- case "cooling_only":
4825
- system_modes.splice(2, 1);
4826
- break;
4827
- }
4828
- const exposes = [
4829
- e
4830
- .climate()
4831
- .withLocalTemperature(ea.STATE)
4832
- .withSystemMode(system_modes, ea.STATE_SET)
4833
- .withFanMode(["low", "medium", "high", "auto"], ea.STATE_SET)
4834
- .withSetpoint("current_heating_setpoint", 5, 35, 1, ea.STATE_SET)
4835
- .withPreset(["auto", "manual"])
4836
- .withLocalTemperatureCalibration(-3, 3, 1, ea.STATE_SET),
4837
- e.child_lock(),
4838
- e
4839
- .composite("schedule", "schedule", ea.STATE_SET)
4840
- .withFeature(e.text("weekdays", ea.SET).withDescription('Schedule (1-5), 4 periods in format "hh:mm/tt".'))
4841
- .withFeature(e.text("saturday", ea.SET).withDescription('Schedule (6), 4 periods in format "hh:mm/tt".'))
4842
- .withFeature(e.text("sunday", ea.SET).withDescription('Schedule (7), 4 periods in format "hh:mm/tt".'))
4843
- .withDescription('Auto-mode schedule, 4 periods each per category. Example: "06:00/20 11:30/21 13:30/22 17:30/23.5".'),
4844
- e.max_temperature().withValueMin(35).withValueMax(45).withPreset("default", 35, "Default value"),
4845
- e
4846
- .numeric("deadzone_temperature", ea.STATE_SET)
4847
- .withUnit("°C")
4848
- .withValueMax(5)
4849
- .withValueMin(1)
4850
- .withValueStep(1)
4851
- .withPreset("default", 1, "Default value")
4852
- .withDescription("The delta between local_temperature and current_heating_setpoint to trigger activity"),
4853
- ];
4854
- if (options?.expose_device_state === true) {
4855
- exposes.unshift(e.binary("state", ea.STATE_SET, "ON", "OFF").withDescription("Turn the thermostat ON or OFF"));
4856
- }
4857
- return exposes;
4858
- },
4859
4848
  meta: {
4860
4849
  publishDuplicateTransaction: true,
4861
4850
  tuyaDatapoints: [
@@ -4870,9 +4859,8 @@ exports.definitions = [
4870
4859
  },
4871
4860
  from: (v, meta, options) => {
4872
4861
  meta.state.system_mode = v === true ? (meta.state.system_mode_device ?? "cool") : "off";
4873
- if (options?.expose_device_state === true) {
4862
+ if (options?.expose_device_state === true)
4874
4863
  return v === true ? "ON" : "OFF";
4875
- }
4876
4864
  delete meta.state.state;
4877
4865
  },
4878
4866
  },
@@ -4881,22 +4869,22 @@ exports.definitions = [
4881
4869
  2,
4882
4870
  "system_mode",
4883
4871
  {
4884
- // Extend system_mode to support 'off' in addition to 'cool', 'heat' and 'fan_only'
4885
4872
  to: async (v, meta) => {
4886
- const entity = meta.device.endpoints[0];
4887
- // Power State
4888
- await tuya.sendDataPointBool(entity, 1, v !== "off", "dataRequest", 1);
4889
- switch (v) {
4890
- case "cool":
4891
- await tuya.sendDataPointEnum(entity, 2, 0, "dataRequest", 1);
4892
- break;
4893
- case "heat":
4894
- await tuya.sendDataPointEnum(entity, 2, 1, "dataRequest", 1);
4895
- break;
4896
- case "fan_only":
4897
- await tuya.sendDataPointEnum(entity, 2, 2, "dataRequest", 1);
4898
- break;
4873
+ const ep = meta.device.endpoints[0];
4874
+ if (v === "off") {
4875
+ await tuya.sendDataPointBool(ep, 1, true, "dataRequest", 1);
4876
+ await new Promise((r) => setTimeout(r, 120));
4877
+ await tuya.sendDataPointBool(ep, 1, false, "dataRequest", 1);
4878
+ await tuya.sendDataPointEnum(ep, 2, 0, "dataRequest", 1);
4879
+ return;
4899
4880
  }
4881
+ await tuya.sendDataPointBool(ep, 1, true, "dataRequest", 1);
4882
+ if (v === "cool")
4883
+ await tuya.sendDataPointEnum(ep, 2, 0, "dataRequest", 1);
4884
+ if (v === "heat")
4885
+ await tuya.sendDataPointEnum(ep, 2, 1, "dataRequest", 1);
4886
+ if (v === "fan_only")
4887
+ await tuya.sendDataPointEnum(ep, 2, 2, "dataRequest", 1);
4900
4888
  },
4901
4889
  from: (v, meta) => {
4902
4890
  const modes = ["cool", "heat", "fan_only"];
@@ -4905,7 +4893,21 @@ exports.definitions = [
4905
4893
  },
4906
4894
  },
4907
4895
  ],
4908
- [4, "preset", tuya.valueConverterBasic.lookup({ manual: true, auto: false })],
4896
+ [
4897
+ 4,
4898
+ "preset",
4899
+ {
4900
+ to: async (v, meta) => {
4901
+ const ep = meta.device.endpoints[0];
4902
+ await tuya.sendDataPointBool(ep, 4, v === "manual");
4903
+ },
4904
+ from: (v, meta) => {
4905
+ const preset = v ? "manual" : "auto";
4906
+ meta.state.preset = preset;
4907
+ return preset;
4908
+ },
4909
+ },
4910
+ ],
4909
4911
  [16, "current_heating_setpoint", tuya.valueConverter.raw],
4910
4912
  [19, "max_temperature", tuya.valueConverter.raw],
4911
4913
  [24, "local_temperature", tuya.valueConverter.divideBy10],
@@ -4926,46 +4928,39 @@ exports.definitions = [
4926
4928
  101,
4927
4929
  "schedule",
4928
4930
  {
4929
- to: (v, meta) => {
4930
- const periods = (value) => {
4931
- const regex = /((?<h>[01][0-9]|2[0-3]):(?<m>[0-5][0-9])\/(?<t>[0-3][0-9](\.[0,5]|)))/gm;
4932
- const matches = [...value.matchAll(regex)];
4933
- if (matches.length === 4) {
4934
- return matches.reduce((arr, m) => {
4935
- arr.push(Number.parseInt(m.groups.h, 10));
4936
- arr.push(Number.parseInt(m.groups.m, 10));
4937
- arr.push(Number.parseFloat(m.groups.t) * 2);
4938
- return arr;
4939
- }, []);
4940
- }
4941
- logger_1.logger.warning("Ignoring invalid or incomplete schedule", NS);
4942
- };
4943
- const schedule = [...periods(v.weekdays), ...periods(v.saturday), ...periods(v.sunday)];
4944
- return schedule;
4945
- },
4946
4931
  from: (v, meta) => {
4947
- const format = (data) => {
4948
- return data.reduce((a, v, i) => {
4949
- switch (i % 3) {
4950
- // Hour
4951
- case 0:
4952
- return `${a}${i > 0 ? " " : ""}${v.toString().padStart(2, "0")}`;
4953
- // Minute
4954
- case 1:
4955
- return `${a}:${v.toString().padStart(2, "0")}`;
4956
- // Setpoint
4957
- case 2:
4958
- return `${a}/${v / 2}`;
4959
- default:
4960
- throw new Error(`Unexpected index ${i} in schedule data`);
4961
- }
4962
- }, "");
4963
- };
4964
- return {
4965
- weekdays: format(v.slice(0, 12)),
4966
- saturday: format(v.slice(1 * 12, 2 * 12)),
4967
- sunday: format(v.slice(2 * 12, 3 * 12)),
4968
- };
4932
+ const format = (data) => data.reduce((txt, val, i) => {
4933
+ if (i % 3 === 0)
4934
+ return `${txt}${i > 0 ? " " : ""}${val.toString().padStart(2, "0")}`;
4935
+ if (i % 3 === 1)
4936
+ return `${txt}:${val.toString().padStart(2, "0")}`;
4937
+ return `${txt}/${val / 2}`;
4938
+ }, "");
4939
+ const weekdays = format(v.slice(0, 12));
4940
+ const saturday = format(v.slice(12, 24));
4941
+ const sunday = format(v.slice(24, 36));
4942
+ const full = `${weekdays} ${saturday} ${sunday}`.trim();
4943
+ meta.state.schedule_text = full;
4944
+ return full;
4945
+ },
4946
+ },
4947
+ ],
4948
+ [
4949
+ 202,
4950
+ "schedule_text",
4951
+ {
4952
+ to: async (v, meta) => {
4953
+ const regex = /((?<h>[01][0-9]|2[0-3]):(?<m>[0-5][0-9])\/(?<t>[0-3]?[0-9](\.[0,5])?))/gm;
4954
+ const matches = [...v.matchAll(regex)];
4955
+ if (matches.length !== 12)
4956
+ return;
4957
+ const result = [];
4958
+ for (const m of matches) {
4959
+ result.push(Number(m.groups?.h));
4960
+ result.push(Number(m.groups?.m));
4961
+ result.push(Number(m.groups?.t) * 2);
4962
+ }
4963
+ await tuya.sendDataPointRaw(meta.device.endpoints[0], 101, Buffer.from(result));
4969
4964
  },
4970
4965
  },
4971
4966
  ],
@@ -5362,17 +5357,17 @@ exports.definitions = [
5362
5357
  vendor: "Tuya",
5363
5358
  description: "3-Gang switch with backlight",
5364
5359
  extend: [
5360
+ tuya.modernExtend.tuyaMagicPacket(),
5361
+ m.deviceEndpoints({ endpoints: { l1: 1, l2: 2, l3: 3 } }),
5365
5362
  tuya.modernExtend.tuyaOnOff({
5366
- powerOnBehavior2: true,
5367
- indicatorMode: true,
5363
+ powerOnBehavior2: (m) => m !== "_TZ3000_nwidmc4n",
5364
+ indicatorMode: (m) => m !== "_TZ3000_nwidmc4n",
5368
5365
  backlightModeOffOn: true,
5369
5366
  endpoints: ["l1", "l2", "l3"],
5367
+ powerOutageMemory: (m) => m === "_TZ3000_nwidmc4n",
5368
+ switchType: (m) => m === "_TZ3000_nwidmc4n",
5370
5369
  }),
5371
5370
  ],
5372
- endpoint: (device) => {
5373
- return { l1: 1, l2: 2, l3: 3 };
5374
- },
5375
- meta: { multiEndpoint: true },
5376
5371
  configure: async (device, coordinatorEndpoint) => {
5377
5372
  await tuya.configureMagicPacket(device, coordinatorEndpoint);
5378
5373
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ["genOnOff"]);
@@ -5384,6 +5379,7 @@ exports.definitions = [
5384
5379
  tuya.whitelabel("Zemismart", "ZM-L03E-Z", "3 gang switch with neutral", ["_TZ3000_empogkya", "_TZ3000_lsunm46z"]),
5385
5380
  tuya.whitelabel("Zemismart", "KES-606US-L3", "3 gang switch with neutral", ["_TZ3000_uilitwsy"]),
5386
5381
  tuya.whitelabel("AVATTO", "ZWOT16-W2", "2 gang switch and 1 socket", ["_TZ3000_66fekqhh"]),
5382
+ tuya.whitelabel("AVATTO", "ZBTS60-03", "3 gang switch module with backlight", ["_TZ3000_nwidmc4n"]),
5387
5383
  tuya.whitelabel("Tuya", "M10Z", "2 gang switch with 20A power socket", ["_TZ3000_lubfc1t5"]),
5388
5384
  tuya.whitelabel("Zemismart", "ZMO-606-S2", "Smart 2 gangs switch with outlet", ["_TZ3000_aknpkt02"]),
5389
5385
  ],
@@ -5578,8 +5574,18 @@ exports.definitions = [
5578
5574
  { vendor: "OXT", model: "SWTZ21" },
5579
5575
  { vendor: "Moes", model: "ZM-104-M" },
5580
5576
  tuya.whitelabel("AVATTO", "ZWSM16-1-Zigbee", "1 gang switch module", ["_TZ3000_4rbqgcuv"]),
5577
+ tuya.whitelabel("AVATTO", "ZBTS60-01", "1 gang switch module with backlight", ["_TZ3000_xfxpoxe0"]),
5578
+ ],
5579
+ extend: [
5580
+ tuya.modernExtend.tuyaMagicPacket(),
5581
+ tuya.modernExtend.tuyaOnOff({
5582
+ switchType: true,
5583
+ onOffCountdown: (m) => m !== "_TZ3000_xfxpoxe0",
5584
+ indicatorMode: (m) => m !== "_TZ3000_xfxpoxe0",
5585
+ powerOutageMemory: (m) => m === "_TZ3000_xfxpoxe0",
5586
+ backlightModeOffOn: (m) => m === "_TZ3000_xfxpoxe0",
5587
+ }),
5581
5588
  ],
5582
- extend: [tuya.modernExtend.tuyaOnOff({ switchType: true, onOffCountdown: true, indicatorMode: true })],
5583
5589
  configure: async (device, coordinatorEndpoint) => {
5584
5590
  await tuya.configureMagicPacket(device, coordinatorEndpoint);
5585
5591
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ["genOnOff"]);
@@ -6496,6 +6502,7 @@ exports.definitions = [
6496
6502
  "_TZE204_ejh6owwz",
6497
6503
  "_TZE200_ba69l9ol",
6498
6504
  "_TZE200_68nvbi09",
6505
+ "_TZE200_vexa5o82",
6499
6506
  ]),
6500
6507
  model: "TS0601_cover_3",
6501
6508
  vendor: "Tuya",
@@ -6515,6 +6522,7 @@ exports.definitions = [
6515
6522
  tuya.whitelabel("Zemismart", "ZM25EL", "Cover motor", ["_TZE200_pw7mji0l"]),
6516
6523
  tuya.whitelabel("Zemismart", "ZM85EL-2Z", "Roman Rod I type U curtains track", ["_TZE200_cf1sl3tj", "_TZE200_nw1r9hp6"]),
6517
6524
  tuya.whitelabel("Hiladuo", "B09M3R35GC", "Motorized roller shade", ["_TZE200_9p5xmj5r"]),
6525
+ tuya.whitelabel("Tuya", "MYQ-RM25-1.3/25-BZ", "Tubular roller blind motor", ["_TZE200_vexa5o82"]),
6518
6526
  ],
6519
6527
  meta: {
6520
6528
  // All datapoints go in here
@@ -9161,22 +9169,22 @@ exports.definitions = [
9161
9169
  vendor: "Tuya",
9162
9170
  description: "Smart light switch - 4 gang with neutral wire",
9163
9171
  extend: [
9172
+ m.deviceEndpoints({ endpoints: { l1: 1, l2: 2, l3: 3, l4: 4 } }),
9164
9173
  tuya.modernExtend.tuyaOnOff({
9165
- powerOnBehavior2: true,
9174
+ powerOnBehavior2: (m) => m !== "_TZ3000_r9e2w7dn",
9166
9175
  backlightModeOffOn: true,
9167
9176
  endpoints: ["l1", "l2", "l3", "l4"],
9177
+ powerOutageMemory: (m) => m === "_TZ3000_r9e2w7dn",
9178
+ switchType: (m) => m === "_TZ3000_r9e2w7dn",
9168
9179
  }),
9169
9180
  ],
9170
- endpoint: (device) => {
9171
- return { l1: 1, l2: 2, l3: 3, l4: 4 };
9172
- },
9173
9181
  whiteLabel: [
9174
9182
  tuya.whitelabel("Tuya", "DS-111", "Smart light switch - 4 gang with neutral wire", ["_TZ3000_mdj7kra9"]),
9175
9183
  tuya.whitelabel("MHCOZY", "TYWB 4ch-RF", "4 channel relay", ["_TZ3000_u3oupgdy", "_TZ3000_imaccztn"]),
9176
9184
  tuya.whitelabel("AVATTO", "TS0004_1", "Smart light switch - 4 gang with neutral wire", ["_TZ3000_nivavasg", "_TZ3000_gexniqbq"]),
9177
9185
  tuya.whitelabel("Nova Digital", "SA-4", "Safira smart light switch - 4 gang", ["_TZ3000_iymfxdis"]),
9186
+ tuya.whitelabel("AVATTO", "ZBTS60-04", "4 gang switch module with backlight", ["_TZ3000_r9e2w7dn"]),
9178
9187
  ],
9179
- meta: { multiEndpoint: true },
9180
9188
  configure: async (device, coordinatorEndpoint) => {
9181
9189
  await tuya.configureMagicPacket(device, coordinatorEndpoint);
9182
9190
  await reporting.bind(device.getEndpoint(1), coordinatorEndpoint, ["genOnOff"]);
@@ -21932,5 +21940,65 @@ exports.definitions = [
21932
21940
  ],
21933
21941
  },
21934
21942
  },
21943
+ {
21944
+ fingerprint: [{ modelID: "Arteco", manufacturerName: "A89G12C" }],
21945
+ model: "ZS-SF00",
21946
+ vendor: "Arteco",
21947
+ description: "Soil fertility sensor",
21948
+ extend: [tuya.modernExtend.tuyaBase({ dp: true })],
21949
+ exposes: [
21950
+ e.enum("water_warning", ea.STATE, ["none", "alarm"]).withDescription("Water shortage warning"),
21951
+ e.enum("soil_fertility_warning", ea.STATE, ["none", "alarm"]).withDescription("Soil fertility warning"),
21952
+ e.battery(),
21953
+ e.soil_moisture(),
21954
+ e
21955
+ .numeric("soil_fertility", ea.STATE)
21956
+ .withUnit("μS/cm")
21957
+ .withValueMin(0)
21958
+ .withValueMax(5000)
21959
+ .withDescription("Soil fertility value,between 0-5000"),
21960
+ e.temperature(),
21961
+ e.humidity(),
21962
+ e.illuminance(),
21963
+ tuya.exposes.soilSampling(),
21964
+ tuya.exposes.soilCalibration(),
21965
+ tuya.exposes.humidityCalibration(),
21966
+ e
21967
+ .numeric("illuminance_calibration", ea.STATE_SET)
21968
+ .withValueMin(-15)
21969
+ .withValueMax(1000)
21970
+ .withValueStep(1)
21971
+ .withUnit("lux")
21972
+ .withDescription("Illuminance calibration"),
21973
+ tuya.exposes.temperatureCalibration(),
21974
+ tuya.exposes.soilWarning(),
21975
+ e
21976
+ .numeric("soil_fertility_warning_setting", ea.STATE_SET)
21977
+ .withValueMin(100)
21978
+ .withValueMax(1800)
21979
+ .withValueStep(1)
21980
+ .withUnit("μS/cm")
21981
+ .withDescription("When the soil fertility value is lower than what threshold should a warning be issued"),
21982
+ ],
21983
+ meta: {
21984
+ tuyaDatapoints: [
21985
+ [3, "soil_moisture", tuya.valueConverter.raw],
21986
+ [5, "temperature", tuya.valueConverter.divideBy10],
21987
+ [14, "battery", tuya.valueConverter.raw],
21988
+ [101, "humidity", tuya.valueConverter.raw],
21989
+ [102, "illuminance", tuya.valueConverter.raw],
21990
+ [103, "soil_sampling", tuya.valueConverter.raw],
21991
+ [104, "soil_calibration", tuya.valueConverter.raw],
21992
+ [105, "humidity_calibration", tuya.valueConverter.raw],
21993
+ [106, "illuminance_calibration", tuya.valueConverter.raw],
21994
+ [107, "temperature_calibration", tuya.valueConverter.divideBy10],
21995
+ [110, "soil_warning", tuya.valueConverter.raw],
21996
+ [111, "water_warning", tuya.valueConverterBasic.lookup({ none: tuya.enum(0), alarm: tuya.enum(1) })],
21997
+ [112, "soil_fertility", tuya.valueConverter.raw],
21998
+ [114, "soil_fertility_warning_setting", tuya.valueConverter.raw],
21999
+ [115, "soil_fertility_warning", tuya.valueConverterBasic.lookup({ none: tuya.enum(0), alarm: tuya.enum(1) })],
22000
+ ],
22001
+ },
22002
+ },
21935
22003
  ];
21936
22004
  //# sourceMappingURL=tuya.js.map