zigbee-herdsman-converters 23.2.0 → 23.4.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 (233) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/dist/converters/fromZigbee.d.ts.map +1 -1
  3. package/dist/converters/fromZigbee.js +53 -11
  4. package/dist/converters/fromZigbee.js.map +1 -1
  5. package/dist/converters/toZigbee.d.ts.map +1 -1
  6. package/dist/converters/toZigbee.js +82 -8
  7. package/dist/converters/toZigbee.js.map +1 -1
  8. package/dist/devices/ITCommander.d.ts.map +1 -1
  9. package/dist/devices/ITCommander.js +1 -0
  10. package/dist/devices/ITCommander.js.map +1 -1
  11. package/dist/devices/adeo.d.ts.map +1 -1
  12. package/dist/devices/adeo.js +1 -0
  13. package/dist/devices/adeo.js.map +1 -1
  14. package/dist/devices/atlantic.d.ts.map +1 -1
  15. package/dist/devices/atlantic.js +2 -0
  16. package/dist/devices/atlantic.js.map +1 -1
  17. package/dist/devices/avatto.js +6 -6
  18. package/dist/devices/avatto.js.map +1 -1
  19. package/dist/devices/bosch.d.ts.map +1 -1
  20. package/dist/devices/bosch.js +2 -0
  21. package/dist/devices/bosch.js.map +1 -1
  22. package/dist/devices/brun_holding.d.ts +3 -0
  23. package/dist/devices/brun_holding.d.ts.map +1 -0
  24. package/dist/devices/brun_holding.js +59 -0
  25. package/dist/devices/brun_holding.js.map +1 -0
  26. package/dist/devices/busch_jaeger.js +1 -1
  27. package/dist/devices/busch_jaeger.js.map +1 -1
  28. package/dist/devices/custom_devices_diy.d.ts.map +1 -1
  29. package/dist/devices/custom_devices_diy.js +18 -13
  30. package/dist/devices/custom_devices_diy.js.map +1 -1
  31. package/dist/devices/develco.js +1 -1
  32. package/dist/devices/develco.js.map +1 -1
  33. package/dist/devices/diyruz.d.ts.map +1 -1
  34. package/dist/devices/diyruz.js +2 -0
  35. package/dist/devices/diyruz.js.map +1 -1
  36. package/dist/devices/dresden_elektronik.js +1 -1
  37. package/dist/devices/dresden_elektronik.js.map +1 -1
  38. package/dist/devices/essentials.js +3 -3
  39. package/dist/devices/essentials.js.map +1 -1
  40. package/dist/devices/eurotronic.d.ts.map +1 -1
  41. package/dist/devices/eurotronic.js +4 -1
  42. package/dist/devices/eurotronic.js.map +1 -1
  43. package/dist/devices/ewelink.d.ts.map +1 -1
  44. package/dist/devices/ewelink.js +15 -37
  45. package/dist/devices/ewelink.js.map +1 -1
  46. package/dist/devices/gledopto.d.ts.map +1 -1
  47. package/dist/devices/gledopto.js +2 -1
  48. package/dist/devices/gledopto.js.map +1 -1
  49. package/dist/devices/gmmts.d.ts.map +1 -1
  50. package/dist/devices/gmmts.js +7 -0
  51. package/dist/devices/gmmts.js.map +1 -1
  52. package/dist/devices/hive.js +1 -1
  53. package/dist/devices/hive.js.map +1 -1
  54. package/dist/devices/ikea.js +1 -1
  55. package/dist/devices/ikea.js.map +1 -1
  56. package/dist/devices/index.d.ts.map +1 -1
  57. package/dist/devices/index.js +4 -0
  58. package/dist/devices/index.js.map +1 -1
  59. package/dist/devices/inovelli.d.ts.map +1 -1
  60. package/dist/devices/inovelli.js +70 -36
  61. package/dist/devices/inovelli.js.map +1 -1
  62. package/dist/devices/insta.js +1 -1
  63. package/dist/devices/insta.js.map +1 -1
  64. package/dist/devices/keen_home.d.ts.map +1 -1
  65. package/dist/devices/keen_home.js +2 -4
  66. package/dist/devices/keen_home.js.map +1 -1
  67. package/dist/devices/lidl.d.ts.map +1 -1
  68. package/dist/devices/lidl.js +5 -2
  69. package/dist/devices/lidl.js.map +1 -1
  70. package/dist/devices/lifecontrol.js +1 -1
  71. package/dist/devices/lifecontrol.js.map +1 -1
  72. package/dist/devices/linptech.d.ts.map +1 -1
  73. package/dist/devices/linptech.js +1 -0
  74. package/dist/devices/linptech.js.map +1 -1
  75. package/dist/devices/lixee.d.ts.map +1 -1
  76. package/dist/devices/lixee.js +69 -49
  77. package/dist/devices/lixee.js.map +1 -1
  78. package/dist/devices/lumi.d.ts.map +1 -1
  79. package/dist/devices/lumi.js +23 -102
  80. package/dist/devices/lumi.js.map +1 -1
  81. package/dist/devices/moes.js +3 -3
  82. package/dist/devices/moes.js.map +1 -1
  83. package/dist/devices/muller_licht.d.ts.map +1 -1
  84. package/dist/devices/muller_licht.js +1 -5
  85. package/dist/devices/muller_licht.js.map +1 -1
  86. package/dist/devices/multiterm.d.ts.map +1 -1
  87. package/dist/devices/multiterm.js +1 -0
  88. package/dist/devices/multiterm.js.map +1 -1
  89. package/dist/devices/namron.js +2 -2
  90. package/dist/devices/namron.js.map +1 -1
  91. package/dist/devices/nue_3a.d.ts.map +1 -1
  92. package/dist/devices/nue_3a.js +2 -0
  93. package/dist/devices/nue_3a.js.map +1 -1
  94. package/dist/devices/orvibo.d.ts.map +1 -1
  95. package/dist/devices/orvibo.js +3 -0
  96. package/dist/devices/orvibo.js.map +1 -1
  97. package/dist/devices/osram.js +2 -2
  98. package/dist/devices/osram.js.map +1 -1
  99. package/dist/devices/owon.d.ts.map +1 -1
  100. package/dist/devices/owon.js +2 -0
  101. package/dist/devices/owon.js.map +1 -1
  102. package/dist/devices/paulmann.d.ts.map +1 -1
  103. package/dist/devices/paulmann.js +7 -0
  104. package/dist/devices/paulmann.js.map +1 -1
  105. package/dist/devices/philips.d.ts.map +1 -1
  106. package/dist/devices/philips.js +7 -0
  107. package/dist/devices/philips.js.map +1 -1
  108. package/dist/devices/rgb_genie.d.ts.map +1 -1
  109. package/dist/devices/rgb_genie.js +2 -0
  110. package/dist/devices/rgb_genie.js.map +1 -1
  111. package/dist/devices/samotech.d.ts.map +1 -1
  112. package/dist/devices/samotech.js +2 -1
  113. package/dist/devices/samotech.js.map +1 -1
  114. package/dist/devices/schneider_electric.d.ts.map +1 -1
  115. package/dist/devices/schneider_electric.js +8 -4
  116. package/dist/devices/schneider_electric.js.map +1 -1
  117. package/dist/devices/shinasystem.d.ts.map +1 -1
  118. package/dist/devices/shinasystem.js +3 -0
  119. package/dist/devices/shinasystem.js.map +1 -1
  120. package/dist/devices/sinope.d.ts.map +1 -1
  121. package/dist/devices/sinope.js +3 -0
  122. package/dist/devices/sinope.js.map +1 -1
  123. package/dist/devices/somfy.d.ts.map +1 -1
  124. package/dist/devices/somfy.js +13 -1
  125. package/dist/devices/somfy.js.map +1 -1
  126. package/dist/devices/sonoff.d.ts.map +1 -1
  127. package/dist/devices/sonoff.js +21 -4
  128. package/dist/devices/sonoff.js.map +1 -1
  129. package/dist/devices/sunricher.d.ts.map +1 -1
  130. package/dist/devices/sunricher.js +17 -743
  131. package/dist/devices/sunricher.js.map +1 -1
  132. package/dist/devices/third_reality.d.ts.map +1 -1
  133. package/dist/devices/third_reality.js +1 -4
  134. package/dist/devices/third_reality.js.map +1 -1
  135. package/dist/devices/tuya.d.ts.map +1 -1
  136. package/dist/devices/tuya.js +45 -22
  137. package/dist/devices/tuya.js.map +1 -1
  138. package/dist/devices/ubisys.d.ts.map +1 -1
  139. package/dist/devices/ubisys.js +6 -1
  140. package/dist/devices/ubisys.js.map +1 -1
  141. package/dist/devices/wmun.d.ts +3 -0
  142. package/dist/devices/wmun.d.ts.map +1 -0
  143. package/dist/devices/wmun.js +61 -0
  144. package/dist/devices/wmun.js.map +1 -0
  145. package/dist/devices/xyzroe.d.ts.map +1 -1
  146. package/dist/devices/xyzroe.js +10 -0
  147. package/dist/devices/xyzroe.js.map +1 -1
  148. package/dist/devices/yale.js +1 -1
  149. package/dist/devices/yale.js.map +1 -1
  150. package/dist/devices/yandex.js +1 -1
  151. package/dist/devices/yandex.js.map +1 -1
  152. package/dist/devices/yokis.d.ts.map +1 -1
  153. package/dist/devices/yokis.js +74 -37
  154. package/dist/devices/yokis.js.map +1 -1
  155. package/dist/devices/ysrsai.js +1 -1
  156. package/dist/devices/ysrsai.js.map +1 -1
  157. package/dist/index.d.ts +1 -0
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +8 -1
  160. package/dist/index.js.map +1 -1
  161. package/dist/indexer.d.ts.map +1 -1
  162. package/dist/indexer.js +1 -0
  163. package/dist/indexer.js.map +1 -1
  164. package/dist/lib/color.d.ts.map +1 -1
  165. package/dist/lib/color.js +9 -1
  166. package/dist/lib/color.js.map +1 -1
  167. package/dist/lib/configureKey.js +9 -0
  168. package/dist/lib/configureKey.js.map +1 -1
  169. package/dist/lib/constants.d.ts +3 -1
  170. package/dist/lib/constants.d.ts.map +1 -1
  171. package/dist/lib/develco.d.ts.map +1 -1
  172. package/dist/lib/develco.js +1 -0
  173. package/dist/lib/develco.js.map +1 -1
  174. package/dist/lib/ewelink.d.ts.map +1 -1
  175. package/dist/lib/ewelink.js +10 -7
  176. package/dist/lib/ewelink.js.map +1 -1
  177. package/dist/lib/exposes.d.ts +17 -17
  178. package/dist/lib/exposes.d.ts.map +1 -1
  179. package/dist/lib/exposes.js +50 -30
  180. package/dist/lib/exposes.js.map +1 -1
  181. package/dist/lib/generateDefinition.d.ts.map +1 -1
  182. package/dist/lib/generateDefinition.js +2 -1
  183. package/dist/lib/generateDefinition.js.map +1 -1
  184. package/dist/lib/ikea.d.ts.map +1 -1
  185. package/dist/lib/ikea.js +8 -0
  186. package/dist/lib/ikea.js.map +1 -1
  187. package/dist/lib/ledvance.d.ts.map +1 -1
  188. package/dist/lib/ledvance.js +2 -0
  189. package/dist/lib/ledvance.js.map +1 -1
  190. package/dist/lib/legacy.d.ts +4 -4
  191. package/dist/lib/legacy.d.ts.map +1 -1
  192. package/dist/lib/legacy.js +180 -4
  193. package/dist/lib/legacy.js.map +1 -1
  194. package/dist/lib/light.d.ts.map +1 -1
  195. package/dist/lib/light.js +2 -0
  196. package/dist/lib/light.js.map +1 -1
  197. package/dist/lib/lumi.d.ts +43 -3
  198. package/dist/lib/lumi.d.ts.map +1 -1
  199. package/dist/lib/lumi.js +56 -4
  200. package/dist/lib/lumi.js.map +1 -1
  201. package/dist/lib/modernExtend.d.ts +7 -6
  202. package/dist/lib/modernExtend.d.ts.map +1 -1
  203. package/dist/lib/modernExtend.js +78 -3
  204. package/dist/lib/modernExtend.js.map +1 -1
  205. package/dist/lib/nodon.d.ts.map +1 -1
  206. package/dist/lib/ota.d.ts.map +1 -1
  207. package/dist/lib/ota.js +10 -1
  208. package/dist/lib/ota.js.map +1 -1
  209. package/dist/lib/philips.d.ts +1 -1
  210. package/dist/lib/philips.d.ts.map +1 -1
  211. package/dist/lib/philips.js +20 -1
  212. package/dist/lib/philips.js.map +1 -1
  213. package/dist/lib/reporting.d.ts.map +1 -1
  214. package/dist/lib/reporting.js +0 -1
  215. package/dist/lib/reporting.js.map +1 -1
  216. package/dist/lib/sunricher.d.ts +17 -3
  217. package/dist/lib/sunricher.d.ts.map +1 -1
  218. package/dist/lib/sunricher.js +771 -1
  219. package/dist/lib/sunricher.js.map +1 -1
  220. package/dist/lib/tuya.d.ts +5 -5
  221. package/dist/lib/tuya.d.ts.map +1 -1
  222. package/dist/lib/tuya.js +21 -6
  223. package/dist/lib/tuya.js.map +1 -1
  224. package/dist/lib/types.d.ts +3 -3
  225. package/dist/lib/types.d.ts.map +1 -1
  226. package/dist/lib/types.js +0 -1
  227. package/dist/lib/types.js.map +1 -1
  228. package/dist/lib/utils.d.ts +1 -1
  229. package/dist/lib/utils.d.ts.map +1 -1
  230. package/dist/lib/utils.js +17 -5
  231. package/dist/lib/utils.js.map +1 -1
  232. package/dist/models-index.json +1 -1
  233. package/package.json +6 -6
@@ -1,5 +1,4 @@
1
1
  "use strict";
2
- /* eslint-disable @typescript-eslint/no-explicit-any */
3
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
3
  if (k2 === undefined) k2 = k;
5
4
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -54,6 +53,7 @@ const dataTypes = {
54
53
  enum: 4, // [ 0-255 ]
55
54
  bitmap: 5, // [ 1,2,4 bytes ] as bits
56
55
  };
56
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
57
57
  const convertMultiByteNumberPayloadToSingleDecimalNumber = (chunks) => {
58
58
  // Destructuring "chunks" is needed because it's a Buffer
59
59
  // and we need a simple array.
@@ -64,6 +64,7 @@ const convertMultiByteNumberPayloadToSingleDecimalNumber = (chunks) => {
64
64
  }
65
65
  return value;
66
66
  };
67
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
67
68
  function getDataValue(dpValue) {
68
69
  let dataString = "";
69
70
  switch (dpValue.datatype) {
@@ -85,20 +86,24 @@ function getDataValue(dpValue) {
85
86
  return convertMultiByteNumberPayloadToSingleDecimalNumber(dpValue.data);
86
87
  }
87
88
  }
89
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
88
90
  function getTypeName(dpValue) {
89
91
  const entry = Object.entries(dataTypes).find(([typeName, typeId]) => typeId === dpValue.datatype);
90
92
  return entry ? entry[0] : "unknown";
91
93
  }
94
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
92
95
  function logUnexpectedDataPoint(where, msg, dpValue, meta) {
93
96
  logger_1.logger.debug(`Received unexpected Tuya DataPoint #${dpValue.dp} from ${meta.device.ieeeAddr} with raw data '${JSON.stringify(dpValue)}': \
94
97
  type='${msg.type}', datatype='${getTypeName(dpValue)}', value='${getDataValue(dpValue)}', known DP# usage: \
95
98
  ${JSON.stringify(getDataPointNames(dpValue))}`, `zhc:${where}`);
96
99
  }
100
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
97
101
  function logUnexpectedDataType(where, msg, dpValue, meta, expectedDataType) {
98
102
  logger_1.logger.debug(`Received Tuya DataPoint #${dpValue.dp} with unexpected datatype from ${meta.device.ieeeAddr} with raw data \
99
103
  '${JSON.stringify(dpValue)}': type='${msg.type}', datatype='${getTypeName(dpValue)}' (instead of '${expectedDataType}'), \
100
104
  value='${getDataValue(dpValue)}', known DP# usage: ${JSON.stringify(getDataPointNames(dpValue))}`, `zhc:${where}`);
101
105
  }
106
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
102
107
  function getDataPointNames(dpValue) {
103
108
  const entries = Object.entries(dataPoints).filter(([dpName, dpId]) => dpId === dpValue.dp);
104
109
  return entries.map(([dpName, dpId]) => dpName);
@@ -107,9 +112,13 @@ const coverStateOverride = {
107
112
  // Contains all covers which differentiate from the default enum states
108
113
  // Use manufacturerName to identify device!
109
114
  // https://github.com/Koenkk/zigbee2mqtt/issues/5596#issuecomment-759408189
115
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
110
116
  _TZE200_rddyvrci: { close: 1, open: 2, stop: 0 },
117
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
111
118
  _TZE200_wmcdj3aq: { close: 0, open: 2, stop: 1 },
119
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
112
120
  _TZE200_cowvfni3: { close: 0, open: 2, stop: 1 },
121
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
113
122
  _TYST11_cowvfni3: { close: 0, open: 2, stop: 1 },
114
123
  };
115
124
  // Gets an array containing which enums have to be used in order for the correct close/open/stop commands to be sent
@@ -128,6 +137,7 @@ function convertDecimalValueTo4ByteHexArray(value) {
128
137
  return [chunk1, chunk2, chunk3, chunk4].map((hexVal) => Number.parseInt(hexVal, 16));
129
138
  }
130
139
  let gSec = undefined;
140
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
131
141
  async function sendDataPoints(entity, dpValues, cmd = "dataRequest", seq = undefined) {
132
142
  if (seq === undefined) {
133
143
  if (gSec === undefined) {
@@ -137,6 +147,7 @@ async function sendDataPoints(entity, dpValues, cmd = "dataRequest", seq = undef
137
147
  gSec++;
138
148
  gSec %= 0xffff;
139
149
  }
150
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
140
151
  seq = gSec;
141
152
  }
142
153
  await entity.command("manuSpecificTuya", cmd || "dataRequest", {
@@ -164,16 +175,20 @@ function dpValueFromEnum(dp, value) {
164
175
  function dpValueFromStringBuffer(dp, stringBuffer) {
165
176
  return { dp, datatype: dataTypes.string, data: stringBuffer };
166
177
  }
178
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
167
179
  function dpValueFromRaw(dp, rawBuffer) {
168
180
  return { dp, datatype: dataTypes.raw, data: rawBuffer };
169
181
  }
182
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
170
183
  function dpValueFromBitmap(dp, bitmapBuffer) {
171
184
  return { dp, datatype: dataTypes.bitmap, data: bitmapBuffer };
172
185
  }
173
186
  // Return `seq` - transaction ID for handling concrete response
187
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
174
188
  async function sendDataPoint(entity, dpValue, cmd, seq = undefined) {
175
189
  return await sendDataPoints(entity, [dpValue], cmd, seq);
176
190
  }
191
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
177
192
  async function sendDataPointValue(entity, dp, value, cmd, seq = undefined) {
178
193
  return await sendDataPoints(entity, [dpValueFromIntValue(dp, value)], cmd, seq);
179
194
  }
@@ -183,15 +198,19 @@ async function sendDataPointBool(entity, dp, value, cmd, seq = undefined) {
183
198
  async function sendDataPointEnum(entity, dp, value, cmd, seq = undefined) {
184
199
  return await sendDataPoints(entity, [dpValueFromEnum(dp, value)], cmd, seq);
185
200
  }
201
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
186
202
  async function sendDataPointRaw(entity, dp, value, cmd, seq = undefined) {
187
203
  return await sendDataPoints(entity, [dpValueFromRaw(dp, value)], cmd, seq);
188
204
  }
205
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
189
206
  async function sendDataPointBitmap(entity, dp, value, cmd, seq = undefined) {
190
207
  return await sendDataPoints(entity, [dpValueFromBitmap(dp, value)], cmd, seq);
191
208
  }
209
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
192
210
  async function sendDataPointStringBuffer(entity, dp, value, cmd, seq = undefined) {
193
211
  return await sendDataPoints(entity, [dpValueFromStringBuffer(dp, value)], cmd, seq);
194
212
  }
213
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
195
214
  function convertRawToCycleTimer(value) {
196
215
  let timernr = 0;
197
216
  let starttime = "00:00";
@@ -216,6 +235,7 @@ function convertRawToCycleTimer(value) {
216
235
  else {
217
236
  weekdays = "once";
218
237
  }
238
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
219
239
  let minsincemidnight = value[4] * 256 + value[5];
220
240
  // @ts-expect-error ignore
221
241
  starttime = `${String(Number.parseInt(minsincemidnight / 60)).padStart(2, "0")}:${String(minsincemidnight % 60).padStart(2, "0")}`;
@@ -235,6 +255,7 @@ function convertRawToCycleTimer(value) {
235
255
  active: timeractive,
236
256
  };
237
257
  }
258
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
238
259
  function logDataPoint(where, msg, dpValue, meta) {
239
260
  logger_1.logger.info(`Received Tuya DataPoint #${dpValue.dp} from ${meta.device.ieeeAddr} with raw data '${JSON.stringify(dpValue)}': \
240
261
  type='${msg.type}', datatype='${getTypeName(dpValue)}', value='${getDataValue(dpValue)}', known DP# usage: \
@@ -432,6 +453,7 @@ function convertWeekdaysTo1ByteHexArray(weekdays) {
432
453
  }
433
454
  return [nr];
434
455
  }
456
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
435
457
  function convertRawToTimer(value) {
436
458
  let timernr = 0;
437
459
  let starttime = "00:00";
@@ -461,7 +483,15 @@ function convertRawToTimer(value) {
461
483
  }
462
484
  return { timernr: timernr, time: starttime, duration: duration, weekdays: weekdays, active: timeractive };
463
485
  }
464
- function logUnexpectedDataValue(where, msg, dpValue, meta, valueKind, expectedMinValue = null, expectedMaxValue = null) {
486
+ function logUnexpectedDataValue(where, msg,
487
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
488
+ dpValue, meta,
489
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
490
+ valueKind,
491
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
492
+ expectedMinValue = null,
493
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
494
+ expectedMaxValue = null) {
465
495
  if (expectedMinValue === null) {
466
496
  if (expectedMaxValue === null) {
467
497
  logger_1.logger.debug(`Received Tuya DataPoint #${dpValue.dp} with invalid value ${getDataValue(dpValue)} for ${valueKind} \
@@ -502,6 +532,7 @@ function isCoverInverted(manufacturerName) {
502
532
  // Return false by default, not inverted
503
533
  return coverPositionInvert.includes(manufacturerName);
504
534
  }
535
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
505
536
  function convertDecimalValueTo2ByteHexArray(value) {
506
537
  const hexValue = Number(value).toString(16).padStart(4, "0");
507
538
  const chunk1 = hexValue.substr(0, 2);
@@ -597,6 +628,7 @@ const dataPoints = {
597
628
  moesSboostHeating: 4,
598
629
  moesSboostHeatingCountdown: 5,
599
630
  moesSreset: 7,
631
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
600
632
  moesSwindowDetectionFunktion_A2: 8,
601
633
  moesSwindowDetection: 9,
602
634
  moesSchildLock: 13,
@@ -1005,6 +1037,7 @@ const dataPoints = {
1005
1037
  zsScheduleSunday: 115,
1006
1038
  };
1007
1039
  exports.dataPoints = dataPoints;
1040
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
1008
1041
  function firstDpValue(msg, meta, converterName) {
1009
1042
  const dpValues = msg.data.dpValues;
1010
1043
  for (let index = 1; index < dpValues.length; index++) {
@@ -1014,6 +1047,7 @@ function firstDpValue(msg, meta, converterName) {
1014
1047
  }
1015
1048
  return dpValues[0];
1016
1049
  }
1050
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
1017
1051
  function getMetaValue(entity, definition, key, groupStrategy = "first") {
1018
1052
  if (entity.constructor.name === "Group" && entity.members.length > 0) {
1019
1053
  const values = [];
@@ -1042,6 +1076,7 @@ const CAPACITY = "capacity";
1042
1076
  const DURATION = "duration";
1043
1077
  const OFF = "OFF";
1044
1078
  const ON = "ON";
1079
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
1045
1080
  const toLocalTime = (time, timezone) => {
1046
1081
  if (time === "--:--:--") {
1047
1082
  return time;
@@ -1052,12 +1087,14 @@ const toLocalTime = (time, timezone) => {
1052
1087
  const giexFzModelConverters = {
1053
1088
  QT06_1: {
1054
1089
  // _TZE200_sh1btabb timezone is GMT+8
1090
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
1055
1091
  time: (value) => toLocalTime(value, "+08:00"),
1056
1092
  },
1057
1093
  };
1058
1094
  const giexTzModelConverters = {
1059
1095
  QT06_2: {
1060
1096
  // _TZE200_a7sghmms irrigation time should not be less than 10 secs as per GiEX advice
1097
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
1061
1098
  irrigationTarget: (value, mode) => (value > 0 && value < SAFETY_MIN_SECS && mode === DURATION ? SAFETY_MIN_SECS : value),
1062
1099
  },
1063
1100
  };
@@ -1144,6 +1181,7 @@ const fromZigbee = {
1144
1181
  return result;
1145
1182
  },
1146
1183
  },
1184
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
1147
1185
  ZM35HQ_battery: {
1148
1186
  cluster: "manuSpecificTuya",
1149
1187
  type: ["commandDataReport"],
@@ -1201,6 +1239,7 @@ const fromZigbee = {
1201
1239
  return result;
1202
1240
  },
1203
1241
  },
1242
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
1204
1243
  R7049_status: {
1205
1244
  cluster: "manuSpecificTuya",
1206
1245
  type: ["commandDataResponse", "commandDataReport"],
@@ -1245,6 +1284,7 @@ const fromZigbee = {
1245
1284
  return result;
1246
1285
  },
1247
1286
  },
1287
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
1248
1288
  woox_R7060: {
1249
1289
  cluster: "manuSpecificTuya",
1250
1290
  type: ["commandActiveStatusReport"],
@@ -1649,6 +1689,7 @@ const fromZigbee = {
1649
1689
  const dp = dpValue.dp;
1650
1690
  const value = getDataValue(dpValue);
1651
1691
  const stateLookup = { "0": "cool", "1": "heat", "2": "fan_only" };
1692
+ // biome-ignore lint/suspicious/noImplicitAnyLet: ignored using `--suppress`
1652
1693
  let temperature;
1653
1694
  /* See tuyaThermostat above for message structure comment */
1654
1695
  switch (dp) {
@@ -1777,6 +1818,7 @@ const fromZigbee = {
1777
1818
  }
1778
1819
  },
1779
1820
  },
1821
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
1780
1822
  moesS_thermostat: {
1781
1823
  cluster: "manuSpecificTuya",
1782
1824
  type: ["commandDataResponse", "commandDataReport"],
@@ -1866,7 +1908,9 @@ const fromZigbee = {
1866
1908
  case dataPoints.tuyaSabCO2:
1867
1909
  if (["_TZE200_dwcarsat", "_TZE204_dwcarsat"].includes(meta.device.manufacturerName)) {
1868
1910
  // Ignore: https://github.com/Koenkk/zigbee2mqtt/issues/11033#issuecomment-1109808552
1869
- if (value === 0xaaac || value === 0xaaab)
1911
+ // There are a lot of "strange" big values, so if the value is bigger than the range of the sensor, discard
1912
+ // According to the manual of the device, the valid range is 0-1000 ug/m3
1913
+ if (value > 1000)
1870
1914
  return;
1871
1915
  return { pm25: value };
1872
1916
  }
@@ -1889,6 +1933,7 @@ const fromZigbee = {
1889
1933
  }
1890
1934
  },
1891
1935
  },
1936
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
1892
1937
  tuya_CO: {
1893
1938
  cluster: "manuSpecificTuya",
1894
1939
  type: ["commandDataReport", "commandDataResponse"],
@@ -2650,6 +2695,7 @@ const fromZigbee = {
2650
2695
  return result;
2651
2696
  },
2652
2697
  },
2698
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
2653
2699
  ZMAM02_cover: {
2654
2700
  cluster: "manuSpecificTuya",
2655
2701
  type: ["commandDataReport", "commandDataResponse"],
@@ -2815,6 +2861,7 @@ const fromZigbee = {
2815
2861
  return result;
2816
2862
  },
2817
2863
  },
2864
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
2818
2865
  ZG204ZL_lms: {
2819
2866
  cluster: "manuSpecificTuya",
2820
2867
  type: ["commandDataResponse", "commandDataReport"],
@@ -3229,6 +3276,7 @@ const fromZigbee = {
3229
3276
  }
3230
3277
  },
3231
3278
  },
3279
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
3232
3280
  ZB006X_settings: {
3233
3281
  cluster: "manuSpecificTuya",
3234
3282
  type: ["commandActiveStatusReport", "commandActiveStatusReportAlt"],
@@ -3652,10 +3700,12 @@ const fromZigbee = {
3652
3700
  const maxTransitions = thermostatMeta.weeklyScheduleMaxTransitions;
3653
3701
  let dataOffset = 0;
3654
3702
  let conversion = "generic";
3703
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3655
3704
  function dataToTransitions(data, maxTransitions, offset) {
3656
3705
  // Later it is possible to move converter to meta or to other place outside if other type of converter
3657
3706
  // will be needed for other device. Currently this converter is based on ETOP HT-08 thermostat.
3658
3707
  // see also toZigbee.tuya_thermostat_weekly_schedule()
3708
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3659
3709
  function dataToTransition(data, index) {
3660
3710
  return {
3661
3711
  time: (data[index + 0] << 8) + data[index + 1],
@@ -3705,6 +3755,8 @@ const fromZigbee = {
3705
3755
  for (const [i, dpValue] of msg.data.dpValues.entries()) {
3706
3756
  logDataPoint("tuya_data_point_dump", msg, dpValue, meta);
3707
3757
  dataStr += `${now} ${meta.device.ieeeAddr} ${getHex(msg.data.seq)} ${getHex(i)} ${getHex(dpValue.dp)} ${getHex(dpValue.datatype)}`;
3758
+ // biome-ignore lint/complexity/noForEach: ignored using `--suppress`
3759
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3708
3760
  dpValue.data.forEach((elem) => {
3709
3761
  dataStr += ` ${getHex(elem)}`;
3710
3762
  });
@@ -3808,32 +3860,42 @@ const fromZigbee = {
3808
3860
  exports.fz = fromZigbee;
3809
3861
  exports.fromZigbee = fromZigbee;
3810
3862
  const toZigbee1 = {
3863
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
3811
3864
  SA12IZL_silence_siren: {
3812
3865
  key: ["silence_siren"],
3866
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3813
3867
  convertSet: async (entity, key, value, meta) => {
3814
3868
  await sendDataPointBool(entity, 16, value);
3815
3869
  },
3816
3870
  },
3871
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
3817
3872
  SA12IZL_alarm: {
3818
3873
  key: ["alarm"],
3874
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3819
3875
  convertSet: async (entity, key, value, meta) => {
3820
3876
  await sendDataPointEnum(entity, 20, value ? 0 : 1);
3821
3877
  },
3822
3878
  },
3879
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
3823
3880
  R7049_silenceSiren: {
3824
3881
  key: ["silence_siren"],
3882
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3825
3883
  convertSet: async (entity, key, value, meta) => {
3826
3884
  await sendDataPointBool(entity, 16, value);
3827
3885
  },
3828
3886
  },
3887
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
3829
3888
  R7049_testAlarm: {
3830
3889
  key: ["test_alarm"],
3890
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3831
3891
  convertSet: async (entity, key, value, meta) => {
3832
3892
  await sendDataPointBool(entity, 8, value);
3833
3893
  },
3834
3894
  },
3895
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
3835
3896
  R7049_alarm: {
3836
3897
  key: ["alarm"],
3898
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3837
3899
  convertSet: async (entity, key, value, meta) => {
3838
3900
  await sendDataPointEnum(entity, 20, value ? 0 : 1);
3839
3901
  },
@@ -3858,6 +3920,7 @@ const toZigbee1 = {
3858
3920
  },
3859
3921
  hpsz: {
3860
3922
  key: ["led_state"],
3923
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3861
3924
  convertSet: async (entity, key, value, meta) => {
3862
3925
  await sendDataPointBool(entity, dataPoints.HPSZLEDState, value);
3863
3926
  },
@@ -3865,12 +3928,14 @@ const toZigbee1 = {
3865
3928
  tuya_cover_control: {
3866
3929
  key: ["state", "position"],
3867
3930
  options: [exposes.options.invert_cover()],
3931
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3868
3932
  convertSet: async (entity, key, value, meta) => {
3869
3933
  // Protocol description
3870
3934
  // https://github.com/Koenkk/zigbee-herdsman-converters/issues/1159#issuecomment-614659802
3871
3935
  if (key === "position") {
3872
3936
  if (value >= 0 && value <= 100) {
3873
3937
  const invert = isCoverInverted(meta.device.manufacturerName) ? !meta.options.invert_cover : meta.options.invert_cover;
3938
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
3874
3939
  value = invert ? 100 - value : value;
3875
3940
  await sendDataPointValue(entity, dataPoints.coverPosition, value);
3876
3941
  }
@@ -3881,6 +3946,7 @@ const toZigbee1 = {
3881
3946
  else if (key === "state") {
3882
3947
  const stateEnums = getCoverStateEnums(meta.device.manufacturerName);
3883
3948
  logger_1.logger.debug(`Using state enums for ${meta.device.manufacturerName}: ${JSON.stringify(stateEnums)}`, "zhc:legacy:tz:tuya_cover_control");
3949
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
3884
3950
  value = value.toLowerCase();
3885
3951
  switch (value) {
3886
3952
  case "close":
@@ -3902,10 +3968,12 @@ const toZigbee1 = {
3902
3968
  const toZigbee2 = {
3903
3969
  zb_sm_cover: {
3904
3970
  key: ["state", "position", "reverse_direction", "top_limit", "bottom_limit", "favorite_position", "goto_positon", "report"],
3971
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3905
3972
  convertSet: async (entity, key, value, meta) => {
3906
3973
  switch (key) {
3907
3974
  case "position": {
3908
3975
  const invert = meta.state ? !meta.state.invert_cover : false;
3976
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
3909
3977
  value = invert ? 100 - value : value;
3910
3978
  if (value >= 0 && value <= 100) {
3911
3979
  await sendDataPointValue(entity, dataPoints.coverPosition, value);
@@ -3918,6 +3986,7 @@ const toZigbee2 = {
3918
3986
  case "state": {
3919
3987
  const stateEnums = getCoverStateEnums(meta.device.manufacturerName);
3920
3988
  logger_1.logger.debug(`Using state enums for ${meta.device.manufacturerName}: ${JSON.stringify(stateEnums)}`, "zhc:legacy:tz:zb_sm_cover");
3989
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
3921
3990
  value = value.toLowerCase();
3922
3991
  switch (value) {
3923
3992
  case "close":
@@ -3955,9 +4024,11 @@ const toZigbee2 = {
3955
4024
  }
3956
4025
  case "goto_positon": {
3957
4026
  if (value === "FAVORITE") {
4027
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
3958
4028
  value = meta.state ? meta.state.favorite_position : null;
3959
4029
  }
3960
4030
  else {
4031
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
3961
4032
  value = Number.parseInt(value);
3962
4033
  }
3963
4034
  return await toZigbee1.tuya_cover_control.convertSet(entity, "position", value, meta);
@@ -3987,15 +4058,18 @@ const toZigbee2 = {
3987
4058
  "child_lock",
3988
4059
  "schedule",
3989
4060
  ],
4061
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
3990
4062
  convertSet: async (entity, key, value, meta) => {
3991
4063
  switch (key) {
3992
4064
  case "system_mode":
3993
4065
  await sendDataPointBool(entity, dataPoints.x5hState, value === "heat");
3994
4066
  break;
3995
4067
  case "preset": {
4068
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
3996
4069
  value = value.toLowerCase();
3997
4070
  const lookup = { manual: 0, program: 1 };
3998
4071
  utils.validateValue(value, Object.keys(lookup));
4072
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
3999
4073
  value = lookup[value];
4000
4074
  await sendDataPointEnum(entity, dataPoints.x5hMode, value);
4001
4075
  break;
@@ -4014,6 +4088,7 @@ const toZigbee2 = {
4014
4088
  break;
4015
4089
  case "deadzone_temperature":
4016
4090
  if (value >= 0.5 && value <= 9.5) {
4091
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4017
4092
  value = Math.round(value * 10);
4018
4093
  await sendDataPointValue(entity, dataPoints.x5hTempDiff, value);
4019
4094
  }
@@ -4031,8 +4106,10 @@ const toZigbee2 = {
4031
4106
  break;
4032
4107
  case "local_temperature_calibration":
4033
4108
  if (value >= -9.9 && value <= 9.9) {
4109
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4034
4110
  value = Math.round(value * 10);
4035
4111
  if (value < 0) {
4112
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4036
4113
  value = 0xffffffff + value + 1;
4037
4114
  }
4038
4115
  await sendDataPointValue(entity, dataPoints.x5hTempCorrection, value);
@@ -4054,23 +4131,28 @@ const toZigbee2 = {
4054
4131
  await sendDataPointBool(entity, dataPoints.x5hSound, value === "ON");
4055
4132
  break;
4056
4133
  case "brightness_state": {
4134
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4057
4135
  value = value.toLowerCase();
4058
4136
  const lookup = { off: 0, low: 1, medium: 2, high: 3 };
4059
4137
  utils.validateValue(value, Object.keys(lookup));
4138
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4060
4139
  value = lookup[value];
4061
4140
  await sendDataPointEnum(entity, dataPoints.x5hBackplaneBrightness, value);
4062
4141
  break;
4063
4142
  }
4064
4143
  case "sensor": {
4144
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4065
4145
  value = value.toLowerCase();
4066
4146
  const lookup = { internal: 0, external: 1, both: 2 };
4067
4147
  utils.validateValue(value, Object.keys(lookup));
4148
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4068
4149
  value = lookup[value];
4069
4150
  await sendDataPointEnum(entity, dataPoints.x5hSensorSelection, value);
4070
4151
  break;
4071
4152
  }
4072
4153
  case "current_heating_setpoint":
4073
4154
  if (value >= 5 && value <= 60) {
4155
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4074
4156
  value = Math.round(value * 10);
4075
4157
  await sendDataPointValue(entity, dataPoints.x5hSetTemp, value);
4076
4158
  }
@@ -4180,6 +4262,7 @@ const toZigbee2 = {
4180
4262
  },
4181
4263
  zs_thermostat_preset_mode: {
4182
4264
  key: ["preset"],
4265
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4183
4266
  convertSet: async (entity, key, value, meta) => {
4184
4267
  const lookup = { schedule: 0, manual: 1, holiday: 2 };
4185
4268
  if (value === "boost") {
@@ -4216,8 +4299,10 @@ const toZigbee2 = {
4216
4299
  zs_thermostat_local_temperature_calibration: {
4217
4300
  key: ["local_temperature_calibration"],
4218
4301
  convertSet: async (entity, key, value, meta) => {
4302
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4219
4303
  if (value > 0)
4220
4304
  value = value * 10;
4305
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4221
4306
  if (value < 0)
4222
4307
  value = value * 10 + 0x100000000;
4223
4308
  await sendDataPointValue(entity, dataPoints.zsTempCalibration, value);
@@ -4226,6 +4311,7 @@ const toZigbee2 = {
4226
4311
  zs_thermostat_away_setting: {
4227
4312
  key: ["away_setting"],
4228
4313
  convertSet: async (entity, key, value, meta) => {
4314
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4229
4315
  const result = [];
4230
4316
  const daysInMonth = new Date(2000 + result[0], result[1], 0).getDate();
4231
4317
  for (const attrName of [
@@ -4293,6 +4379,7 @@ const toZigbee2 = {
4293
4379
  },
4294
4380
  zs_thermostat_local_schedule: {
4295
4381
  key: ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"],
4382
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4296
4383
  convertSet: async (entity, key, value, meta) => {
4297
4384
  const daysMap = { monday: 1, tuesday: 2, wednesday: 3, thursday: 4, friday: 5, saturday: 6, sunday: 7 };
4298
4385
  const day = daysMap[key];
@@ -4343,8 +4430,10 @@ const toZigbee2 = {
4343
4430
  results.push(Math.round(rt));
4344
4431
  }
4345
4432
  }
4433
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4346
4434
  if (value > 0)
4347
4435
  value = value * 10;
4436
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4348
4437
  if (value < 0)
4349
4438
  value = value * 10 + 0x100000000;
4350
4439
  await sendDataPointRaw(entity, 109 + day - 1, results);
@@ -4388,6 +4477,7 @@ const toZigbee2 = {
4388
4477
  },
4389
4478
  tuya_alecto_smoke: {
4390
4479
  key: ["self_checking", "silence"],
4480
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4391
4481
  convertSet: async (entity, key, value, meta) => {
4392
4482
  switch (key) {
4393
4483
  case "self_checking":
@@ -4433,6 +4523,7 @@ const toZigbee2 = {
4433
4523
  break;
4434
4524
  case "local_temperature_calibration":
4435
4525
  // @ts-expect-error ignore
4526
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4436
4527
  if (value < 0)
4437
4528
  value = 0xffffffff + value + 1;
4438
4529
  await sendDataPointValue(entity, dataPoints.connecteTempCalibration, value);
@@ -4489,6 +4580,7 @@ const toZigbee2 = {
4489
4580
  },
4490
4581
  moes_thermostat_current_heating_setpoint: {
4491
4582
  key: ["current_heating_setpoint"],
4583
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4492
4584
  convertSet: async (entity, key, value, meta) => {
4493
4585
  if (["_TZE200_5toc8efa", "_TZE204_5toc8efa"].includes(meta.device.manufacturerName)) {
4494
4586
  await sendDataPointValue(entity, dataPoints.moesHeatingSetpoint, value * 10);
@@ -4500,6 +4592,7 @@ const toZigbee2 = {
4500
4592
  },
4501
4593
  moes_thermostat_deadzone_temperature: {
4502
4594
  key: ["deadzone_temperature"],
4595
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4503
4596
  convertSet: async (entity, key, value, meta) => {
4504
4597
  if (["_TZE200_5toc8efa", "_TZE204_5toc8efa"].includes(meta.device.manufacturerName)) {
4505
4598
  await sendDataPointValue(entity, dataPoints.moesDeadZoneTemp, value * 10);
@@ -4511,7 +4604,9 @@ const toZigbee2 = {
4511
4604
  },
4512
4605
  moes_thermostat_calibration: {
4513
4606
  key: ["local_temperature_calibration"],
4607
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4514
4608
  convertSet: async (entity, key, value, meta) => {
4609
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4515
4610
  if (value < 0)
4516
4611
  value = 4096 + value;
4517
4612
  await sendDataPointValue(entity, dataPoints.moesTempCalibration, value);
@@ -4519,6 +4614,7 @@ const toZigbee2 = {
4519
4614
  },
4520
4615
  moes_thermostat_min_temperature_limit: {
4521
4616
  key: ["min_temperature_limit"],
4617
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4522
4618
  convertSet: async (entity, key, value, meta) => {
4523
4619
  if (["_TZE200_5toc8efa", "_TZE204_5toc8efa"].includes(meta.device.manufacturerName)) {
4524
4620
  await sendDataPointValue(entity, dataPoints.moesMinTempLimit, value * 10);
@@ -4530,6 +4626,7 @@ const toZigbee2 = {
4530
4626
  },
4531
4627
  moes_thermostat_max_temperature_limit: {
4532
4628
  key: ["max_temperature_limit"],
4629
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4533
4630
  convertSet: async (entity, key, value, meta) => {
4534
4631
  if (["_TZE200_5toc8efa", "_TZE204_5toc8efa"].includes(meta.device.manufacturerName)) {
4535
4632
  await sendDataPointValue(entity, dataPoints.moesMaxTempLimit, value * 10);
@@ -4583,6 +4680,7 @@ const toZigbee2 = {
4583
4680
  },
4584
4681
  moes_thermostat_program_schedule: {
4585
4682
  key: ["program"],
4683
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4586
4684
  convertSet: async (entity, key, value, meta) => {
4587
4685
  if (!meta.state.program) {
4588
4686
  logger_1.logger.warning("Existing program state not set.", "zhc:legacy:tz:moes_bht_002");
@@ -4635,19 +4733,23 @@ const toZigbee2 = {
4635
4733
  await sendDataPointRaw(entity, dataPoints.moesSchedule, payload);
4636
4734
  },
4637
4735
  },
4736
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4638
4737
  moesS_thermostat_system_mode: {
4639
4738
  key: ["system_mode"],
4640
- convertSet: async (entity, key, value, meta) => {
4739
+ convertSet: (entity, key, value, meta) => {
4641
4740
  return { state: { system_mode: "heat" } };
4642
4741
  },
4643
4742
  },
4743
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4644
4744
  moesS_thermostat_preset: {
4645
4745
  key: ["preset"],
4746
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4646
4747
  convertSet: async (entity, key, value, meta) => {
4647
4748
  const lookup = { programming: 0, manual: 1, temporary_manual: 2, holiday: 3 };
4648
4749
  await sendDataPointEnum(entity, dataPoints.moesSsystemMode, lookup[value]);
4649
4750
  },
4650
4751
  },
4752
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4651
4753
  moesS_thermostat_current_heating_setpoint: {
4652
4754
  key: ["current_heating_setpoint"],
4653
4755
  convertSet: async (entity, key, value, meta) => {
@@ -4655,30 +4757,35 @@ const toZigbee2 = {
4655
4757
  await sendDataPointValue(entity, dataPoints.moesSheatingSetpoint, temp);
4656
4758
  },
4657
4759
  },
4760
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4658
4761
  moesS_thermostat_boost_heating: {
4659
4762
  key: ["boost_heating"],
4660
4763
  convertSet: async (entity, key, value, meta) => {
4661
4764
  await sendDataPointBool(entity, dataPoints.moesSboostHeating, value === "ON");
4662
4765
  },
4663
4766
  },
4767
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4664
4768
  moesS_thermostat_window_detection: {
4665
4769
  key: ["window_detection"],
4666
4770
  convertSet: async (entity, key, value, meta) => {
4667
4771
  await sendDataPointBool(entity, dataPoints.moesSwindowDetectionFunktion_A2, value === "ON");
4668
4772
  },
4669
4773
  },
4774
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4670
4775
  moesS_thermostat_child_lock: {
4671
4776
  key: ["child_lock"],
4672
4777
  convertSet: async (entity, key, value, meta) => {
4673
4778
  await sendDataPointBool(entity, dataPoints.moesSchildLock, value === "LOCK");
4674
4779
  },
4675
4780
  },
4781
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4676
4782
  moesS_thermostat_boostHeatingCountdownTimeSet: {
4677
4783
  key: ["boost_heating_countdown_time_set"],
4678
4784
  convertSet: async (entity, key, value, meta) => {
4679
4785
  await sendDataPointValue(entity, dataPoints.moesSboostHeatingCountdownTimeSet, value);
4680
4786
  },
4681
4787
  },
4788
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4682
4789
  moesS_thermostat_temperature_calibration: {
4683
4790
  key: ["local_temperature_calibration"],
4684
4791
  convertSet: async (entity, key, value, meta) => {
@@ -4689,33 +4796,41 @@ const toZigbee2 = {
4689
4796
  await sendDataPointValue(entity, dataPoints.moesScompensationTempSet, temp);
4690
4797
  },
4691
4798
  },
4799
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4692
4800
  moesS_thermostat_moesSecoMode: {
4693
4801
  key: ["eco_mode"],
4694
4802
  convertSet: async (entity, key, value, meta) => {
4695
4803
  await sendDataPointBool(entity, dataPoints.moesSecoMode, value === "ON");
4696
4804
  },
4697
4805
  },
4806
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4698
4807
  moesS_thermostat_eco_temperature: {
4699
4808
  key: ["eco_temperature"],
4809
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4700
4810
  convertSet: async (entity, key, value, meta) => {
4701
4811
  const temp = Math.round(value);
4702
4812
  await sendDataPointValue(entity, dataPoints.moesSecoModeTempSet, temp);
4703
4813
  },
4704
4814
  },
4815
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4705
4816
  moesS_thermostat_max_temperature: {
4706
4817
  key: ["max_temperature"],
4818
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4707
4819
  convertSet: async (entity, key, value, meta) => {
4708
4820
  const temp = Math.round(value);
4709
4821
  await sendDataPointValue(entity, dataPoints.moesSmaxTempSet, temp);
4710
4822
  },
4711
4823
  },
4824
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4712
4825
  moesS_thermostat_min_temperature: {
4713
4826
  key: ["min_temperature"],
4827
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4714
4828
  convertSet: async (entity, key, value, meta) => {
4715
4829
  const temp = Math.round(value);
4716
4830
  await sendDataPointValue(entity, dataPoints.moesSminTempSet, temp);
4717
4831
  },
4718
4832
  },
4833
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4719
4834
  moesS_thermostat_schedule_programming: {
4720
4835
  key: ["programming_mode"],
4721
4836
  convertSet: async (entity, key, value, meta) => {
@@ -4765,11 +4880,14 @@ const toZigbee2 = {
4765
4880
  },
4766
4881
  moes_thermostat_sensor: {
4767
4882
  key: ["sensor"],
4883
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4768
4884
  convertSet: async (entity, key, value, meta) => {
4769
4885
  if (typeof value === "string") {
4886
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4770
4887
  value = value.toLowerCase();
4771
4888
  const lookup = { in: 0, al: 1, ou: 2 };
4772
4889
  utils.validateValue(value, Object.keys(lookup));
4890
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
4773
4891
  value = lookup[value];
4774
4892
  }
4775
4893
  if (typeof value === "number" && value >= 0 && value <= 2) {
@@ -4789,8 +4907,10 @@ const toZigbee2 = {
4789
4907
  },
4790
4908
  tuya_dimmer_level: {
4791
4909
  key: ["brightness_min", "min_brightness", "max_brightness", "brightness", "brightness_percent", "level"],
4910
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4792
4911
  convertSet: async (entity, key, value, meta) => {
4793
4912
  // upscale to 1000
4913
+ // biome-ignore lint/suspicious/noImplicitAnyLet: ignored using `--suppress`
4794
4914
  let newValue;
4795
4915
  let dp = dataPoints.dimmerLevel;
4796
4916
  if (["_TZE200_3p5ydos3", "_TZE200_9i9dt8is", "_TZE200_dfxkcots", "_TZE200_w4cryh2i"].includes(meta.device.manufacturerName)) {
@@ -4854,6 +4974,7 @@ const toZigbee2 = {
4854
4974
  },
4855
4975
  tuya_switch_state: {
4856
4976
  key: ["state"],
4977
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
4857
4978
  convertSet: async (entity, key, value, meta) => {
4858
4979
  const lookup = { l1: 1, l2: 2, l3: 3, l4: 4, l5: 5, l6: 6 };
4859
4980
  const multiEndpoint = utils.getMetaValue(entity, meta.mapped, "multiEndpoint", "allEqual", false);
@@ -4881,6 +5002,7 @@ const toZigbee2 = {
4881
5002
  return { state: { timer: value } };
4882
5003
  },
4883
5004
  },
5005
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4884
5006
  ZVG1_timer: {
4885
5007
  key: ["timer"],
4886
5008
  convertSet: async (entity, key, value, meta) => {
@@ -4891,6 +5013,7 @@ const toZigbee2 = {
4891
5013
  return { state: { timer: value } };
4892
5014
  },
4893
5015
  },
5016
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4894
5017
  ZVG1_weather_delay: {
4895
5018
  key: ["weather_delay"],
4896
5019
  convertSet: async (entity, key, value, meta) => {
@@ -4898,6 +5021,7 @@ const toZigbee2 = {
4898
5021
  await sendDataPointEnum(entity, 10, lookup[value]);
4899
5022
  },
4900
5023
  },
5024
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4901
5025
  ZVG1_cycle_timer: {
4902
5026
  key: ["cycle_timer_1", "cycle_timer_2", "cycle_timer_3", "cycle_timer_4"],
4903
5027
  convertSet: async (entity, key, value, meta) => {
@@ -4952,6 +5076,7 @@ const toZigbee2 = {
4952
5076
  return ret;
4953
5077
  },
4954
5078
  },
5079
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
4955
5080
  ZVG1_normal_schedule_timer: {
4956
5081
  key: ["normal_schedule_timer_1", "normal_schedule_timer_2", "normal_schedule_timer_3", "normal_schedule_timer_4"],
4957
5082
  convertSet: async (entity, key, value, meta) => {
@@ -5099,6 +5224,7 @@ const toZigbee2 = {
5099
5224
  // ]
5100
5225
  payload.push(1 << (dayofweek - 1), 4);
5101
5226
  }
5227
+ // biome-ignore lint/complexity/noForEach: ignored using `--suppress`
5102
5228
  transitions.forEach((transition) => {
5103
5229
  payload.push(...transitionToData(transition));
5104
5230
  });
@@ -5313,6 +5439,7 @@ const toZigbee2 = {
5313
5439
  tuya_thermostat_schedule: {
5314
5440
  // payload example {"holidays":[{"hour":6,"minute":0,"temperature":20},{"hour":8,"minute":0,.... 6x
5315
5441
  key: ["schedule"],
5442
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5316
5443
  convertSet: async (entity, key, value, meta) => {
5317
5444
  const prob = Object.keys(value)[0]; // "workdays" or "holidays"
5318
5445
  if (prob === "workdays" || prob === "holidays") {
@@ -5336,6 +5463,7 @@ const toZigbee2 = {
5336
5463
  tuya_thermostat_schedule_programming_mode: {
5337
5464
  // payload example "00:20/5°C 01:20/5°C 6:59/15°C 18:00/5°C 20:00/5°C 23:30/5°C"
5338
5465
  key: ["workdays_schedule", "holidays_schedule"],
5466
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5339
5467
  convertSet: async (entity, key, value, meta) => {
5340
5468
  const dpId = key === "workdays_schedule" ? dataPoints.scheduleWorkday : dataPoints.scheduleHoliday;
5341
5469
  const payload = [];
@@ -5358,6 +5486,7 @@ const toZigbee2 = {
5358
5486
  },
5359
5487
  tuya_thermostat_week: {
5360
5488
  key: ["week"],
5489
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5361
5490
  convertSet: async (entity, key, value, meta) => {
5362
5491
  const lookup = { "5+2": 0, "6+1": 1, "7": 2 };
5363
5492
  const week = lookup[value];
@@ -5367,6 +5496,7 @@ const toZigbee2 = {
5367
5496
  },
5368
5497
  tuya_cover_options: {
5369
5498
  key: ["options"],
5499
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5370
5500
  convertSet: async (entity, key, value, meta) => {
5371
5501
  if (value.reverse_direction !== undefined) {
5372
5502
  if (value.reverse_direction) {
@@ -5430,6 +5560,7 @@ const toZigbee2 = {
5430
5560
  "temperature_alarm",
5431
5561
  "humidity_alarm",
5432
5562
  ],
5563
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5433
5564
  convertSet: async (entity, key, value, meta) => {
5434
5565
  switch (key) {
5435
5566
  case "alarm":
@@ -5471,6 +5602,7 @@ const toZigbee2 = {
5471
5602
  },
5472
5603
  neo_alarm: {
5473
5604
  key: ["alarm", "melody", "volume", "duration"],
5605
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5474
5606
  convertSet: async (entity, key, value, meta) => {
5475
5607
  switch (key) {
5476
5608
  case "alarm":
@@ -5504,6 +5636,7 @@ const toZigbee2 = {
5504
5636
  "humidity_sensitivity",
5505
5637
  "humidity_report_interval",
5506
5638
  ],
5639
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5507
5640
  convertSet: async (entity, key, value, meta) => {
5508
5641
  switch (key) {
5509
5642
  case "temperature_unit_convert":
@@ -5540,6 +5673,7 @@ const toZigbee2 = {
5540
5673
  },
5541
5674
  saswell_thermostat_current_heating_setpoint: {
5542
5675
  key: ["current_heating_setpoint"],
5676
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5543
5677
  convertSet: async (entity, key, value, meta) => {
5544
5678
  const temp = Math.round(value * 10);
5545
5679
  await sendDataPointValue(entity, dataPoints.saswellHeatingSetpoint, temp);
@@ -5595,7 +5729,9 @@ const toZigbee2 = {
5595
5729
  },
5596
5730
  saswell_thermostat_calibration: {
5597
5731
  key: ["local_temperature_calibration"],
5732
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5598
5733
  convertSet: async (entity, key, value, meta) => {
5734
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
5599
5735
  if (value < 0)
5600
5736
  value = 0xffffffff + value + 1;
5601
5737
  await sendDataPointValue(entity, dataPoints.saswellTempCalibration, value);
@@ -5603,6 +5739,7 @@ const toZigbee2 = {
5603
5739
  },
5604
5740
  evanell_thermostat_current_heating_setpoint: {
5605
5741
  key: ["current_heating_setpoint"],
5742
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5606
5743
  convertSet: async (entity, key, value, meta) => {
5607
5744
  const temp = Math.round(value * 10);
5608
5745
  await sendDataPointValue(entity, dataPoints.evanellHeatingSetpoint, temp);
@@ -5632,9 +5769,11 @@ const toZigbee2 = {
5632
5769
  },
5633
5770
  silvercrest_smart_led_string: {
5634
5771
  key: ["color", "brightness", "effect"],
5772
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5635
5773
  convertSet: async (entity, key, value, meta) => {
5636
5774
  if (key === "effect") {
5637
5775
  await sendDataPointEnum(entity, dataPoints.silvercrestChangeMode, silvercrestModes.effect);
5776
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5638
5777
  let data = [];
5639
5778
  const effect = silvercrestEffects[value.effect];
5640
5779
  data = data.concat(convertStringToHexArray(effect));
@@ -5714,6 +5853,7 @@ const toZigbee2 = {
5714
5853
  }
5715
5854
  return "0000";
5716
5855
  };
5856
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5717
5857
  const fillInHSB = (h, s, b, state) => {
5718
5858
  // Define default values. Device expects leading zero in string.
5719
5859
  const hsb = {
@@ -5754,6 +5894,7 @@ const toZigbee2 = {
5754
5894
  else {
5755
5895
  hsb = fillInHSB(value.h || value.hue || null, value.s || value.saturation || null, value.b || value.brightness || null, meta.state);
5756
5896
  }
5897
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5757
5898
  let data = [];
5758
5899
  data = data.concat(convertStringToHexArray(hsb.h));
5759
5900
  data = data.concat(convertStringToHexArray(hsb.s));
@@ -5815,6 +5956,7 @@ const toZigbee2 = {
5815
5956
  "away_preset_days",
5816
5957
  "away_preset_temperature",
5817
5958
  ],
5959
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5818
5960
  convertSet: async (entity, key, value, meta) => {
5819
5961
  switch (key) {
5820
5962
  case "max_temperature_protection":
@@ -5836,12 +5978,15 @@ const toZigbee2 = {
5836
5978
  await sendDataPointValue(entity, dataPoints.hyAwayTemp, value);
5837
5979
  break;
5838
5980
  case "local_temperature_calibration":
5981
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
5839
5982
  value = Math.round(value * 10);
5983
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
5840
5984
  if (value < 0)
5841
5985
  value = 0xffffffff + value + 1;
5842
5986
  await sendDataPointValue(entity, dataPoints.hyTempCalibration, value);
5843
5987
  break;
5844
5988
  case "hysteresis":
5989
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
5845
5990
  value = Math.round(value * 10);
5846
5991
  await sendDataPointValue(entity, dataPoints.hyHysteresis, value);
5847
5992
  break;
@@ -5861,6 +6006,7 @@ const toZigbee2 = {
5861
6006
  await sendDataPointValue(entity, dataPoints.hyMinTemp, value);
5862
6007
  break;
5863
6008
  case "current_heating_setpoint":
6009
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
5864
6010
  value = Math.round(value * 10);
5865
6011
  await sendDataPointValue(entity, dataPoints.hyHeatingSetpoint, value);
5866
6012
  break;
@@ -5899,23 +6045,28 @@ const toZigbee2 = {
5899
6045
  "sensitivity",
5900
6046
  "keep_time",
5901
6047
  ],
6048
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5902
6049
  convertSet: async (entity, key, value, meta) => {
5903
6050
  switch (key) {
5904
6051
  case "reporting_time":
5905
6052
  await sendDataPointValue(entity, dataPoints.fantemReportingTime, value, "sendData");
5906
6053
  break;
5907
6054
  case "temperature_calibration":
6055
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
5908
6056
  value = Math.round(value * 10);
6057
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
5909
6058
  if (value < 0)
5910
6059
  value = 0xffffffff + value + 1;
5911
6060
  await sendDataPointValue(entity, dataPoints.fantemTempCalibration, value, "sendData");
5912
6061
  break;
5913
6062
  case "humidity_calibration":
6063
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
5914
6064
  if (value < 0)
5915
6065
  value = 0xffffffff + value + 1;
5916
6066
  await sendDataPointValue(entity, dataPoints.fantemHumidityCalibration, value, "sendData");
5917
6067
  break;
5918
6068
  case "illuminance_calibration":
6069
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
5919
6070
  if (value < 0)
5920
6071
  value = 0xffffffff + value + 1;
5921
6072
  await sendDataPointValue(entity, dataPoints.fantemLuxCalibration, value, "sendData");
@@ -5942,8 +6093,10 @@ const toZigbee2 = {
5942
6093
  }
5943
6094
  },
5944
6095
  },
6096
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
5945
6097
  ZB006X_settings: {
5946
6098
  key: ["switch_type", "load_detection_mode", "control_mode"],
6099
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5947
6100
  convertSet: async (entity, key, value, meta) => {
5948
6101
  switch (key) {
5949
6102
  case "switch_type":
@@ -5967,6 +6120,7 @@ const toZigbee2 = {
5967
6120
  },
5968
6121
  tuya_motion_sensor: {
5969
6122
  key: ["o_sensitivity", "v_sensitivity", "led_status", "vacancy_delay", "light_on_luminance_prefer", "light_off_luminance_prefer", "mode"],
6123
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
5970
6124
  convertSet: async (entity, key, value, meta) => {
5971
6125
  switch (key) {
5972
6126
  case "o_sensitivity":
@@ -6044,6 +6198,7 @@ const toZigbee2 = {
6044
6198
  "heating_stop",
6045
6199
  "preset",
6046
6200
  ],
6201
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
6047
6202
  convertSet: async (entity, key, value, meta) => {
6048
6203
  switch (key) {
6049
6204
  case "system_mode":
@@ -6071,23 +6226,29 @@ const toZigbee2 = {
6071
6226
  await sendDataPointBool(entity, dataPoints.tvChildLock, value === "LOCK");
6072
6227
  break;
6073
6228
  case "local_temperature_calibration":
6229
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6074
6230
  value = Math.round(value * 10);
6231
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6075
6232
  value = value < 0 ? 0xffffffff + value + 1 : value;
6076
6233
  await sendDataPointValue(entity, dataPoints.tvTempCalibration, value);
6077
6234
  break;
6078
6235
  case "current_heating_setpoint":
6236
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6079
6237
  value = Math.round(value * 10);
6080
6238
  await sendDataPointValue(entity, dataPoints.tvHeatingSetpoint, value);
6081
6239
  break;
6082
6240
  case "holiday_temperature":
6241
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6083
6242
  value = Math.round(value * 10);
6084
6243
  await sendDataPointValue(entity, dataPoints.tvHolidayTemp, value);
6085
6244
  break;
6086
6245
  case "comfort_temperature":
6246
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6087
6247
  value = Math.round(value * 10);
6088
6248
  await sendDataPointValue(entity, dataPoints.tvComfortTemp, value);
6089
6249
  break;
6090
6250
  case "eco_temperature":
6251
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6091
6252
  value = Math.round(value * 10);
6092
6253
  await sendDataPointValue(entity, dataPoints.tvEcoTemp, value);
6093
6254
  break;
@@ -6106,6 +6267,7 @@ const toZigbee2 = {
6106
6267
  // await sendDataPointEnum(entity, dataPoints.tvBoostMode, (value) ? 0 : 1);
6107
6268
  // break;
6108
6269
  case "open_window_temperature":
6270
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6109
6271
  value = Math.round(value * 10);
6110
6272
  await sendDataPointValue(entity, dataPoints.tvOpenWindowTemp, value);
6111
6273
  break;
@@ -6120,12 +6282,14 @@ const toZigbee2 = {
6120
6282
  },
6121
6283
  tuya_light_wz5: {
6122
6284
  key: ["color", "color_temp", "brightness", "white_brightness"],
6285
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
6123
6286
  convertSet: async (entity, key, value, meta) => {
6124
6287
  if (Array.isArray(meta.mapped))
6125
6288
  throw new Error("Not supported for groups");
6126
6289
  const separateWhite = meta.mapped.meta?.separateWhite;
6127
6290
  if (key === "white_brightness" || (!separateWhite && key === "brightness")) {
6128
6291
  // upscale to 1000
6292
+ // biome-ignore lint/suspicious/noImplicitAnyLet: ignored using `--suppress`
6129
6293
  let newValue;
6130
6294
  if (value >= 0 && value <= 255) {
6131
6295
  newValue = utils.mapNumberRange(value, 0, 255, 0, 1000);
@@ -6151,6 +6315,7 @@ const toZigbee2 = {
6151
6315
  if (typeof value === "string" && Number.isNaN(value)) {
6152
6316
  const presetName = value.toLowerCase();
6153
6317
  if (presetName in preset) {
6318
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6154
6319
  value = preset[presetName];
6155
6320
  }
6156
6321
  else {
@@ -6158,6 +6323,7 @@ const toZigbee2 = {
6158
6323
  }
6159
6324
  }
6160
6325
  else {
6326
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6161
6327
  value = light.clampColorTemp(Number(value), colorTempMin, colorTempMax);
6162
6328
  }
6163
6329
  const data = utils.mapNumberRange(value, colorTempMax, colorTempMin, 0, 1000);
@@ -6201,6 +6367,7 @@ const toZigbee2 = {
6201
6367
  if (h) {
6202
6368
  // The device expects 0-359
6203
6369
  if (h >= 360) {
6370
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6204
6371
  h = 359;
6205
6372
  }
6206
6373
  hsb.h = make4sizedString(h.toString(16));
@@ -6226,6 +6393,7 @@ const toZigbee2 = {
6226
6393
  return hsb;
6227
6394
  };
6228
6395
  const hsb = fillInHSB(value.h || value.hue || null, value.s || value.saturation || null, value.b || value.brightness || key === "brightness" ? value : null, meta.state);
6396
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
6229
6397
  let data = [];
6230
6398
  data = data.concat(convertStringToHexArray(hsb.h));
6231
6399
  data = data.concat(convertStringToHexArray(hsb.s));
@@ -6239,13 +6407,16 @@ const toZigbee2 = {
6239
6407
  }
6240
6408
  },
6241
6409
  },
6410
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
6242
6411
  ZMAM02_cover: {
6243
6412
  key: ["state", "position", "mode", "motor_direction", "border", "motor_working_mode"],
6244
6413
  options: [exposes.options.invert_cover()],
6414
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
6245
6415
  convertSet: async (entity, key, value, meta) => {
6246
6416
  if (key === "position") {
6247
6417
  if (value >= 0 && value <= 100) {
6248
6418
  const invert = isCoverInverted(meta.device.manufacturerName) ? !meta.options.invert_cover : meta.options.invert_cover;
6419
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6249
6420
  value = invert ? 100 - value : value;
6250
6421
  await sendDataPointValue(entity, dataPoints.coverPosition, value);
6251
6422
  }
@@ -6256,6 +6427,7 @@ const toZigbee2 = {
6256
6427
  else if (key === "state") {
6257
6428
  const stateEnums = getCoverStateEnums(meta.device.manufacturerName);
6258
6429
  logger_1.logger.debug(`Using state enums for ${meta.device.manufacturerName}: ${JSON.stringify(stateEnums)}`, "zhc:legacy:tz:zmam02");
6430
+ // biome-ignore lint/style/noParameterAssign: ignored using `--suppress`
6259
6431
  value = value.toLowerCase();
6260
6432
  switch (value) {
6261
6433
  case "close":
@@ -6289,6 +6461,7 @@ const toZigbee2 = {
6289
6461
  },
6290
6462
  tuya_smart_human_presense_sensor: {
6291
6463
  key: ["radar_sensitivity", "minimum_range", "maximum_range", "detection_delay", "fading_time"],
6464
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
6292
6465
  convertSet: async (entity, key, value, meta) => {
6293
6466
  switch (key) {
6294
6467
  case "radar_sensitivity":
@@ -6311,6 +6484,7 @@ const toZigbee2 = {
6311
6484
  }
6312
6485
  },
6313
6486
  },
6487
+ // biome-ignore lint/style/useNamingConvention: ignored using `--suppress`
6314
6488
  ZG204ZL_lms: {
6315
6489
  key: ["sensitivity", "keep_time"],
6316
6490
  convertSet: async (entity, key, value, meta) => {
@@ -6343,6 +6517,7 @@ const toZigbee2 = {
6343
6517
  moes_cover: {
6344
6518
  key: ["backlight", "calibration", "motor_reversal", "state", "position"],
6345
6519
  options: [exposes.options.invert_cover()],
6520
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
6346
6521
  convertSet: async (entity, key, value, meta) => {
6347
6522
  switch (key) {
6348
6523
  case "position":
@@ -6391,6 +6566,7 @@ const toZigbee2 = {
6391
6566
  'temperature_setting',
6392
6567
  'leakage_current_setting'*/
6393
6568
  ],
6569
+ // biome-ignore lint/suspicious/noExplicitAny: ignored using `--suppress`
6394
6570
  convertSet: async (entity, key, value, meta) => {
6395
6571
  if (key === "state") {
6396
6572
  await sendDataPointBool(entity, dataPoints.state, value === "ON");