@willieee802/zigbee-herdsman-converters 19.44.0 → 19.44.2

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 (1609) hide show
  1. package/dist/converters/actions.d.ts +36 -0
  2. package/dist/converters/actions.d.ts.map +1 -0
  3. package/dist/converters/actions.js +137 -0
  4. package/dist/converters/actions.js.map +1 -0
  5. package/dist/converters/fromZigbee.d.ts +293 -0
  6. package/dist/converters/fromZigbee.d.ts.map +1 -0
  7. package/dist/converters/fromZigbee.js +5192 -0
  8. package/dist/converters/fromZigbee.js.map +1 -0
  9. package/dist/converters/toZigbee.d.ts +235 -0
  10. package/dist/converters/toZigbee.d.ts.map +1 -0
  11. package/dist/converters/toZigbee.js +4577 -0
  12. package/dist/converters/toZigbee.js.map +1 -0
  13. package/dist/devices/ITCommander.d.ts +3 -0
  14. package/dist/devices/ITCommander.d.ts.map +1 -0
  15. package/dist/devices/ITCommander.js +73 -0
  16. package/dist/devices/ITCommander.js.map +1 -0
  17. package/dist/devices/acova.d.ts +3 -0
  18. package/dist/devices/acova.d.ts.map +1 -0
  19. package/dist/devices/acova.js +124 -0
  20. package/dist/devices/acova.js.map +1 -0
  21. package/dist/devices/acuity_brands_lighting.d.ts +3 -0
  22. package/dist/devices/acuity_brands_lighting.d.ts.map +1 -0
  23. package/dist/devices/acuity_brands_lighting.js +61 -0
  24. package/dist/devices/acuity_brands_lighting.js.map +1 -0
  25. package/dist/devices/adeo.d.ts +3 -0
  26. package/dist/devices/adeo.d.ts.map +1 -0
  27. package/dist/devices/adeo.js +518 -0
  28. package/dist/devices/adeo.js.map +1 -0
  29. package/dist/devices/adurosmart.d.ts +3 -0
  30. package/dist/devices/adurosmart.d.ts.map +1 -0
  31. package/dist/devices/adurosmart.js +235 -0
  32. package/dist/devices/adurosmart.js.map +1 -0
  33. package/dist/devices/aeotec.d.ts +3 -0
  34. package/dist/devices/aeotec.d.ts.map +1 -0
  35. package/dist/devices/aeotec.js +95 -0
  36. package/dist/devices/aeotec.js.map +1 -0
  37. package/dist/devices/airam.d.ts +3 -0
  38. package/dist/devices/airam.d.ts.map +1 -0
  39. package/dist/devices/airam.js +102 -0
  40. package/dist/devices/airam.js.map +1 -0
  41. package/dist/devices/airzone_aidoo.d.ts +3 -0
  42. package/dist/devices/airzone_aidoo.d.ts.map +1 -0
  43. package/dist/devices/airzone_aidoo.js +77 -0
  44. package/dist/devices/airzone_aidoo.js.map +1 -0
  45. package/dist/devices/ajax_online.d.ts +3 -0
  46. package/dist/devices/ajax_online.d.ts.map +1 -0
  47. package/dist/devices/ajax_online.js +83 -0
  48. package/dist/devices/ajax_online.js.map +1 -0
  49. package/dist/devices/akuvox.d.ts +3 -0
  50. package/dist/devices/akuvox.d.ts.map +1 -0
  51. package/dist/devices/akuvox.js +65 -0
  52. package/dist/devices/akuvox.js.map +1 -0
  53. package/dist/devices/alchemy.d.ts +3 -0
  54. package/dist/devices/alchemy.d.ts.map +1 -0
  55. package/dist/devices/alchemy.js +54 -0
  56. package/dist/devices/alchemy.js.map +1 -0
  57. package/dist/devices/aldi.d.ts +3 -0
  58. package/dist/devices/aldi.d.ts.map +1 -0
  59. package/dist/devices/aldi.js +54 -0
  60. package/dist/devices/aldi.js.map +1 -0
  61. package/dist/devices/alecto.d.ts +3 -0
  62. package/dist/devices/alecto.d.ts.map +1 -0
  63. package/dist/devices/alecto.js +91 -0
  64. package/dist/devices/alecto.js.map +1 -0
  65. package/dist/devices/amina.d.ts +3 -0
  66. package/dist/devices/amina.d.ts.map +1 -0
  67. package/dist/devices/amina.js +360 -0
  68. package/dist/devices/amina.js.map +1 -0
  69. package/dist/devices/anchor.d.ts +3 -0
  70. package/dist/devices/anchor.d.ts.map +1 -0
  71. package/dist/devices/anchor.js +47 -0
  72. package/dist/devices/anchor.js.map +1 -0
  73. package/dist/devices/atlantic.d.ts +3 -0
  74. package/dist/devices/atlantic.d.ts.map +1 -0
  75. package/dist/devices/atlantic.js +147 -0
  76. package/dist/devices/atlantic.js.map +1 -0
  77. package/dist/devices/atsmart.d.ts +3 -0
  78. package/dist/devices/atsmart.d.ts.map +1 -0
  79. package/dist/devices/atsmart.js +47 -0
  80. package/dist/devices/atsmart.js.map +1 -0
  81. package/dist/devices/aubess.d.ts +3 -0
  82. package/dist/devices/aubess.d.ts.map +1 -0
  83. package/dist/devices/aubess.js +60 -0
  84. package/dist/devices/aubess.js.map +1 -0
  85. package/dist/devices/aurora_lighting.d.ts +3 -0
  86. package/dist/devices/aurora_lighting.d.ts.map +1 -0
  87. package/dist/devices/aurora_lighting.js +347 -0
  88. package/dist/devices/aurora_lighting.js.map +1 -0
  89. package/dist/devices/automaton.d.ts +3 -0
  90. package/dist/devices/automaton.d.ts.map +1 -0
  91. package/dist/devices/automaton.js +64 -0
  92. package/dist/devices/automaton.js.map +1 -0
  93. package/dist/devices/avatto.d.ts +3 -0
  94. package/dist/devices/avatto.d.ts.map +1 -0
  95. package/dist/devices/avatto.js +635 -0
  96. package/dist/devices/avatto.js.map +1 -0
  97. package/dist/devices/awox.d.ts +3 -0
  98. package/dist/devices/awox.d.ts.map +1 -0
  99. package/dist/devices/awox.js +352 -0
  100. package/dist/devices/awox.js.map +1 -0
  101. package/dist/devices/axis.d.ts +3 -0
  102. package/dist/devices/axis.d.ts.map +1 -0
  103. package/dist/devices/axis.js +59 -0
  104. package/dist/devices/axis.js.map +1 -0
  105. package/dist/devices/bacchus.d.ts +3 -0
  106. package/dist/devices/bacchus.d.ts.map +1 -0
  107. package/dist/devices/bacchus.js +902 -0
  108. package/dist/devices/bacchus.js.map +1 -0
  109. package/dist/devices/bankamp.d.ts +3 -0
  110. package/dist/devices/bankamp.d.ts.map +1 -0
  111. package/dist/devices/bankamp.js +47 -0
  112. package/dist/devices/bankamp.js.map +1 -0
  113. package/dist/devices/bega.d.ts +3 -0
  114. package/dist/devices/bega.d.ts.map +1 -0
  115. package/dist/devices/bega.js +68 -0
  116. package/dist/devices/bega.js.map +1 -0
  117. package/dist/devices/belkin.d.ts +3 -0
  118. package/dist/devices/belkin.d.ts.map +1 -0
  119. package/dist/devices/belkin.js +47 -0
  120. package/dist/devices/belkin.js.map +1 -0
  121. package/dist/devices/bitron.d.ts +3 -0
  122. package/dist/devices/bitron.d.ts.map +1 -0
  123. package/dist/devices/bitron.js +357 -0
  124. package/dist/devices/bitron.js.map +1 -0
  125. package/dist/devices/bituo_technik.d.ts +3 -0
  126. package/dist/devices/bituo_technik.d.ts.map +1 -0
  127. package/dist/devices/bituo_technik.js +487 -0
  128. package/dist/devices/bituo_technik.js.map +1 -0
  129. package/dist/devices/blaupunkt.d.ts +3 -0
  130. package/dist/devices/blaupunkt.d.ts.map +1 -0
  131. package/dist/devices/blaupunkt.js +64 -0
  132. package/dist/devices/blaupunkt.js.map +1 -0
  133. package/dist/devices/blitzwolf.d.ts +3 -0
  134. package/dist/devices/blitzwolf.d.ts.map +1 -0
  135. package/dist/devices/blitzwolf.js +77 -0
  136. package/dist/devices/blitzwolf.js.map +1 -0
  137. package/dist/devices/bosch.d.ts +3 -0
  138. package/dist/devices/bosch.d.ts.map +1 -0
  139. package/dist/devices/bosch.js +1381 -0
  140. package/dist/devices/bosch.js.map +1 -0
  141. package/dist/devices/bouffalo_lab.d.ts +3 -0
  142. package/dist/devices/bouffalo_lab.d.ts.map +1 -0
  143. package/dist/devices/bouffalo_lab.js +47 -0
  144. package/dist/devices/bouffalo_lab.js.map +1 -0
  145. package/dist/devices/box.d.ts +3 -0
  146. package/dist/devices/box.d.ts.map +1 -0
  147. package/dist/devices/box.js +370 -0
  148. package/dist/devices/box.js.map +1 -0
  149. package/dist/devices/brimate.d.ts +3 -0
  150. package/dist/devices/brimate.d.ts.map +1 -0
  151. package/dist/devices/brimate.js +51 -0
  152. package/dist/devices/brimate.js.map +1 -0
  153. package/dist/devices/brun_holding.d.ts +3 -0
  154. package/dist/devices/brun_holding.d.ts.map +1 -0
  155. package/dist/devices/brun_holding.js +59 -0
  156. package/dist/devices/brun_holding.js.map +1 -0
  157. package/dist/devices/bseed.d.ts +3 -0
  158. package/dist/devices/bseed.d.ts.map +1 -0
  159. package/dist/devices/bseed.js +53 -0
  160. package/dist/devices/bseed.js.map +1 -0
  161. package/dist/devices/bticino.d.ts +3 -0
  162. package/dist/devices/bticino.d.ts.map +1 -0
  163. package/dist/devices/bticino.js +111 -0
  164. package/dist/devices/bticino.js.map +1 -0
  165. package/dist/devices/bubendorff.d.ts +3 -0
  166. package/dist/devices/bubendorff.d.ts.map +1 -0
  167. package/dist/devices/bubendorff.js +47 -0
  168. package/dist/devices/bubendorff.js.map +1 -0
  169. package/dist/devices/busch_jaeger.d.ts +3 -0
  170. package/dist/devices/busch_jaeger.d.ts.map +1 -0
  171. package/dist/devices/busch_jaeger.js +163 -0
  172. package/dist/devices/busch_jaeger.js.map +1 -0
  173. package/dist/devices/byun.d.ts +3 -0
  174. package/dist/devices/byun.d.ts.map +1 -0
  175. package/dist/devices/byun.js +60 -0
  176. package/dist/devices/byun.js.map +1 -0
  177. package/dist/devices/calex.d.ts +3 -0
  178. package/dist/devices/calex.d.ts.map +1 -0
  179. package/dist/devices/calex.js +87 -0
  180. package/dist/devices/calex.js.map +1 -0
  181. package/dist/devices/candeo.d.ts +3 -0
  182. package/dist/devices/candeo.d.ts.map +1 -0
  183. package/dist/devices/candeo.js +887 -0
  184. package/dist/devices/candeo.js.map +1 -0
  185. package/dist/devices/casaia.d.ts +3 -0
  186. package/dist/devices/casaia.d.ts.map +1 -0
  187. package/dist/devices/casaia.js +95 -0
  188. package/dist/devices/casaia.js.map +1 -0
  189. package/dist/devices/cel.d.ts +3 -0
  190. package/dist/devices/cel.d.ts.map +1 -0
  191. package/dist/devices/cel.js +49 -0
  192. package/dist/devices/cel.js.map +1 -0
  193. package/dist/devices/centralite.d.ts +28 -0
  194. package/dist/devices/centralite.d.ts.map +1 -0
  195. package/dist/devices/centralite.js +440 -0
  196. package/dist/devices/centralite.js.map +1 -0
  197. package/dist/devices/chacon.d.ts +3 -0
  198. package/dist/devices/chacon.d.ts.map +1 -0
  199. package/dist/devices/chacon.js +57 -0
  200. package/dist/devices/chacon.js.map +1 -0
  201. package/dist/devices/cleode.d.ts +3 -0
  202. package/dist/devices/cleode.d.ts.map +1 -0
  203. package/dist/devices/cleode.js +47 -0
  204. package/dist/devices/cleode.js.map +1 -0
  205. package/dist/devices/cleverio.d.ts +3 -0
  206. package/dist/devices/cleverio.d.ts.map +1 -0
  207. package/dist/devices/cleverio.js +74 -0
  208. package/dist/devices/cleverio.js.map +1 -0
  209. package/dist/devices/climax.d.ts +3 -0
  210. package/dist/devices/climax.d.ts.map +1 -0
  211. package/dist/devices/climax.js +184 -0
  212. package/dist/devices/climax.js.map +1 -0
  213. package/dist/devices/commercial_electric.d.ts +3 -0
  214. package/dist/devices/commercial_electric.d.ts.map +1 -0
  215. package/dist/devices/commercial_electric.js +47 -0
  216. package/dist/devices/commercial_electric.js.map +1 -0
  217. package/dist/devices/cree.d.ts +3 -0
  218. package/dist/devices/cree.d.ts.map +1 -0
  219. package/dist/devices/cree.js +47 -0
  220. package/dist/devices/cree.js.map +1 -0
  221. package/dist/devices/ctm.d.ts +3 -0
  222. package/dist/devices/ctm.d.ts.map +1 -0
  223. package/dist/devices/ctm.js +1411 -0
  224. package/dist/devices/ctm.js.map +1 -0
  225. package/dist/devices/current_products_corp.d.ts +3 -0
  226. package/dist/devices/current_products_corp.d.ts.map +1 -0
  227. package/dist/devices/current_products_corp.js +60 -0
  228. package/dist/devices/current_products_corp.js.map +1 -0
  229. package/dist/devices/custom_devices_diy.d.ts +3 -0
  230. package/dist/devices/custom_devices_diy.d.ts.map +1 -0
  231. package/dist/devices/custom_devices_diy.js +1302 -0
  232. package/dist/devices/custom_devices_diy.js.map +1 -0
  233. package/dist/devices/cwd.d.ts +3 -0
  234. package/dist/devices/cwd.d.ts.map +1 -0
  235. package/dist/devices/cwd.js +47 -0
  236. package/dist/devices/cwd.js.map +1 -0
  237. package/dist/devices/cy_lighting.d.ts +3 -0
  238. package/dist/devices/cy_lighting.d.ts.map +1 -0
  239. package/dist/devices/cy_lighting.js +47 -0
  240. package/dist/devices/cy_lighting.js.map +1 -0
  241. package/dist/devices/danalock.d.ts +3 -0
  242. package/dist/devices/danalock.d.ts.map +1 -0
  243. package/dist/devices/danalock.js +61 -0
  244. package/dist/devices/danalock.js.map +1 -0
  245. package/dist/devices/danfoss.d.ts +3 -0
  246. package/dist/devices/danfoss.d.ts.map +1 -0
  247. package/dist/devices/danfoss.js +793 -0
  248. package/dist/devices/danfoss.js.map +1 -0
  249. package/dist/devices/databyte.d.ts +3 -0
  250. package/dist/devices/databyte.d.ts.map +1 -0
  251. package/dist/devices/databyte.js +90 -0
  252. package/dist/devices/databyte.js.map +1 -0
  253. package/dist/devices/datek.d.ts +3 -0
  254. package/dist/devices/datek.d.ts.map +1 -0
  255. package/dist/devices/datek.js +303 -0
  256. package/dist/devices/datek.js.map +1 -0
  257. package/dist/devices/dawon_dns.d.ts +3 -0
  258. package/dist/devices/dawon_dns.d.ts.map +1 -0
  259. package/dist/devices/dawon_dns.js +314 -0
  260. package/dist/devices/dawon_dns.js.map +1 -0
  261. package/dist/devices/develco.d.ts +3 -0
  262. package/dist/devices/develco.d.ts.map +1 -0
  263. package/dist/devices/develco.js +1113 -0
  264. package/dist/devices/develco.js.map +1 -0
  265. package/dist/devices/digi.d.ts +3 -0
  266. package/dist/devices/digi.d.ts.map +1 -0
  267. package/dist/devices/digi.js +24 -0
  268. package/dist/devices/digi.js.map +1 -0
  269. package/dist/devices/direct_signs.d.ts +3 -0
  270. package/dist/devices/direct_signs.d.ts.map +1 -0
  271. package/dist/devices/direct_signs.js +47 -0
  272. package/dist/devices/direct_signs.js.map +1 -0
  273. package/dist/devices/diyruz.d.ts +3 -0
  274. package/dist/devices/diyruz.d.ts.map +1 -0
  275. package/dist/devices/diyruz.js +397 -0
  276. package/dist/devices/diyruz.js.map +1 -0
  277. package/dist/devices/dlink.d.ts +3 -0
  278. package/dist/devices/dlink.d.ts.map +1 -0
  279. package/dist/devices/dlink.js +72 -0
  280. package/dist/devices/dlink.js.map +1 -0
  281. package/dist/devices/dnake.d.ts +3 -0
  282. package/dist/devices/dnake.d.ts.map +1 -0
  283. package/dist/devices/dnake.js +47 -0
  284. package/dist/devices/dnake.js.map +1 -0
  285. package/dist/devices/domraem.d.ts +3 -0
  286. package/dist/devices/domraem.d.ts.map +1 -0
  287. package/dist/devices/domraem.js +75 -0
  288. package/dist/devices/domraem.js.map +1 -0
  289. package/dist/devices/dowsing_reynolds.d.ts +3 -0
  290. package/dist/devices/dowsing_reynolds.d.ts.map +1 -0
  291. package/dist/devices/dowsing_reynolds.js +47 -0
  292. package/dist/devices/dowsing_reynolds.js.map +1 -0
  293. package/dist/devices/dqsmart.d.ts +3 -0
  294. package/dist/devices/dqsmart.d.ts.map +1 -0
  295. package/dist/devices/dqsmart.js +50 -0
  296. package/dist/devices/dqsmart.js.map +1 -0
  297. package/dist/devices/dresden_elektronik.d.ts +3 -0
  298. package/dist/devices/dresden_elektronik.d.ts.map +1 -0
  299. package/dist/devices/dresden_elektronik.js +167 -0
  300. package/dist/devices/dresden_elektronik.js.map +1 -0
  301. package/dist/devices/easyaccess.d.ts +3 -0
  302. package/dist/devices/easyaccess.d.ts.map +1 -0
  303. package/dist/devices/easyaccess.js +67 -0
  304. package/dist/devices/easyaccess.js.map +1 -0
  305. package/dist/devices/easyiot.d.ts +3 -0
  306. package/dist/devices/easyiot.d.ts.map +1 -0
  307. package/dist/devices/easyiot.js +359 -0
  308. package/dist/devices/easyiot.js.map +1 -0
  309. package/dist/devices/eatonhalo_led.d.ts +3 -0
  310. package/dist/devices/eatonhalo_led.d.ts.map +1 -0
  311. package/dist/devices/eatonhalo_led.js +47 -0
  312. package/dist/devices/eatonhalo_led.js.map +1 -0
  313. package/dist/devices/echostar.d.ts +3 -0
  314. package/dist/devices/echostar.d.ts.map +1 -0
  315. package/dist/devices/echostar.js +61 -0
  316. package/dist/devices/echostar.js.map +1 -0
  317. package/dist/devices/ecodim.d.ts +3 -0
  318. package/dist/devices/ecodim.d.ts.map +1 -0
  319. package/dist/devices/ecodim.js +274 -0
  320. package/dist/devices/ecodim.js.map +1 -0
  321. package/dist/devices/ecolink.d.ts +3 -0
  322. package/dist/devices/ecolink.d.ts.map +1 -0
  323. package/dist/devices/ecolink.js +57 -0
  324. package/dist/devices/ecolink.js.map +1 -0
  325. package/dist/devices/ecosmart.d.ts +3 -0
  326. package/dist/devices/ecosmart.d.ts.map +1 -0
  327. package/dist/devices/ecosmart.js +115 -0
  328. package/dist/devices/ecosmart.js.map +1 -0
  329. package/dist/devices/ecozy.d.ts +3 -0
  330. package/dist/devices/ecozy.d.ts.map +1 -0
  331. package/dist/devices/ecozy.js +85 -0
  332. package/dist/devices/ecozy.js.map +1 -0
  333. package/dist/devices/edp.d.ts +3 -0
  334. package/dist/devices/edp.d.ts.map +1 -0
  335. package/dist/devices/edp.js +70 -0
  336. package/dist/devices/edp.js.map +1 -0
  337. package/dist/devices/efekta.d.ts +3 -0
  338. package/dist/devices/efekta.d.ts.map +1 -0
  339. package/dist/devices/efekta.js +8230 -0
  340. package/dist/devices/efekta.js.map +1 -0
  341. package/dist/devices/eglo.d.ts +3 -0
  342. package/dist/devices/eglo.d.ts.map +1 -0
  343. package/dist/devices/eglo.js +142 -0
  344. package/dist/devices/eglo.js.map +1 -0
  345. package/dist/devices/elko.d.ts +27 -0
  346. package/dist/devices/elko.d.ts.map +1 -0
  347. package/dist/devices/elko.js +306 -0
  348. package/dist/devices/elko.js.map +1 -0
  349. package/dist/devices/enbrighten.d.ts +3 -0
  350. package/dist/devices/enbrighten.d.ts.map +1 -0
  351. package/dist/devices/enbrighten.js +152 -0
  352. package/dist/devices/enbrighten.js.map +1 -0
  353. package/dist/devices/engo.d.ts +3 -0
  354. package/dist/devices/engo.d.ts.map +1 -0
  355. package/dist/devices/engo.js +1041 -0
  356. package/dist/devices/engo.js.map +1 -0
  357. package/dist/devices/enkin.d.ts +3 -0
  358. package/dist/devices/enkin.d.ts.map +1 -0
  359. package/dist/devices/enkin.js +14 -0
  360. package/dist/devices/enkin.js.map +1 -0
  361. package/dist/devices/enocean.d.ts +3 -0
  362. package/dist/devices/enocean.d.ts.map +1 -0
  363. package/dist/devices/enocean.js +150 -0
  364. package/dist/devices/enocean.js.map +1 -0
  365. package/dist/devices/envilar.d.ts +3 -0
  366. package/dist/devices/envilar.d.ts.map +1 -0
  367. package/dist/devices/envilar.js +131 -0
  368. package/dist/devices/envilar.js.map +1 -0
  369. package/dist/devices/espressif.d.ts +3 -0
  370. package/dist/devices/espressif.d.ts.map +1 -0
  371. package/dist/devices/espressif.js +61 -0
  372. package/dist/devices/espressif.js.map +1 -0
  373. package/dist/devices/essentialb.d.ts +3 -0
  374. package/dist/devices/essentialb.d.ts.map +1 -0
  375. package/dist/devices/essentialb.js +133 -0
  376. package/dist/devices/essentialb.js.map +1 -0
  377. package/dist/devices/essentials.d.ts +3 -0
  378. package/dist/devices/essentials.d.ts.map +1 -0
  379. package/dist/devices/essentials.js +150 -0
  380. package/dist/devices/essentials.js.map +1 -0
  381. package/dist/devices/eucontrols.d.ts +3 -0
  382. package/dist/devices/eucontrols.d.ts.map +1 -0
  383. package/dist/devices/eucontrols.js +47 -0
  384. package/dist/devices/eucontrols.js.map +1 -0
  385. package/dist/devices/eurotronic.d.ts +3 -0
  386. package/dist/devices/eurotronic.d.ts.map +1 -0
  387. package/dist/devices/eurotronic.js +278 -0
  388. package/dist/devices/eurotronic.js.map +1 -0
  389. package/dist/devices/evanell.d.ts +3 -0
  390. package/dist/devices/evanell.d.ts.map +1 -0
  391. package/dist/devices/evanell.js +66 -0
  392. package/dist/devices/evanell.js.map +1 -0
  393. package/dist/devices/evn.d.ts +3 -0
  394. package/dist/devices/evn.d.ts.map +1 -0
  395. package/dist/devices/evn.js +97 -0
  396. package/dist/devices/evn.js.map +1 -0
  397. package/dist/devices/evology.d.ts +3 -0
  398. package/dist/devices/evology.d.ts.map +1 -0
  399. package/dist/devices/evology.js +60 -0
  400. package/dist/devices/evology.js.map +1 -0
  401. package/dist/devices/evvr.d.ts +3 -0
  402. package/dist/devices/evvr.d.ts.map +1 -0
  403. package/dist/devices/evvr.js +47 -0
  404. package/dist/devices/evvr.js.map +1 -0
  405. package/dist/devices/ewelink.d.ts +3 -0
  406. package/dist/devices/ewelink.d.ts.map +1 -0
  407. package/dist/devices/ewelink.js +326 -0
  408. package/dist/devices/ewelink.js.map +1 -0
  409. package/dist/devices/ezex.d.ts +3 -0
  410. package/dist/devices/ezex.d.ts.map +1 -0
  411. package/dist/devices/ezex.js +47 -0
  412. package/dist/devices/ezex.js.map +1 -0
  413. package/dist/devices/ezviz.d.ts +3 -0
  414. package/dist/devices/ezviz.d.ts.map +1 -0
  415. package/dist/devices/ezviz.js +47 -0
  416. package/dist/devices/ezviz.js.map +1 -0
  417. package/dist/devices/fantem.d.ts +3 -0
  418. package/dist/devices/fantem.d.ts.map +1 -0
  419. package/dist/devices/fantem.js +112 -0
  420. package/dist/devices/fantem.js.map +1 -0
  421. package/dist/devices/feibit.d.ts +3 -0
  422. package/dist/devices/feibit.d.ts.map +1 -0
  423. package/dist/devices/feibit.js +335 -0
  424. package/dist/devices/feibit.js.map +1 -0
  425. package/dist/devices/fireangel.d.ts +3 -0
  426. package/dist/devices/fireangel.d.ts.map +1 -0
  427. package/dist/devices/fireangel.js +96 -0
  428. package/dist/devices/fireangel.js.map +1 -0
  429. package/dist/devices/frankever.d.ts +3 -0
  430. package/dist/devices/frankever.d.ts.map +1 -0
  431. package/dist/devices/frankever.js +67 -0
  432. package/dist/devices/frankever.js.map +1 -0
  433. package/dist/devices/frient.d.ts +3 -0
  434. package/dist/devices/frient.d.ts.map +1 -0
  435. package/dist/devices/frient.js +84 -0
  436. package/dist/devices/frient.js.map +1 -0
  437. package/dist/devices/futurehome.d.ts +3 -0
  438. package/dist/devices/futurehome.d.ts.map +1 -0
  439. package/dist/devices/futurehome.js +137 -0
  440. package/dist/devices/futurehome.js.map +1 -0
  441. package/dist/devices/ge.d.ts +3 -0
  442. package/dist/devices/ge.d.ts.map +1 -0
  443. package/dist/devices/ge.js +130 -0
  444. package/dist/devices/ge.js.map +1 -0
  445. package/dist/devices/gewiss.d.ts +3 -0
  446. package/dist/devices/gewiss.d.ts.map +1 -0
  447. package/dist/devices/gewiss.js +148 -0
  448. package/dist/devices/gewiss.js.map +1 -0
  449. package/dist/devices/gidealed.d.ts +3 -0
  450. package/dist/devices/gidealed.d.ts.map +1 -0
  451. package/dist/devices/gidealed.js +47 -0
  452. package/dist/devices/gidealed.js.map +1 -0
  453. package/dist/devices/giderwel.d.ts +3 -0
  454. package/dist/devices/giderwel.d.ts.map +1 -0
  455. package/dist/devices/giderwel.js +47 -0
  456. package/dist/devices/giderwel.js.map +1 -0
  457. package/dist/devices/giex.d.ts +3 -0
  458. package/dist/devices/giex.d.ts.map +1 -0
  459. package/dist/devices/giex.js +114 -0
  460. package/dist/devices/giex.js.map +1 -0
  461. package/dist/devices/girier.d.ts +3 -0
  462. package/dist/devices/girier.d.ts.map +1 -0
  463. package/dist/devices/girier.js +51 -0
  464. package/dist/devices/girier.js.map +1 -0
  465. package/dist/devices/gledopto.d.ts +3 -0
  466. package/dist/devices/gledopto.d.ts.map +1 -0
  467. package/dist/devices/gledopto.js +1395 -0
  468. package/dist/devices/gledopto.js.map +1 -0
  469. package/dist/devices/gmmts.d.ts +3 -0
  470. package/dist/devices/gmmts.d.ts.map +1 -0
  471. package/dist/devices/gmmts.js +2267 -0
  472. package/dist/devices/gmmts.js.map +1 -0
  473. package/dist/devices/gmy.d.ts +3 -0
  474. package/dist/devices/gmy.d.ts.map +1 -0
  475. package/dist/devices/gmy.js +47 -0
  476. package/dist/devices/gmy.js.map +1 -0
  477. package/dist/devices/gs.d.ts +3 -0
  478. package/dist/devices/gs.d.ts.map +1 -0
  479. package/dist/devices/gs.js +121 -0
  480. package/dist/devices/gs.js.map +1 -0
  481. package/dist/devices/gumax.d.ts +3 -0
  482. package/dist/devices/gumax.d.ts.map +1 -0
  483. package/dist/devices/gumax.js +47 -0
  484. package/dist/devices/gumax.js.map +1 -0
  485. package/dist/devices/halemeier.d.ts +3 -0
  486. package/dist/devices/halemeier.d.ts.map +1 -0
  487. package/dist/devices/halemeier.js +142 -0
  488. package/dist/devices/halemeier.js.map +1 -0
  489. package/dist/devices/hampton_bay.d.ts +3 -0
  490. package/dist/devices/hampton_bay.d.ts.map +1 -0
  491. package/dist/devices/hampton_bay.js +68 -0
  492. package/dist/devices/hampton_bay.js.map +1 -0
  493. package/dist/devices/heatit.d.ts +3 -0
  494. package/dist/devices/heatit.d.ts.map +1 -0
  495. package/dist/devices/heatit.js +47 -0
  496. package/dist/devices/heatit.js.map +1 -0
  497. package/dist/devices/heiman.d.ts +3 -0
  498. package/dist/devices/heiman.d.ts.map +1 -0
  499. package/dist/devices/heiman.js +2092 -0
  500. package/dist/devices/heiman.js.map +1 -0
  501. package/dist/devices/heimgard_technologies.d.ts +3 -0
  502. package/dist/devices/heimgard_technologies.d.ts.map +1 -0
  503. package/dist/devices/heimgard_technologies.js +189 -0
  504. package/dist/devices/heimgard_technologies.js.map +1 -0
  505. package/dist/devices/hej.d.ts +3 -0
  506. package/dist/devices/hej.d.ts.map +1 -0
  507. package/dist/devices/hej.js +126 -0
  508. package/dist/devices/hej.js.map +1 -0
  509. package/dist/devices/hfh.d.ts +3 -0
  510. package/dist/devices/hfh.d.ts.map +1 -0
  511. package/dist/devices/hfh.js +47 -0
  512. package/dist/devices/hfh.js.map +1 -0
  513. package/dist/devices/hilux.d.ts +3 -0
  514. package/dist/devices/hilux.d.ts.map +1 -0
  515. package/dist/devices/hilux.js +54 -0
  516. package/dist/devices/hilux.js.map +1 -0
  517. package/dist/devices/hive.d.ts +3 -0
  518. package/dist/devices/hive.d.ts.map +1 -0
  519. package/dist/devices/hive.js +798 -0
  520. package/dist/devices/hive.js.map +1 -0
  521. package/dist/devices/hoftronic.d.ts +3 -0
  522. package/dist/devices/hoftronic.d.ts.map +1 -0
  523. package/dist/devices/hoftronic.js +56 -0
  524. package/dist/devices/hoftronic.js.map +1 -0
  525. package/dist/devices/homeseer.d.ts +3 -0
  526. package/dist/devices/homeseer.d.ts.map +1 -0
  527. package/dist/devices/homeseer.js +53 -0
  528. package/dist/devices/homeseer.js.map +1 -0
  529. package/dist/devices/hommyn.d.ts +3 -0
  530. package/dist/devices/hommyn.d.ts.map +1 -0
  531. package/dist/devices/hommyn.js +60 -0
  532. package/dist/devices/hommyn.js.map +1 -0
  533. package/dist/devices/honyar.d.ts +3 -0
  534. package/dist/devices/honyar.d.ts.map +1 -0
  535. package/dist/devices/honyar.js +167 -0
  536. package/dist/devices/honyar.js.map +1 -0
  537. package/dist/devices/hornbach.d.ts +3 -0
  538. package/dist/devices/hornbach.d.ts.map +1 -0
  539. package/dist/devices/hornbach.js +138 -0
  540. package/dist/devices/hornbach.js.map +1 -0
  541. package/dist/devices/hzc_electric.d.ts +3 -0
  542. package/dist/devices/hzc_electric.d.ts.map +1 -0
  543. package/dist/devices/hzc_electric.js +102 -0
  544. package/dist/devices/hzc_electric.js.map +1 -0
  545. package/dist/devices/icasa.d.ts +3 -0
  546. package/dist/devices/icasa.d.ts.map +1 -0
  547. package/dist/devices/icasa.js +174 -0
  548. package/dist/devices/icasa.js.map +1 -0
  549. package/dist/devices/idinio.d.ts +3 -0
  550. package/dist/devices/idinio.d.ts.map +1 -0
  551. package/dist/devices/idinio.js +47 -0
  552. package/dist/devices/idinio.js.map +1 -0
  553. package/dist/devices/ihorn.d.ts +3 -0
  554. package/dist/devices/ihorn.d.ts.map +1 -0
  555. package/dist/devices/ihorn.js +105 -0
  556. package/dist/devices/ihorn.js.map +1 -0
  557. package/dist/devices/ikea.d.ts +3 -0
  558. package/dist/devices/ikea.d.ts.map +1 -0
  559. package/dist/devices/ikea.js +1241 -0
  560. package/dist/devices/ikea.js.map +1 -0
  561. package/dist/devices/ilightsin.d.ts +3 -0
  562. package/dist/devices/ilightsin.d.ts.map +1 -0
  563. package/dist/devices/ilightsin.js +59 -0
  564. package/dist/devices/ilightsin.js.map +1 -0
  565. package/dist/devices/iluminize.d.ts +3 -0
  566. package/dist/devices/iluminize.d.ts.map +1 -0
  567. package/dist/devices/iluminize.js +385 -0
  568. package/dist/devices/iluminize.js.map +1 -0
  569. package/dist/devices/ilux.d.ts +3 -0
  570. package/dist/devices/ilux.d.ts.map +1 -0
  571. package/dist/devices/ilux.js +47 -0
  572. package/dist/devices/ilux.js.map +1 -0
  573. package/dist/devices/imhotepcreation.d.ts +3 -0
  574. package/dist/devices/imhotepcreation.d.ts.map +1 -0
  575. package/dist/devices/imhotepcreation.js +240 -0
  576. package/dist/devices/imhotepcreation.js.map +1 -0
  577. package/dist/devices/immax.d.ts +3 -0
  578. package/dist/devices/immax.d.ts.map +1 -0
  579. package/dist/devices/immax.js +471 -0
  580. package/dist/devices/immax.js.map +1 -0
  581. package/dist/devices/imou.d.ts +3 -0
  582. package/dist/devices/imou.d.ts.map +1 -0
  583. package/dist/devices/imou.js +109 -0
  584. package/dist/devices/imou.js.map +1 -0
  585. package/dist/devices/index.d.ts +4 -0
  586. package/dist/devices/index.d.ts.map +1 -0
  587. package/dist/devices/index.js +738 -0
  588. package/dist/devices/index.js.map +1 -0
  589. package/dist/devices/innr.d.ts +3 -0
  590. package/dist/devices/innr.d.ts.map +1 -0
  591. package/dist/devices/innr.js +1033 -0
  592. package/dist/devices/innr.js.map +1 -0
  593. package/dist/devices/inovelli.d.ts +3 -0
  594. package/dist/devices/inovelli.d.ts.map +1 -0
  595. package/dist/devices/inovelli.js +2474 -0
  596. package/dist/devices/inovelli.js.map +1 -0
  597. package/dist/devices/insta.d.ts +3 -0
  598. package/dist/devices/insta.d.ts.map +1 -0
  599. package/dist/devices/insta.js +182 -0
  600. package/dist/devices/insta.js.map +1 -0
  601. package/dist/devices/intuis.d.ts +3 -0
  602. package/dist/devices/intuis.d.ts.map +1 -0
  603. package/dist/devices/intuis.js +95 -0
  604. package/dist/devices/intuis.js.map +1 -0
  605. package/dist/devices/iolloi.d.ts +3 -0
  606. package/dist/devices/iolloi.d.ts.map +1 -0
  607. package/dist/devices/iolloi.js +48 -0
  608. package/dist/devices/iolloi.js.map +1 -0
  609. package/dist/devices/iotperfect.d.ts +3 -0
  610. package/dist/devices/iotperfect.d.ts.map +1 -0
  611. package/dist/devices/iotperfect.js +60 -0
  612. package/dist/devices/iotperfect.js.map +1 -0
  613. package/dist/devices/iris.d.ts +3 -0
  614. package/dist/devices/iris.d.ts.map +1 -0
  615. package/dist/devices/iris.js +208 -0
  616. package/dist/devices/iris.js.map +1 -0
  617. package/dist/devices/istar.d.ts +3 -0
  618. package/dist/devices/istar.d.ts.map +1 -0
  619. package/dist/devices/istar.js +61 -0
  620. package/dist/devices/istar.js.map +1 -0
  621. package/dist/devices/jasco.d.ts +3 -0
  622. package/dist/devices/jasco.d.ts.map +1 -0
  623. package/dist/devices/jasco.js +63 -0
  624. package/dist/devices/jasco.js.map +1 -0
  625. package/dist/devices/javis.d.ts +3 -0
  626. package/dist/devices/javis.d.ts.map +1 -0
  627. package/dist/devices/javis.js +77 -0
  628. package/dist/devices/javis.js.map +1 -0
  629. package/dist/devices/jethome.d.ts +3 -0
  630. package/dist/devices/jethome.d.ts.map +1 -0
  631. package/dist/devices/jethome.js +120 -0
  632. package/dist/devices/jethome.js.map +1 -0
  633. package/dist/devices/jiawen.d.ts +3 -0
  634. package/dist/devices/jiawen.d.ts.map +1 -0
  635. package/dist/devices/jiawen.js +54 -0
  636. package/dist/devices/jiawen.js.map +1 -0
  637. package/dist/devices/jumitech.d.ts +3 -0
  638. package/dist/devices/jumitech.d.ts.map +1 -0
  639. package/dist/devices/jumitech.js +47 -0
  640. package/dist/devices/jumitech.js.map +1 -0
  641. package/dist/devices/jxuan.d.ts +3 -0
  642. package/dist/devices/jxuan.d.ts.map +1 -0
  643. package/dist/devices/jxuan.js +85 -0
  644. package/dist/devices/jxuan.js.map +1 -0
  645. package/dist/devices/kami.d.ts +3 -0
  646. package/dist/devices/kami.d.ts.map +1 -0
  647. package/dist/devices/kami.js +51 -0
  648. package/dist/devices/kami.js.map +1 -0
  649. package/dist/devices/keen_home.d.ts +3 -0
  650. package/dist/devices/keen_home.d.ts.map +1 -0
  651. package/dist/devices/keen_home.js +155 -0
  652. package/dist/devices/keen_home.js.map +1 -0
  653. package/dist/devices/klikaanklikuit.d.ts +3 -0
  654. package/dist/devices/klikaanklikuit.d.ts.map +1 -0
  655. package/dist/devices/klikaanklikuit.js +54 -0
  656. package/dist/devices/klikaanklikuit.js.map +1 -0
  657. package/dist/devices/kmpcil.d.ts +3 -0
  658. package/dist/devices/kmpcil.d.ts.map +1 -0
  659. package/dist/devices/kmpcil.js +212 -0
  660. package/dist/devices/kmpcil.js.map +1 -0
  661. package/dist/devices/konke.d.ts +3 -0
  662. package/dist/devices/konke.d.ts.map +1 -0
  663. package/dist/devices/konke.js +207 -0
  664. package/dist/devices/konke.js.map +1 -0
  665. package/dist/devices/ksentry.d.ts +3 -0
  666. package/dist/devices/ksentry.d.ts.map +1 -0
  667. package/dist/devices/ksentry.js +47 -0
  668. package/dist/devices/ksentry.js.map +1 -0
  669. package/dist/devices/kurvia.d.ts +3 -0
  670. package/dist/devices/kurvia.d.ts.map +1 -0
  671. package/dist/devices/kurvia.js +49 -0
  672. package/dist/devices/kurvia.js.map +1 -0
  673. package/dist/devices/kwikset.d.ts +3 -0
  674. package/dist/devices/kwikset.d.ts.map +1 -0
  675. package/dist/devices/kwikset.js +153 -0
  676. package/dist/devices/kwikset.js.map +1 -0
  677. package/dist/devices/lanesto.d.ts +3 -0
  678. package/dist/devices/lanesto.d.ts.map +1 -0
  679. package/dist/devices/lanesto.js +47 -0
  680. package/dist/devices/lanesto.js.map +1 -0
  681. package/dist/devices/lds.d.ts +3 -0
  682. package/dist/devices/lds.d.ts.map +1 -0
  683. package/dist/devices/lds.js +54 -0
  684. package/dist/devices/lds.js.map +1 -0
  685. package/dist/devices/led_trading.d.ts +3 -0
  686. package/dist/devices/led_trading.d.ts.map +1 -0
  687. package/dist/devices/led_trading.js +108 -0
  688. package/dist/devices/led_trading.js.map +1 -0
  689. package/dist/devices/ledvance.d.ts +3 -0
  690. package/dist/devices/ledvance.d.ts.map +1 -0
  691. package/dist/devices/ledvance.js +407 -0
  692. package/dist/devices/ledvance.js.map +1 -0
  693. package/dist/devices/leedarson.d.ts +3 -0
  694. package/dist/devices/leedarson.d.ts.map +1 -0
  695. package/dist/devices/leedarson.js +180 -0
  696. package/dist/devices/leedarson.js.map +1 -0
  697. package/dist/devices/legrand.d.ts +3 -0
  698. package/dist/devices/legrand.d.ts.map +1 -0
  699. package/dist/devices/legrand.js +809 -0
  700. package/dist/devices/legrand.js.map +1 -0
  701. package/dist/devices/lellki.d.ts +3 -0
  702. package/dist/devices/lellki.d.ts.map +1 -0
  703. package/dist/devices/lellki.js +162 -0
  704. package/dist/devices/lellki.js.map +1 -0
  705. package/dist/devices/letsled.d.ts +3 -0
  706. package/dist/devices/letsled.d.ts.map +1 -0
  707. package/dist/devices/letsled.js +47 -0
  708. package/dist/devices/letsled.js.map +1 -0
  709. package/dist/devices/letv.d.ts +3 -0
  710. package/dist/devices/letv.d.ts.map +1 -0
  711. package/dist/devices/letv.js +86 -0
  712. package/dist/devices/letv.js.map +1 -0
  713. package/dist/devices/leviton.d.ts +3 -0
  714. package/dist/devices/leviton.d.ts.map +1 -0
  715. package/dist/devices/leviton.js +160 -0
  716. package/dist/devices/leviton.js.map +1 -0
  717. package/dist/devices/lg.d.ts +3 -0
  718. package/dist/devices/lg.d.ts.map +1 -0
  719. package/dist/devices/lg.js +61 -0
  720. package/dist/devices/lg.js.map +1 -0
  721. package/dist/devices/lidl.d.ts +3 -0
  722. package/dist/devices/lidl.d.ts.map +1 -0
  723. package/dist/devices/lidl.js +669 -0
  724. package/dist/devices/lidl.js.map +1 -0
  725. package/dist/devices/lifecontrol.d.ts +3 -0
  726. package/dist/devices/lifecontrol.d.ts.map +1 -0
  727. package/dist/devices/lifecontrol.js +141 -0
  728. package/dist/devices/lifecontrol.js.map +1 -0
  729. package/dist/devices/lightsolutions.d.ts +3 -0
  730. package/dist/devices/lightsolutions.d.ts.map +1 -0
  731. package/dist/devices/lightsolutions.js +90 -0
  732. package/dist/devices/lightsolutions.js.map +1 -0
  733. package/dist/devices/lincukoo.d.ts +3 -0
  734. package/dist/devices/lincukoo.d.ts.map +1 -0
  735. package/dist/devices/lincukoo.js +788 -0
  736. package/dist/devices/lincukoo.js.map +1 -0
  737. package/dist/devices/linkind.d.ts +3 -0
  738. package/dist/devices/linkind.d.ts.map +1 -0
  739. package/dist/devices/linkind.js +251 -0
  740. package/dist/devices/linkind.js.map +1 -0
  741. package/dist/devices/linptech.d.ts +3 -0
  742. package/dist/devices/linptech.d.ts.map +1 -0
  743. package/dist/devices/linptech.js +157 -0
  744. package/dist/devices/linptech.js.map +1 -0
  745. package/dist/devices/livingwise.d.ts +3 -0
  746. package/dist/devices/livingwise.d.ts.map +1 -0
  747. package/dist/devices/livingwise.js +115 -0
  748. package/dist/devices/livingwise.js.map +1 -0
  749. package/dist/devices/livolo.d.ts +3 -0
  750. package/dist/devices/livolo.d.ts.map +1 -0
  751. package/dist/devices/livolo.js +263 -0
  752. package/dist/devices/livolo.js.map +1 -0
  753. package/dist/devices/lixee.d.ts +3 -0
  754. package/dist/devices/lixee.d.ts.map +1 -0
  755. package/dist/devices/lixee.js +2038 -0
  756. package/dist/devices/lixee.js.map +1 -0
  757. package/dist/devices/lonsonho.d.ts +3 -0
  758. package/dist/devices/lonsonho.d.ts.map +1 -0
  759. package/dist/devices/lonsonho.js +310 -0
  760. package/dist/devices/lonsonho.js.map +1 -0
  761. package/dist/devices/ls.d.ts +3 -0
  762. package/dist/devices/ls.d.ts.map +1 -0
  763. package/dist/devices/ls.js +152 -0
  764. package/dist/devices/ls.js.map +1 -0
  765. package/dist/devices/lubeez.d.ts +3 -0
  766. package/dist/devices/lubeez.d.ts.map +1 -0
  767. package/dist/devices/lubeez.js +47 -0
  768. package/dist/devices/lubeez.js.map +1 -0
  769. package/dist/devices/lumi.d.ts +3 -0
  770. package/dist/devices/lumi.d.ts.map +1 -0
  771. package/dist/devices/lumi.js +5345 -0
  772. package/dist/devices/lumi.js.map +1 -0
  773. package/dist/devices/lupus.d.ts +3 -0
  774. package/dist/devices/lupus.d.ts.map +1 -0
  775. package/dist/devices/lupus.js +94 -0
  776. package/dist/devices/lupus.js.map +1 -0
  777. package/dist/devices/lutron.d.ts +3 -0
  778. package/dist/devices/lutron.d.ts.map +1 -0
  779. package/dist/devices/lutron.js +81 -0
  780. package/dist/devices/lutron.js.map +1 -0
  781. package/dist/devices/lux.d.ts +3 -0
  782. package/dist/devices/lux.d.ts.map +1 -0
  783. package/dist/devices/lux.js +87 -0
  784. package/dist/devices/lux.js.map +1 -0
  785. package/dist/devices/lytko.d.ts +3 -0
  786. package/dist/devices/lytko.d.ts.map +1 -0
  787. package/dist/devices/lytko.js +1809 -0
  788. package/dist/devices/lytko.js.map +1 -0
  789. package/dist/devices/m_elec.d.ts +3 -0
  790. package/dist/devices/m_elec.d.ts.map +1 -0
  791. package/dist/devices/m_elec.js +68 -0
  792. package/dist/devices/m_elec.js.map +1 -0
  793. package/dist/devices/makegood.d.ts +3 -0
  794. package/dist/devices/makegood.d.ts.map +1 -0
  795. package/dist/devices/makegood.js +117 -0
  796. package/dist/devices/makegood.js.map +1 -0
  797. package/dist/devices/matcall_bv.d.ts +3 -0
  798. package/dist/devices/matcall_bv.d.ts.map +1 -0
  799. package/dist/devices/matcall_bv.js +54 -0
  800. package/dist/devices/matcall_bv.js.map +1 -0
  801. package/dist/devices/mazda.d.ts +3 -0
  802. package/dist/devices/mazda.d.ts.map +1 -0
  803. package/dist/devices/mazda.js +146 -0
  804. package/dist/devices/mazda.js.map +1 -0
  805. package/dist/devices/meazon.d.ts +3 -0
  806. package/dist/devices/meazon.d.ts.map +1 -0
  807. package/dist/devices/meazon.js +95 -0
  808. package/dist/devices/meazon.js.map +1 -0
  809. package/dist/devices/mercator.d.ts +3 -0
  810. package/dist/devices/mercator.d.ts.map +1 -0
  811. package/dist/devices/mercator.js +242 -0
  812. package/dist/devices/mercator.js.map +1 -0
  813. package/dist/devices/miboxer.d.ts +3 -0
  814. package/dist/devices/miboxer.d.ts.map +1 -0
  815. package/dist/devices/miboxer.js +304 -0
  816. package/dist/devices/miboxer.js.map +1 -0
  817. package/dist/devices/micromatic.d.ts +3 -0
  818. package/dist/devices/micromatic.d.ts.map +1 -0
  819. package/dist/devices/micromatic.js +47 -0
  820. package/dist/devices/micromatic.js.map +1 -0
  821. package/dist/devices/mill.d.ts +3 -0
  822. package/dist/devices/mill.d.ts.map +1 -0
  823. package/dist/devices/mill.js +52 -0
  824. package/dist/devices/mill.js.map +1 -0
  825. package/dist/devices/mindy.d.ts +3 -0
  826. package/dist/devices/mindy.d.ts.map +1 -0
  827. package/dist/devices/mindy.js +379 -0
  828. package/dist/devices/mindy.js.map +1 -0
  829. package/dist/devices/modular.d.ts +3 -0
  830. package/dist/devices/modular.d.ts.map +1 -0
  831. package/dist/devices/modular.js +47 -0
  832. package/dist/devices/modular.js.map +1 -0
  833. package/dist/devices/moes.d.ts +3 -0
  834. package/dist/devices/moes.d.ts.map +1 -0
  835. package/dist/devices/moes.js +2368 -0
  836. package/dist/devices/moes.js.map +1 -0
  837. package/dist/devices/muller_licht.d.ts +3 -0
  838. package/dist/devices/muller_licht.d.ts.map +1 -0
  839. package/dist/devices/muller_licht.js +366 -0
  840. package/dist/devices/muller_licht.js.map +1 -0
  841. package/dist/devices/multir.d.ts +3 -0
  842. package/dist/devices/multir.d.ts.map +1 -0
  843. package/dist/devices/multir.js +152 -0
  844. package/dist/devices/multir.js.map +1 -0
  845. package/dist/devices/multiterm.d.ts +3 -0
  846. package/dist/devices/multiterm.d.ts.map +1 -0
  847. package/dist/devices/multiterm.js +119 -0
  848. package/dist/devices/multiterm.js.map +1 -0
  849. package/dist/devices/namron.d.ts +3 -0
  850. package/dist/devices/namron.d.ts.map +1 -0
  851. package/dist/devices/namron.js +2004 -0
  852. package/dist/devices/namron.js.map +1 -0
  853. package/dist/devices/nanoleaf.d.ts +3 -0
  854. package/dist/devices/nanoleaf.d.ts.map +1 -0
  855. package/dist/devices/nanoleaf.js +47 -0
  856. package/dist/devices/nanoleaf.js.map +1 -0
  857. package/dist/devices/nedis.d.ts +3 -0
  858. package/dist/devices/nedis.d.ts.map +1 -0
  859. package/dist/devices/nedis.js +87 -0
  860. package/dist/devices/nedis.js.map +1 -0
  861. package/dist/devices/neo.d.ts +3 -0
  862. package/dist/devices/neo.d.ts.map +1 -0
  863. package/dist/devices/neo.js +526 -0
  864. package/dist/devices/neo.js.map +1 -0
  865. package/dist/devices/net2grid.d.ts +3 -0
  866. package/dist/devices/net2grid.d.ts.map +1 -0
  867. package/dist/devices/net2grid.js +64 -0
  868. package/dist/devices/net2grid.js.map +1 -0
  869. package/dist/devices/netvox.d.ts +3 -0
  870. package/dist/devices/netvox.d.ts.map +1 -0
  871. package/dist/devices/netvox.js +71 -0
  872. package/dist/devices/netvox.js.map +1 -0
  873. package/dist/devices/nexelec.d.ts +3 -0
  874. package/dist/devices/nexelec.d.ts.map +1 -0
  875. package/dist/devices/nexelec.js +47 -0
  876. package/dist/devices/nexelec.js.map +1 -0
  877. package/dist/devices/niko.d.ts +3 -0
  878. package/dist/devices/niko.d.ts.map +1 -0
  879. package/dist/devices/niko.js +769 -0
  880. package/dist/devices/niko.js.map +1 -0
  881. package/dist/devices/ninja_blocks.d.ts +3 -0
  882. package/dist/devices/ninja_blocks.d.ts.map +1 -0
  883. package/dist/devices/ninja_blocks.js +60 -0
  884. package/dist/devices/ninja_blocks.js.map +1 -0
  885. package/dist/devices/niviss.d.ts +3 -0
  886. package/dist/devices/niviss.d.ts.map +1 -0
  887. package/dist/devices/niviss.js +47 -0
  888. package/dist/devices/niviss.js.map +1 -0
  889. package/dist/devices/nobo.d.ts +3 -0
  890. package/dist/devices/nobo.d.ts.map +1 -0
  891. package/dist/devices/nobo.js +88 -0
  892. package/dist/devices/nobo.js.map +1 -0
  893. package/dist/devices/nodon.d.ts +3 -0
  894. package/dist/devices/nodon.d.ts.map +1 -0
  895. package/dist/devices/nodon.js +483 -0
  896. package/dist/devices/nodon.js.map +1 -0
  897. package/dist/devices/nordtronic.d.ts +3 -0
  898. package/dist/devices/nordtronic.d.ts.map +1 -0
  899. package/dist/devices/nordtronic.js +95 -0
  900. package/dist/devices/nordtronic.js.map +1 -0
  901. package/dist/devices/nous.d.ts +3 -0
  902. package/dist/devices/nous.d.ts.map +1 -0
  903. package/dist/devices/nous.js +367 -0
  904. package/dist/devices/nous.js.map +1 -0
  905. package/dist/devices/novo.d.ts +3 -0
  906. package/dist/devices/novo.d.ts.map +1 -0
  907. package/dist/devices/novo.js +53 -0
  908. package/dist/devices/novo.js.map +1 -0
  909. package/dist/devices/nue_3a.d.ts +3 -0
  910. package/dist/devices/nue_3a.d.ts.map +1 -0
  911. package/dist/devices/nue_3a.js +359 -0
  912. package/dist/devices/nue_3a.js.map +1 -0
  913. package/dist/devices/nyce.d.ts +3 -0
  914. package/dist/devices/nyce.d.ts.map +1 -0
  915. package/dist/devices/nyce.js +124 -0
  916. package/dist/devices/nyce.js.map +1 -0
  917. package/dist/devices/onenuo.d.ts +3 -0
  918. package/dist/devices/onenuo.d.ts.map +1 -0
  919. package/dist/devices/onenuo.js +83 -0
  920. package/dist/devices/onenuo.js.map +1 -0
  921. package/dist/devices/onesti.d.ts +3 -0
  922. package/dist/devices/onesti.d.ts.map +1 -0
  923. package/dist/devices/onesti.js +265 -0
  924. package/dist/devices/onesti.js.map +1 -0
  925. package/dist/devices/onokom.d.ts +3 -0
  926. package/dist/devices/onokom.d.ts.map +1 -0
  927. package/dist/devices/onokom.js +2715 -0
  928. package/dist/devices/onokom.js.map +1 -0
  929. package/dist/devices/openlumi.d.ts +3 -0
  930. package/dist/devices/openlumi.d.ts.map +1 -0
  931. package/dist/devices/openlumi.js +47 -0
  932. package/dist/devices/openlumi.js.map +1 -0
  933. package/dist/devices/orvibo.d.ts +12 -0
  934. package/dist/devices/orvibo.d.ts.map +1 -0
  935. package/dist/devices/orvibo.js +715 -0
  936. package/dist/devices/orvibo.js.map +1 -0
  937. package/dist/devices/orztech.d.ts +3 -0
  938. package/dist/devices/orztech.d.ts.map +1 -0
  939. package/dist/devices/orztech.js +195 -0
  940. package/dist/devices/orztech.js.map +1 -0
  941. package/dist/devices/osram.d.ts +3 -0
  942. package/dist/devices/osram.d.ts.map +1 -0
  943. package/dist/devices/osram.js +513 -0
  944. package/dist/devices/osram.js.map +1 -0
  945. package/dist/devices/oujiabao.d.ts +3 -0
  946. package/dist/devices/oujiabao.d.ts.map +1 -0
  947. package/dist/devices/oujiabao.js +51 -0
  948. package/dist/devices/oujiabao.js.map +1 -0
  949. package/dist/devices/owon.d.ts +3 -0
  950. package/dist/devices/owon.d.ts.map +1 -0
  951. package/dist/devices/owon.js +888 -0
  952. package/dist/devices/owon.js.map +1 -0
  953. package/dist/devices/ozsmartthings.d.ts +3 -0
  954. package/dist/devices/ozsmartthings.d.ts.map +1 -0
  955. package/dist/devices/ozsmartthings.js +47 -0
  956. package/dist/devices/ozsmartthings.js.map +1 -0
  957. package/dist/devices/paul_neuhaus.d.ts +3 -0
  958. package/dist/devices/paul_neuhaus.d.ts.map +1 -0
  959. package/dist/devices/paul_neuhaus.js +190 -0
  960. package/dist/devices/paul_neuhaus.js.map +1 -0
  961. package/dist/devices/paulmann.d.ts +3 -0
  962. package/dist/devices/paulmann.d.ts.map +1 -0
  963. package/dist/devices/paulmann.js +426 -0
  964. package/dist/devices/paulmann.js.map +1 -0
  965. package/dist/devices/peq.d.ts +3 -0
  966. package/dist/devices/peq.d.ts.map +1 -0
  967. package/dist/devices/peq.js +60 -0
  968. package/dist/devices/peq.js.map +1 -0
  969. package/dist/devices/perenio.d.ts +3 -0
  970. package/dist/devices/perenio.d.ts.map +1 -0
  971. package/dist/devices/perenio.js +461 -0
  972. package/dist/devices/perenio.js.map +1 -0
  973. package/dist/devices/philio.d.ts +3 -0
  974. package/dist/devices/philio.d.ts.map +1 -0
  975. package/dist/devices/philio.js +48 -0
  976. package/dist/devices/philio.js.map +1 -0
  977. package/dist/devices/philips.d.ts +3 -0
  978. package/dist/devices/philips.d.ts.map +1 -0
  979. package/dist/devices/philips.js +4948 -0
  980. package/dist/devices/philips.js.map +1 -0
  981. package/dist/devices/plaid.d.ts +3 -0
  982. package/dist/devices/plaid.d.ts.map +1 -0
  983. package/dist/devices/plaid.js +61 -0
  984. package/dist/devices/plaid.js.map +1 -0
  985. package/dist/devices/plugwise.d.ts +3 -0
  986. package/dist/devices/plugwise.d.ts.map +1 -0
  987. package/dist/devices/plugwise.js +217 -0
  988. package/dist/devices/plugwise.js.map +1 -0
  989. package/dist/devices/profalux.d.ts +3 -0
  990. package/dist/devices/profalux.d.ts.map +1 -0
  991. package/dist/devices/profalux.js +215 -0
  992. package/dist/devices/profalux.js.map +1 -0
  993. package/dist/devices/prolight.d.ts +3 -0
  994. package/dist/devices/prolight.d.ts.map +1 -0
  995. package/dist/devices/prolight.js +111 -0
  996. package/dist/devices/prolight.js.map +1 -0
  997. package/dist/devices/purmo.d.ts +3 -0
  998. package/dist/devices/purmo.d.ts.map +1 -0
  999. package/dist/devices/purmo.js +91 -0
  1000. package/dist/devices/purmo.js.map +1 -0
  1001. package/dist/devices/pushok.d.ts +3 -0
  1002. package/dist/devices/pushok.d.ts.map +1 -0
  1003. package/dist/devices/pushok.js +736 -0
  1004. package/dist/devices/pushok.js.map +1 -0
  1005. package/dist/devices/qa.d.ts +3 -0
  1006. package/dist/devices/qa.d.ts.map +1 -0
  1007. package/dist/devices/qa.js +445 -0
  1008. package/dist/devices/qa.js.map +1 -0
  1009. package/dist/devices/qmotion.d.ts +3 -0
  1010. package/dist/devices/qmotion.d.ts.map +1 -0
  1011. package/dist/devices/qmotion.js +69 -0
  1012. package/dist/devices/qmotion.js.map +1 -0
  1013. package/dist/devices/qoto.d.ts +3 -0
  1014. package/dist/devices/qoto.d.ts.map +1 -0
  1015. package/dist/devices/qoto.js +83 -0
  1016. package/dist/devices/qoto.js.map +1 -0
  1017. package/dist/devices/quirky.d.ts +8 -0
  1018. package/dist/devices/quirky.d.ts.map +1 -0
  1019. package/dist/devices/quirky.js +47 -0
  1020. package/dist/devices/quirky.js.map +1 -0
  1021. package/dist/devices/quotra.d.ts +3 -0
  1022. package/dist/devices/quotra.d.ts.map +1 -0
  1023. package/dist/devices/quotra.js +54 -0
  1024. package/dist/devices/quotra.js.map +1 -0
  1025. package/dist/devices/rademacher.d.ts +3 -0
  1026. package/dist/devices/rademacher.d.ts.map +1 -0
  1027. package/dist/devices/rademacher.js +61 -0
  1028. package/dist/devices/rademacher.js.map +1 -0
  1029. package/dist/devices/radium.d.ts +3 -0
  1030. package/dist/devices/radium.d.ts.map +1 -0
  1031. package/dist/devices/radium.js +47 -0
  1032. package/dist/devices/radium.js.map +1 -0
  1033. package/dist/devices/raex.d.ts +3 -0
  1034. package/dist/devices/raex.d.ts.map +1 -0
  1035. package/dist/devices/raex.js +47 -0
  1036. package/dist/devices/raex.js.map +1 -0
  1037. package/dist/devices/rgb_genie.d.ts +3 -0
  1038. package/dist/devices/rgb_genie.d.ts.map +1 -0
  1039. package/dist/devices/rgb_genie.js +277 -0
  1040. package/dist/devices/rgb_genie.js.map +1 -0
  1041. package/dist/devices/robb.d.ts +3 -0
  1042. package/dist/devices/robb.d.ts.map +1 -0
  1043. package/dist/devices/robb.js +492 -0
  1044. package/dist/devices/robb.js.map +1 -0
  1045. package/dist/devices/roome.d.ts +3 -0
  1046. package/dist/devices/roome.d.ts.map +1 -0
  1047. package/dist/devices/roome.js +51 -0
  1048. package/dist/devices/roome.js.map +1 -0
  1049. package/dist/devices/rtx.d.ts +3 -0
  1050. package/dist/devices/rtx.d.ts.map +1 -0
  1051. package/dist/devices/rtx.js +143 -0
  1052. package/dist/devices/rtx.js.map +1 -0
  1053. package/dist/devices/salus_controls.d.ts +3 -0
  1054. package/dist/devices/salus_controls.d.ts.map +1 -0
  1055. package/dist/devices/salus_controls.js +222 -0
  1056. package/dist/devices/salus_controls.js.map +1 -0
  1057. package/dist/devices/samotech.d.ts +3 -0
  1058. package/dist/devices/samotech.d.ts.map +1 -0
  1059. package/dist/devices/samotech.js +123 -0
  1060. package/dist/devices/samotech.js.map +1 -0
  1061. package/dist/devices/saswell.d.ts +3 -0
  1062. package/dist/devices/saswell.d.ts.map +1 -0
  1063. package/dist/devices/saswell.js +120 -0
  1064. package/dist/devices/saswell.js.map +1 -0
  1065. package/dist/devices/sber.d.ts +3 -0
  1066. package/dist/devices/sber.d.ts.map +1 -0
  1067. package/dist/devices/sber.js +1921 -0
  1068. package/dist/devices/sber.js.map +1 -0
  1069. package/dist/devices/scanproducts.d.ts +3 -0
  1070. package/dist/devices/scanproducts.d.ts.map +1 -0
  1071. package/dist/devices/scanproducts.js +54 -0
  1072. package/dist/devices/scanproducts.js.map +1 -0
  1073. package/dist/devices/schlage.d.ts +3 -0
  1074. package/dist/devices/schlage.d.ts.map +1 -0
  1075. package/dist/devices/schlage.js +60 -0
  1076. package/dist/devices/schlage.js.map +1 -0
  1077. package/dist/devices/schneider_electric.d.ts +10 -0
  1078. package/dist/devices/schneider_electric.d.ts.map +1 -0
  1079. package/dist/devices/schneider_electric.js +2801 -0
  1080. package/dist/devices/schneider_electric.js.map +1 -0
  1081. package/dist/devices/schwaiger.d.ts +3 -0
  1082. package/dist/devices/schwaiger.d.ts.map +1 -0
  1083. package/dist/devices/schwaiger.js +105 -0
  1084. package/dist/devices/schwaiger.js.map +1 -0
  1085. package/dist/devices/seastar_intelligence.d.ts +3 -0
  1086. package/dist/devices/seastar_intelligence.d.ts.map +1 -0
  1087. package/dist/devices/seastar_intelligence.js +52 -0
  1088. package/dist/devices/seastar_intelligence.js.map +1 -0
  1089. package/dist/devices/securifi.d.ts +3 -0
  1090. package/dist/devices/securifi.d.ts.map +1 -0
  1091. package/dist/devices/securifi.js +79 -0
  1092. package/dist/devices/securifi.js.map +1 -0
  1093. package/dist/devices/sengled.d.ts +6 -0
  1094. package/dist/devices/sengled.d.ts.map +1 -0
  1095. package/dist/devices/sengled.js +395 -0
  1096. package/dist/devices/sengled.js.map +1 -0
  1097. package/dist/devices/senoro.d.ts +3 -0
  1098. package/dist/devices/senoro.d.ts.map +1 -0
  1099. package/dist/devices/senoro.js +64 -0
  1100. package/dist/devices/senoro.js.map +1 -0
  1101. package/dist/devices/sercomm.d.ts +3 -0
  1102. package/dist/devices/sercomm.d.ts.map +1 -0
  1103. package/dist/devices/sercomm.js +193 -0
  1104. package/dist/devices/sercomm.js.map +1 -0
  1105. package/dist/devices/shade_control.d.ts +3 -0
  1106. package/dist/devices/shade_control.d.ts.map +1 -0
  1107. package/dist/devices/shade_control.js +61 -0
  1108. package/dist/devices/shade_control.js.map +1 -0
  1109. package/dist/devices/shelly.d.ts +3 -0
  1110. package/dist/devices/shelly.d.ts.map +1 -0
  1111. package/dist/devices/shelly.js +1304 -0
  1112. package/dist/devices/shelly.js.map +1 -0
  1113. package/dist/devices/shenzhen_homa.d.ts +3 -0
  1114. package/dist/devices/shenzhen_homa.d.ts.map +1 -0
  1115. package/dist/devices/shenzhen_homa.js +143 -0
  1116. package/dist/devices/shenzhen_homa.js.map +1 -0
  1117. package/dist/devices/shinasystem.d.ts +3 -0
  1118. package/dist/devices/shinasystem.d.ts.map +1 -0
  1119. package/dist/devices/shinasystem.js +1322 -0
  1120. package/dist/devices/shinasystem.js.map +1 -0
  1121. package/dist/devices/shyugj.d.ts +3 -0
  1122. package/dist/devices/shyugj.d.ts.map +1 -0
  1123. package/dist/devices/shyugj.js +53 -0
  1124. package/dist/devices/shyugj.js.map +1 -0
  1125. package/dist/devices/siglis.d.ts +3 -0
  1126. package/dist/devices/siglis.d.ts.map +1 -0
  1127. package/dist/devices/siglis.js +440 -0
  1128. package/dist/devices/siglis.js.map +1 -0
  1129. package/dist/devices/sikom.d.ts +3 -0
  1130. package/dist/devices/sikom.d.ts.map +1 -0
  1131. package/dist/devices/sikom.js +64 -0
  1132. package/dist/devices/sikom.js.map +1 -0
  1133. package/dist/devices/silicon_labs.d.ts +3 -0
  1134. package/dist/devices/silicon_labs.d.ts.map +1 -0
  1135. package/dist/devices/silicon_labs.js +47 -0
  1136. package/dist/devices/silicon_labs.js.map +1 -0
  1137. package/dist/devices/simon.d.ts +3 -0
  1138. package/dist/devices/simon.d.ts.map +1 -0
  1139. package/dist/devices/simon.js +54 -0
  1140. package/dist/devices/simon.js.map +1 -0
  1141. package/dist/devices/simpla_home.d.ts +3 -0
  1142. package/dist/devices/simpla_home.d.ts.map +1 -0
  1143. package/dist/devices/simpla_home.js +97 -0
  1144. package/dist/devices/simpla_home.js.map +1 -0
  1145. package/dist/devices/sinope.d.ts +3 -0
  1146. package/dist/devices/sinope.d.ts.map +1 -0
  1147. package/dist/devices/sinope.js +2015 -0
  1148. package/dist/devices/sinope.js.map +1 -0
  1149. package/dist/devices/siterwell.d.ts +3 -0
  1150. package/dist/devices/siterwell.d.ts.map +1 -0
  1151. package/dist/devices/siterwell.js +107 -0
  1152. package/dist/devices/siterwell.js.map +1 -0
  1153. package/dist/devices/skydance.d.ts +3 -0
  1154. package/dist/devices/skydance.d.ts.map +1 -0
  1155. package/dist/devices/skydance.js +138 -0
  1156. package/dist/devices/skydance.js.map +1 -0
  1157. package/dist/devices/slacky_diy.d.ts +3 -0
  1158. package/dist/devices/slacky_diy.d.ts.map +1 -0
  1159. package/dist/devices/slacky_diy.js +3694 -0
  1160. package/dist/devices/slacky_diy.js.map +1 -0
  1161. package/dist/devices/slv.d.ts +3 -0
  1162. package/dist/devices/slv.d.ts.map +1 -0
  1163. package/dist/devices/slv.js +77 -0
  1164. package/dist/devices/slv.js.map +1 -0
  1165. package/dist/devices/smarli.d.ts +3 -0
  1166. package/dist/devices/smarli.d.ts.map +1 -0
  1167. package/dist/devices/smarli.js +99 -0
  1168. package/dist/devices/smarli.js.map +1 -0
  1169. package/dist/devices/smart9.d.ts +3 -0
  1170. package/dist/devices/smart9.d.ts.map +1 -0
  1171. package/dist/devices/smart9.js +58 -0
  1172. package/dist/devices/smart9.js.map +1 -0
  1173. package/dist/devices/smart_home_pty.d.ts +3 -0
  1174. package/dist/devices/smart_home_pty.d.ts.map +1 -0
  1175. package/dist/devices/smart_home_pty.js +54 -0
  1176. package/dist/devices/smart_home_pty.js.map +1 -0
  1177. package/dist/devices/smartenit.d.ts +3 -0
  1178. package/dist/devices/smartenit.d.ts.map +1 -0
  1179. package/dist/devices/smartenit.js +77 -0
  1180. package/dist/devices/smartenit.js.map +1 -0
  1181. package/dist/devices/smartthings.d.ts +26 -0
  1182. package/dist/devices/smartthings.d.ts.map +1 -0
  1183. package/dist/devices/smartthings.js +571 -0
  1184. package/dist/devices/smartthings.js.map +1 -0
  1185. package/dist/devices/smartwings.d.ts +3 -0
  1186. package/dist/devices/smartwings.d.ts.map +1 -0
  1187. package/dist/devices/smartwings.js +60 -0
  1188. package/dist/devices/smartwings.js.map +1 -0
  1189. package/dist/devices/smlight.d.ts +3 -0
  1190. package/dist/devices/smlight.d.ts.map +1 -0
  1191. package/dist/devices/smlight.js +73 -0
  1192. package/dist/devices/smlight.js.map +1 -0
  1193. package/dist/devices/soanalarm.d.ts +3 -0
  1194. package/dist/devices/soanalarm.d.ts.map +1 -0
  1195. package/dist/devices/soanalarm.js +58 -0
  1196. package/dist/devices/soanalarm.js.map +1 -0
  1197. package/dist/devices/sohan_electric.d.ts +3 -0
  1198. package/dist/devices/sohan_electric.d.ts.map +1 -0
  1199. package/dist/devices/sohan_electric.js +49 -0
  1200. package/dist/devices/sohan_electric.js.map +1 -0
  1201. package/dist/devices/solaredge.d.ts +3 -0
  1202. package/dist/devices/solaredge.d.ts.map +1 -0
  1203. package/dist/devices/solaredge.js +47 -0
  1204. package/dist/devices/solaredge.js.map +1 -0
  1205. package/dist/devices/soma.d.ts +3 -0
  1206. package/dist/devices/soma.d.ts.map +1 -0
  1207. package/dist/devices/soma.js +47 -0
  1208. package/dist/devices/soma.js.map +1 -0
  1209. package/dist/devices/somfy.d.ts +3 -0
  1210. package/dist/devices/somfy.d.ts.map +1 -0
  1211. package/dist/devices/somfy.js +173 -0
  1212. package/dist/devices/somfy.js.map +1 -0
  1213. package/dist/devices/somgoms.d.ts +3 -0
  1214. package/dist/devices/somgoms.d.ts.map +1 -0
  1215. package/dist/devices/somgoms.js +80 -0
  1216. package/dist/devices/somgoms.js.map +1 -0
  1217. package/dist/devices/sonoff.d.ts +42 -0
  1218. package/dist/devices/sonoff.d.ts.map +1 -0
  1219. package/dist/devices/sonoff.js +4921 -0
  1220. package/dist/devices/sonoff.js.map +1 -0
  1221. package/dist/devices/sowilo.d.ts +3 -0
  1222. package/dist/devices/sowilo.d.ts.map +1 -0
  1223. package/dist/devices/sowilo.js +47 -0
  1224. package/dist/devices/sowilo.js.map +1 -0
  1225. package/dist/devices/spacetronik.d.ts +3 -0
  1226. package/dist/devices/spacetronik.d.ts.map +1 -0
  1227. package/dist/devices/spacetronik.js +53 -0
  1228. package/dist/devices/spacetronik.js.map +1 -0
  1229. package/dist/devices/spotmau.d.ts +3 -0
  1230. package/dist/devices/spotmau.d.ts.map +1 -0
  1231. package/dist/devices/spotmau.js +74 -0
  1232. package/dist/devices/spotmau.js.map +1 -0
  1233. package/dist/devices/sprut.d.ts +3 -0
  1234. package/dist/devices/sprut.d.ts.map +1 -0
  1235. package/dist/devices/sprut.js +328 -0
  1236. package/dist/devices/sprut.js.map +1 -0
  1237. package/dist/devices/stello.d.ts +3 -0
  1238. package/dist/devices/stello.d.ts.map +1 -0
  1239. package/dist/devices/stello.js +142 -0
  1240. package/dist/devices/stello.js.map +1 -0
  1241. package/dist/devices/stelpro.d.ts +3 -0
  1242. package/dist/devices/stelpro.d.ts.map +1 -0
  1243. package/dist/devices/stelpro.js +376 -0
  1244. package/dist/devices/stelpro.js.map +1 -0
  1245. package/dist/devices/sunricher.d.ts +30 -0
  1246. package/dist/devices/sunricher.d.ts.map +1 -0
  1247. package/dist/devices/sunricher.js +2337 -0
  1248. package/dist/devices/sunricher.js.map +1 -0
  1249. package/dist/devices/superled.d.ts +3 -0
  1250. package/dist/devices/superled.d.ts.map +1 -0
  1251. package/dist/devices/superled.js +47 -0
  1252. package/dist/devices/superled.js.map +1 -0
  1253. package/dist/devices/swann.d.ts +3 -0
  1254. package/dist/devices/swann.d.ts.map +1 -0
  1255. package/dist/devices/swann.js +69 -0
  1256. package/dist/devices/swann.js.map +1 -0
  1257. package/dist/devices/sylvania.d.ts +3 -0
  1258. package/dist/devices/sylvania.d.ts.map +1 -0
  1259. package/dist/devices/sylvania.js +223 -0
  1260. package/dist/devices/sylvania.js.map +1 -0
  1261. package/dist/devices/tapestry.d.ts +3 -0
  1262. package/dist/devices/tapestry.d.ts.map +1 -0
  1263. package/dist/devices/tapestry.js +52 -0
  1264. package/dist/devices/tapestry.js.map +1 -0
  1265. package/dist/devices/task_lighting.d.ts +3 -0
  1266. package/dist/devices/task_lighting.d.ts.map +1 -0
  1267. package/dist/devices/task_lighting.js +47 -0
  1268. package/dist/devices/task_lighting.js.map +1 -0
  1269. package/dist/devices/tci.d.ts +3 -0
  1270. package/dist/devices/tci.d.ts.map +1 -0
  1271. package/dist/devices/tci.js +68 -0
  1272. package/dist/devices/tci.js.map +1 -0
  1273. package/dist/devices/tcl.d.ts +3 -0
  1274. package/dist/devices/tcl.d.ts.map +1 -0
  1275. package/dist/devices/tcl.js +47 -0
  1276. package/dist/devices/tcl.js.map +1 -0
  1277. package/dist/devices/tech.d.ts +3 -0
  1278. package/dist/devices/tech.d.ts.map +1 -0
  1279. package/dist/devices/tech.js +213 -0
  1280. package/dist/devices/tech.js.map +1 -0
  1281. package/dist/devices/technicolor.d.ts +3 -0
  1282. package/dist/devices/technicolor.d.ts.map +1 -0
  1283. package/dist/devices/technicolor.js +85 -0
  1284. package/dist/devices/technicolor.js.map +1 -0
  1285. package/dist/devices/terncy.d.ts +3 -0
  1286. package/dist/devices/terncy.d.ts.map +1 -0
  1287. package/dist/devices/terncy.js +192 -0
  1288. package/dist/devices/terncy.js.map +1 -0
  1289. package/dist/devices/the_light_group.d.ts +3 -0
  1290. package/dist/devices/the_light_group.d.ts.map +1 -0
  1291. package/dist/devices/the_light_group.js +145 -0
  1292. package/dist/devices/the_light_group.js.map +1 -0
  1293. package/dist/devices/third_reality.d.ts +3 -0
  1294. package/dist/devices/third_reality.d.ts.map +1 -0
  1295. package/dist/devices/third_reality.js +1067 -0
  1296. package/dist/devices/third_reality.js.map +1 -0
  1297. package/dist/devices/tis_control.d.ts +3 -0
  1298. package/dist/devices/tis_control.d.ts.map +1 -0
  1299. package/dist/devices/tis_control.js +47 -0
  1300. package/dist/devices/tis_control.js.map +1 -0
  1301. package/dist/devices/titan_products.d.ts +3 -0
  1302. package/dist/devices/titan_products.d.ts.map +1 -0
  1303. package/dist/devices/titan_products.js +58 -0
  1304. package/dist/devices/titan_products.js.map +1 -0
  1305. package/dist/devices/tlwglobal.d.ts +3 -0
  1306. package/dist/devices/tlwglobal.d.ts.map +1 -0
  1307. package/dist/devices/tlwglobal.js +64 -0
  1308. package/dist/devices/tlwglobal.js.map +1 -0
  1309. package/dist/devices/tnce.d.ts +3 -0
  1310. package/dist/devices/tnce.d.ts.map +1 -0
  1311. package/dist/devices/tnce.js +54 -0
  1312. package/dist/devices/tnce.js.map +1 -0
  1313. package/dist/devices/tplink.d.ts +3 -0
  1314. package/dist/devices/tplink.d.ts.map +1 -0
  1315. package/dist/devices/tplink.js +77 -0
  1316. package/dist/devices/tplink.js.map +1 -0
  1317. package/dist/devices/trust.d.ts +3 -0
  1318. package/dist/devices/trust.d.ts.map +1 -0
  1319. package/dist/devices/trust.js +180 -0
  1320. package/dist/devices/trust.js.map +1 -0
  1321. package/dist/devices/tubeszb.d.ts +3 -0
  1322. package/dist/devices/tubeszb.d.ts.map +1 -0
  1323. package/dist/devices/tubeszb.js +56 -0
  1324. package/dist/devices/tubeszb.js.map +1 -0
  1325. package/dist/devices/tuya.d.ts +3 -0
  1326. package/dist/devices/tuya.d.ts.map +1 -0
  1327. package/dist/devices/tuya.js +24771 -0
  1328. package/dist/devices/tuya.js.map +1 -0
  1329. package/dist/devices/ubisys.d.ts +3 -0
  1330. package/dist/devices/ubisys.d.ts.map +1 -0
  1331. package/dist/devices/ubisys.js +1295 -0
  1332. package/dist/devices/ubisys.js.map +1 -0
  1333. package/dist/devices/uhome.d.ts +3 -0
  1334. package/dist/devices/uhome.d.ts.map +1 -0
  1335. package/dist/devices/uhome.js +60 -0
  1336. package/dist/devices/uhome.js.map +1 -0
  1337. package/dist/devices/universal_electronics_inc.d.ts +3 -0
  1338. package/dist/devices/universal_electronics_inc.d.ts.map +1 -0
  1339. package/dist/devices/universal_electronics_inc.js +156 -0
  1340. package/dist/devices/universal_electronics_inc.js.map +1 -0
  1341. package/dist/devices/vav.d.ts +3 -0
  1342. package/dist/devices/vav.d.ts.map +1 -0
  1343. package/dist/devices/vav.js +57 -0
  1344. package/dist/devices/vav.js.map +1 -0
  1345. package/dist/devices/vbled.d.ts +3 -0
  1346. package/dist/devices/vbled.d.ts.map +1 -0
  1347. package/dist/devices/vbled.js +47 -0
  1348. package/dist/devices/vbled.js.map +1 -0
  1349. package/dist/devices/vesternet.d.ts +3 -0
  1350. package/dist/devices/vesternet.d.ts.map +1 -0
  1351. package/dist/devices/vesternet.js +355 -0
  1352. package/dist/devices/vesternet.js.map +1 -0
  1353. package/dist/devices/viessmann.d.ts +3 -0
  1354. package/dist/devices/viessmann.d.ts.map +1 -0
  1355. package/dist/devices/viessmann.js +120 -0
  1356. package/dist/devices/viessmann.js.map +1 -0
  1357. package/dist/devices/villeroy_boch.d.ts +3 -0
  1358. package/dist/devices/villeroy_boch.d.ts.map +1 -0
  1359. package/dist/devices/villeroy_boch.js +54 -0
  1360. package/dist/devices/villeroy_boch.js.map +1 -0
  1361. package/dist/devices/vimar.d.ts +3 -0
  1362. package/dist/devices/vimar.d.ts.map +1 -0
  1363. package/dist/devices/vimar.js +140 -0
  1364. package/dist/devices/vimar.js.map +1 -0
  1365. package/dist/devices/visonic.d.ts +3 -0
  1366. package/dist/devices/visonic.d.ts.map +1 -0
  1367. package/dist/devices/visonic.js +134 -0
  1368. package/dist/devices/visonic.js.map +1 -0
  1369. package/dist/devices/vrey.d.ts +3 -0
  1370. package/dist/devices/vrey.d.ts.map +1 -0
  1371. package/dist/devices/vrey.js +48 -0
  1372. package/dist/devices/vrey.js.map +1 -0
  1373. package/dist/devices/vsmart.d.ts +3 -0
  1374. package/dist/devices/vsmart.d.ts.map +1 -0
  1375. package/dist/devices/vsmart.js +442 -0
  1376. package/dist/devices/vsmart.js.map +1 -0
  1377. package/dist/devices/wally.d.ts +3 -0
  1378. package/dist/devices/wally.d.ts.map +1 -0
  1379. package/dist/devices/wally.js +60 -0
  1380. package/dist/devices/wally.js.map +1 -0
  1381. package/dist/devices/waxman.d.ts +3 -0
  1382. package/dist/devices/waxman.d.ts.map +1 -0
  1383. package/dist/devices/waxman.js +83 -0
  1384. package/dist/devices/waxman.js.map +1 -0
  1385. package/dist/devices/weiser.d.ts +3 -0
  1386. package/dist/devices/weiser.d.ts.map +1 -0
  1387. package/dist/devices/weiser.js +54 -0
  1388. package/dist/devices/weiser.js.map +1 -0
  1389. package/dist/devices/weten.d.ts +3 -0
  1390. package/dist/devices/weten.d.ts.map +1 -0
  1391. package/dist/devices/weten.js +83 -0
  1392. package/dist/devices/weten.js.map +1 -0
  1393. package/dist/devices/wirenboard.d.ts +3 -0
  1394. package/dist/devices/wirenboard.d.ts.map +1 -0
  1395. package/dist/devices/wirenboard.js +715 -0
  1396. package/dist/devices/wirenboard.js.map +1 -0
  1397. package/dist/devices/wisdom.d.ts +3 -0
  1398. package/dist/devices/wisdom.d.ts.map +1 -0
  1399. package/dist/devices/wisdom.js +47 -0
  1400. package/dist/devices/wisdom.js.map +1 -0
  1401. package/dist/devices/wmun.d.ts +3 -0
  1402. package/dist/devices/wmun.d.ts.map +1 -0
  1403. package/dist/devices/wmun.js +61 -0
  1404. package/dist/devices/wmun.js.map +1 -0
  1405. package/dist/devices/woolley.d.ts +3 -0
  1406. package/dist/devices/woolley.d.ts.map +1 -0
  1407. package/dist/devices/woolley.js +96 -0
  1408. package/dist/devices/woolley.js.map +1 -0
  1409. package/dist/devices/woox.d.ts +3 -0
  1410. package/dist/devices/woox.d.ts.map +1 -0
  1411. package/dist/devices/woox.js +194 -0
  1412. package/dist/devices/woox.js.map +1 -0
  1413. package/dist/devices/wyze.d.ts +3 -0
  1414. package/dist/devices/wyze.d.ts.map +1 -0
  1415. package/dist/devices/wyze.js +59 -0
  1416. package/dist/devices/wyze.js.map +1 -0
  1417. package/dist/devices/xal.d.ts +3 -0
  1418. package/dist/devices/xal.d.ts.map +1 -0
  1419. package/dist/devices/xal.js +61 -0
  1420. package/dist/devices/xal.js.map +1 -0
  1421. package/dist/devices/xenon.d.ts +4 -0
  1422. package/dist/devices/xenon.d.ts.map +1 -0
  1423. package/dist/devices/xenon.js +65 -0
  1424. package/dist/devices/xenon.js.map +1 -0
  1425. package/dist/devices/xinghuoyuan.d.ts +3 -0
  1426. package/dist/devices/xinghuoyuan.d.ts.map +1 -0
  1427. package/dist/devices/xinghuoyuan.js +47 -0
  1428. package/dist/devices/xinghuoyuan.js.map +1 -0
  1429. package/dist/devices/xyzroe.d.ts +3 -0
  1430. package/dist/devices/xyzroe.d.ts.map +1 -0
  1431. package/dist/devices/xyzroe.js +511 -0
  1432. package/dist/devices/xyzroe.js.map +1 -0
  1433. package/dist/devices/yale.d.ts +3 -0
  1434. package/dist/devices/yale.d.ts.map +1 -0
  1435. package/dist/devices/yale.js +686 -0
  1436. package/dist/devices/yale.js.map +1 -0
  1437. package/dist/devices/yandex.d.ts +3 -0
  1438. package/dist/devices/yandex.d.ts.map +1 -0
  1439. package/dist/devices/yandex.js +677 -0
  1440. package/dist/devices/yandex.js.map +1 -0
  1441. package/dist/devices/ynoa.d.ts +3 -0
  1442. package/dist/devices/ynoa.d.ts.map +1 -0
  1443. package/dist/devices/ynoa.js +116 -0
  1444. package/dist/devices/ynoa.js.map +1 -0
  1445. package/dist/devices/yokis.d.ts +3 -0
  1446. package/dist/devices/yokis.d.ts.map +1 -0
  1447. package/dist/devices/yokis.js +2972 -0
  1448. package/dist/devices/yokis.js.map +1 -0
  1449. package/dist/devices/yookee.d.ts +3 -0
  1450. package/dist/devices/yookee.d.ts.map +1 -0
  1451. package/dist/devices/yookee.js +59 -0
  1452. package/dist/devices/yookee.js.map +1 -0
  1453. package/dist/devices/ysrsai.d.ts +3 -0
  1454. package/dist/devices/ysrsai.d.ts.map +1 -0
  1455. package/dist/devices/ysrsai.js +68 -0
  1456. package/dist/devices/ysrsai.js.map +1 -0
  1457. package/dist/devices/zbeacon.d.ts +3 -0
  1458. package/dist/devices/zbeacon.d.ts.map +1 -0
  1459. package/dist/devices/zbeacon.js +54 -0
  1460. package/dist/devices/zbeacon.js.map +1 -0
  1461. package/dist/devices/zemismart.d.ts +3 -0
  1462. package/dist/devices/zemismart.d.ts.map +1 -0
  1463. package/dist/devices/zemismart.js +1061 -0
  1464. package/dist/devices/zemismart.js.map +1 -0
  1465. package/dist/devices/zen.d.ts +3 -0
  1466. package/dist/devices/zen.d.ts.map +1 -0
  1467. package/dist/devices/zen.js +93 -0
  1468. package/dist/devices/zen.js.map +1 -0
  1469. package/dist/devices/zigbeetlc.d.ts +3 -0
  1470. package/dist/devices/zigbeetlc.d.ts.map +1 -0
  1471. package/dist/devices/zigbeetlc.js +374 -0
  1472. package/dist/devices/zigbeetlc.js.map +1 -0
  1473. package/dist/devices/zipato.d.ts +3 -0
  1474. package/dist/devices/zipato.d.ts.map +1 -0
  1475. package/dist/devices/zipato.js +47 -0
  1476. package/dist/devices/zipato.js.map +1 -0
  1477. package/dist/devices/zunzunbee.d.ts +3 -0
  1478. package/dist/devices/zunzunbee.d.ts.map +1 -0
  1479. package/dist/devices/zunzunbee.js +97 -0
  1480. package/dist/devices/zunzunbee.js.map +1 -0
  1481. package/dist/index.d.ts +19 -0
  1482. package/dist/index.d.ts.map +1 -0
  1483. package/dist/index.js.map +1 -0
  1484. package/dist/indexer.d.ts +5 -0
  1485. package/dist/indexer.d.ts.map +1 -0
  1486. package/dist/indexer.js +135 -0
  1487. package/dist/indexer.js.map +1 -0
  1488. package/dist/lib/adurosmart.d.ts +15 -0
  1489. package/dist/lib/adurosmart.d.ts.map +1 -0
  1490. package/dist/lib/adurosmart.js +669 -0
  1491. package/dist/lib/adurosmart.js.map +1 -0
  1492. package/dist/lib/bosch.d.ts +353 -0
  1493. package/dist/lib/bosch.d.ts.map +1 -0
  1494. package/dist/lib/bosch.js +3163 -0
  1495. package/dist/lib/bosch.js.map +1 -0
  1496. package/dist/lib/color.d.ts +272 -0
  1497. package/dist/lib/color.d.ts.map +1 -0
  1498. package/dist/lib/color.js +766 -0
  1499. package/dist/lib/color.js.map +1 -0
  1500. package/dist/lib/constants.d.ts +78 -0
  1501. package/dist/lib/constants.d.ts.map +1 -0
  1502. package/dist/lib/constants.js +317 -0
  1503. package/dist/lib/constants.js.map +1 -0
  1504. package/dist/lib/develco.d.ts +50 -0
  1505. package/dist/lib/develco.d.ts.map +1 -0
  1506. package/dist/lib/develco.js +433 -0
  1507. package/dist/lib/develco.js.map +1 -0
  1508. package/dist/lib/ewelink.d.ts +30 -0
  1509. package/dist/lib/ewelink.d.ts.map +1 -0
  1510. package/dist/lib/ewelink.js +722 -0
  1511. package/dist/lib/ewelink.js.map +1 -0
  1512. package/dist/lib/exposes.d.ts +376 -0
  1513. package/dist/lib/exposes.d.ts.map +1 -0
  1514. package/dist/lib/exposes.js +1136 -0
  1515. package/dist/lib/exposes.js.map +1 -0
  1516. package/dist/lib/generateDefinition.d.ts +10 -0
  1517. package/dist/lib/generateDefinition.d.ts.map +1 -0
  1518. package/dist/lib/generateDefinition.js +773 -0
  1519. package/dist/lib/generateDefinition.js.map +1 -0
  1520. package/dist/lib/heiman.d.ts +92 -0
  1521. package/dist/lib/heiman.d.ts.map +1 -0
  1522. package/dist/lib/heiman.js +211 -0
  1523. package/dist/lib/heiman.js.map +1 -0
  1524. package/dist/lib/ikea.d.ts +106 -0
  1525. package/dist/lib/ikea.d.ts.map +1 -0
  1526. package/dist/lib/ikea.js +984 -0
  1527. package/dist/lib/ikea.js.map +1 -0
  1528. package/dist/lib/kelvinToXy.d.ts +8 -0
  1529. package/dist/lib/kelvinToXy.d.ts.map +1 -0
  1530. package/dist/lib/kelvinToXy.js +1913 -0
  1531. package/dist/lib/kelvinToXy.js.map +1 -0
  1532. package/dist/lib/ledvance.d.ts +20 -0
  1533. package/dist/lib/ledvance.d.ts.map +1 -0
  1534. package/dist/lib/ledvance.js +100 -0
  1535. package/dist/lib/ledvance.js.map +1 -0
  1536. package/dist/lib/legacy.d.ts +5197 -0
  1537. package/dist/lib/legacy.d.ts.map +1 -0
  1538. package/dist/lib/legacy.js +6865 -0
  1539. package/dist/lib/legacy.js.map +1 -0
  1540. package/dist/lib/legrand.d.ts +132 -0
  1541. package/dist/lib/legrand.d.ts.map +1 -0
  1542. package/dist/lib/legrand.js +404 -0
  1543. package/dist/lib/legrand.js.map +1 -0
  1544. package/dist/lib/light.d.ts +9 -0
  1545. package/dist/lib/light.d.ts.map +1 -0
  1546. package/dist/lib/light.js +144 -0
  1547. package/dist/lib/light.js.map +1 -0
  1548. package/dist/lib/logger.d.ts +4 -0
  1549. package/dist/lib/logger.d.ts.map +1 -0
  1550. package/dist/lib/logger.js +14 -0
  1551. package/dist/lib/logger.js.map +1 -0
  1552. package/dist/lib/lumi.d.ts +1093 -0
  1553. package/dist/lib/lumi.d.ts.map +1 -0
  1554. package/dist/lib/lumi.js +6479 -0
  1555. package/dist/lib/lumi.js.map +1 -0
  1556. package/dist/lib/modernExtend.d.ts +436 -0
  1557. package/dist/lib/modernExtend.d.ts.map +1 -0
  1558. package/dist/lib/modernExtend.js +2702 -0
  1559. package/dist/lib/modernExtend.js.map +1 -0
  1560. package/dist/lib/namron.d.ts +56 -0
  1561. package/dist/lib/namron.d.ts.map +1 -0
  1562. package/dist/lib/namron.js +433 -0
  1563. package/dist/lib/namron.js.map +1 -0
  1564. package/dist/lib/nodon.d.ts +3 -0
  1565. package/dist/lib/nodon.d.ts.map +1 -0
  1566. package/dist/lib/nodon.js +130 -0
  1567. package/dist/lib/nodon.js.map +1 -0
  1568. package/dist/lib/philips.d.ts +321 -0
  1569. package/dist/lib/philips.d.ts.map +1 -0
  1570. package/dist/lib/philips.js +876 -0
  1571. package/dist/lib/philips.js.map +1 -0
  1572. package/dist/lib/reporting.d.ts +57 -0
  1573. package/dist/lib/reporting.d.ts.map +1 -0
  1574. package/dist/lib/reporting.js +294 -0
  1575. package/dist/lib/reporting.js.map +1 -0
  1576. package/dist/lib/sonoff.d.ts +30 -0
  1577. package/dist/lib/sonoff.d.ts.map +1 -0
  1578. package/dist/lib/sonoff.js +91 -0
  1579. package/dist/lib/sonoff.js.map +1 -0
  1580. package/dist/lib/store.d.ts +7 -0
  1581. package/dist/lib/store.d.ts.map +1 -0
  1582. package/dist/lib/store.js +59 -0
  1583. package/dist/lib/store.js.map +1 -0
  1584. package/dist/lib/sunricher.d.ts +29 -0
  1585. package/dist/lib/sunricher.d.ts.map +1 -0
  1586. package/dist/lib/sunricher.js +838 -0
  1587. package/dist/lib/sunricher.js.map +1 -0
  1588. package/dist/lib/tuya.d.ts +998 -0
  1589. package/dist/lib/tuya.d.ts.map +1 -0
  1590. package/dist/lib/tuya.js +3043 -0
  1591. package/dist/lib/tuya.js.map +1 -0
  1592. package/dist/lib/types.d.ts +429 -0
  1593. package/dist/lib/types.d.ts.map +1 -0
  1594. package/dist/lib/types.js +3 -0
  1595. package/dist/lib/types.js.map +1 -0
  1596. package/dist/lib/ubisys.d.ts +107 -0
  1597. package/dist/lib/ubisys.d.ts.map +1 -0
  1598. package/dist/lib/ubisys.js +576 -0
  1599. package/dist/lib/ubisys.js.map +1 -0
  1600. package/dist/lib/utils.d.ts +95 -0
  1601. package/dist/lib/utils.d.ts.map +1 -0
  1602. package/dist/lib/utils.js +736 -0
  1603. package/dist/lib/utils.js.map +1 -0
  1604. package/dist/lib/zosung.d.ts +52 -0
  1605. package/dist/lib/zosung.d.ts.map +1 -0
  1606. package/dist/lib/zosung.js +264 -0
  1607. package/dist/lib/zosung.js.map +1 -0
  1608. package/dist/models-index.json +1 -0
  1609. package/package.json +2 -8
@@ -0,0 +1,2702 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.GPDF_COMMANDS = exports.TIME_LOOKUP = void 0;
40
+ exports.setupAttributes = setupAttributes;
41
+ exports.setupConfigureForReporting = setupConfigureForReporting;
42
+ exports.setupConfigureForBinding = setupConfigureForBinding;
43
+ exports.setupConfigureForReading = setupConfigureForReading;
44
+ exports.forceDeviceType = forceDeviceType;
45
+ exports.forcePowerSource = forcePowerSource;
46
+ exports.linkQuality = linkQuality;
47
+ exports.battery = battery;
48
+ exports.deviceTemperature = deviceTemperature;
49
+ exports.identify = identify;
50
+ exports.onOff = onOff;
51
+ exports.commandsOnOff = commandsOnOff;
52
+ exports.poll = poll;
53
+ exports.writeTimeDaily = writeTimeDaily;
54
+ exports.iasArmCommandDefaultResponse = iasArmCommandDefaultResponse;
55
+ exports.iasGetPanelStatusResponse = iasGetPanelStatusResponse;
56
+ exports.customTimeResponse = customTimeResponse;
57
+ exports.illuminance = illuminance;
58
+ exports.temperature = temperature;
59
+ exports.pressure = pressure;
60
+ exports.flow = flow;
61
+ exports.humidity = humidity;
62
+ exports.soilMoisture = soilMoisture;
63
+ exports.windSpeed = windSpeed;
64
+ exports.occupancy = occupancy;
65
+ exports.co2 = co2;
66
+ exports.pm25 = pm25;
67
+ exports.light = light;
68
+ exports.commandsLevelCtrl = commandsLevelCtrl;
69
+ exports.commandsColorCtrl = commandsColorCtrl;
70
+ exports.lightingBallast = lightingBallast;
71
+ exports.customLocalTemperatureCalibrationRange = customLocalTemperatureCalibrationRange;
72
+ exports.lock = lock;
73
+ exports.windowCovering = windowCovering;
74
+ exports.commandsWindowCovering = commandsWindowCovering;
75
+ exports.iasZoneAlarm = iasZoneAlarm;
76
+ exports.iasWarning = iasWarning;
77
+ exports.electricityMeter = electricityMeter;
78
+ exports.gasMeter = gasMeter;
79
+ exports.genericGreenPower = genericGreenPower;
80
+ exports.commandsScenes = commandsScenes;
81
+ exports.enumLookup = enumLookup;
82
+ exports.numeric = numeric;
83
+ exports.binary = binary;
84
+ exports.text = text;
85
+ exports.actionEnumLookup = actionEnumLookup;
86
+ exports.quirkAddEndpointCluster = quirkAddEndpointCluster;
87
+ exports.quirkCheckinInterval = quirkCheckinInterval;
88
+ exports.reconfigureReportingsOnDeviceAnnounce = reconfigureReportingsOnDeviceAnnounce;
89
+ exports.skipDefaultResponse = skipDefaultResponse;
90
+ exports.deviceEndpoints = deviceEndpoints;
91
+ exports.deviceAddCustomCluster = deviceAddCustomCluster;
92
+ exports.ignoreClusterReport = ignoreClusterReport;
93
+ exports.bindCluster = bindCluster;
94
+ exports.thermostat = thermostat;
95
+ const node_assert_1 = __importDefault(require("node:assert"));
96
+ const zigbee_herdsman_1 = require("@willieee802/zigbee-herdsman");
97
+ const enums_1 = require("@willieee802/zigbee-herdsman/dist/zspec/zcl/definition/enums");
98
+ const fz = __importStar(require("../converters/fromZigbee"));
99
+ const tz = __importStar(require("../converters/toZigbee"));
100
+ const constants = __importStar(require("../lib/constants"));
101
+ const logger_1 = require("../lib/logger");
102
+ const globalStore = __importStar(require("../lib/store"));
103
+ const exposes_1 = require("./exposes");
104
+ const light_1 = require("./light");
105
+ const utils_1 = require("./utils");
106
+ function getEndpointsWithCluster(device, cluster, type) {
107
+ if (!device.endpoints) {
108
+ throw new Error(`${device.ieeeAddr} ${device.endpoints}`);
109
+ }
110
+ const endpoints = type === "input"
111
+ ? device.endpoints.filter((ep) => ep.getInputClusters().find((c) => ((0, utils_1.isNumber)(cluster) ? c.ID === cluster : c.name === cluster)))
112
+ : device.endpoints.filter((ep) => ep.getOutputClusters().find((c) => ((0, utils_1.isNumber)(cluster) ? c.ID === cluster : c.name === cluster)));
113
+ if (endpoints.length === 0) {
114
+ throw new Error(`Device ${device.ieeeAddr} has no ${type} cluster ${cluster}`);
115
+ }
116
+ return endpoints;
117
+ }
118
+ const NS = "zhc:modernextend";
119
+ const IAS_EXPOSE_LOOKUP = {
120
+ occupancy: exposes_1.presets.binary("occupancy", exposes_1.access.STATE, true, false).withDescription("Indicates whether the device detected occupancy"),
121
+ contact: exposes_1.presets.binary("contact", exposes_1.access.STATE, false, true).withDescription("Indicates whether the device is opened or closed"),
122
+ smoke: exposes_1.presets.binary("smoke", exposes_1.access.STATE, true, false).withDescription("Indicates whether the device detected smoke"),
123
+ water_leak: exposes_1.presets.binary("water_leak", exposes_1.access.STATE, true, false).withDescription("Indicates whether the device detected a water leak"),
124
+ water: exposes_1.presets.binary("water", exposes_1.access.STATE, true, false).withDescription("Indicates whether the device detects water"),
125
+ carbon_monoxide: exposes_1.presets.binary("carbon_monoxide", exposes_1.access.STATE, true, false).withDescription("Indicates whether the device detected carbon monoxide"),
126
+ sos: exposes_1.presets.binary("sos", exposes_1.access.STATE, true, false).withLabel("SOS").withDescription("Indicates whether the SOS alarm is triggered"),
127
+ vibration: exposes_1.presets.binary("vibration", exposes_1.access.STATE, true, false).withDescription("Indicates whether the device detected vibration"),
128
+ alarm: exposes_1.presets.binary("alarm", exposes_1.access.STATE, true, false).withDescription("Indicates whether the alarm is triggered"),
129
+ gas: exposes_1.presets.binary("gas", exposes_1.access.STATE, true, false).withDescription("Indicates whether the device detected gas"),
130
+ alarm_1: exposes_1.presets.binary("alarm_1", exposes_1.access.STATE, true, false).withDescription("Indicates whether IAS Zone alarm 1 is active"),
131
+ alarm_2: exposes_1.presets.binary("alarm_2", exposes_1.access.STATE, true, false).withDescription("Indicates whether IAS Zone alarm 2 is active"),
132
+ tamper: exposes_1.presets.binary("tamper", exposes_1.access.STATE, true, false).withDescription("Indicates whether the device is tampered").withCategory("diagnostic"),
133
+ rain: exposes_1.presets.binary("rain", exposes_1.access.STATE, true, false).withDescription("Indicates whether the device detected rainfall"),
134
+ pressure: exposes_1.presets.binary("pressure", exposes_1.access.STATE, true, false).withDescription("Indicates whether the device detected pressure"),
135
+ battery_low: exposes_1.presets
136
+ .binary("battery_low", exposes_1.access.STATE, true, false)
137
+ .withDescription("Indicates whether the battery of the device is almost empty")
138
+ .withCategory("diagnostic"),
139
+ supervision_reports: exposes_1.presets
140
+ .binary("supervision_reports", exposes_1.access.STATE, true, false)
141
+ .withDescription("Indicates whether the device issues reports on zone operational status")
142
+ .withCategory("diagnostic"),
143
+ restore_reports: exposes_1.presets
144
+ .binary("restore_reports", exposes_1.access.STATE, true, false)
145
+ .withDescription("Indicates whether the device issues reports on alarm no longer being present")
146
+ .withCategory("diagnostic"),
147
+ ac_status: exposes_1.presets
148
+ .binary("ac_status", exposes_1.access.STATE, true, false)
149
+ .withDescription("Indicates whether the device mains voltage supply is at fault")
150
+ .withCategory("diagnostic"),
151
+ test: exposes_1.presets
152
+ .binary("test", exposes_1.access.STATE, true, false)
153
+ .withDescription("Indicates whether the device is currently performing a test")
154
+ .withCategory("diagnostic"),
155
+ trouble: exposes_1.presets
156
+ .binary("trouble", exposes_1.access.STATE, true, false)
157
+ .withDescription("Indicates whether the device is currently having trouble")
158
+ .withCategory("diagnostic"),
159
+ battery_defect: exposes_1.presets
160
+ .binary("battery_defect", exposes_1.access.STATE, true, false)
161
+ .withDescription("Indicates whether the device battery is defective")
162
+ .withCategory("diagnostic"),
163
+ };
164
+ exports.TIME_LOOKUP = {
165
+ MAX: 65000,
166
+ "4_HOURS": 14400,
167
+ "1_HOUR": 3600,
168
+ "30_MINUTES": 1800,
169
+ "5_MINUTES": 300,
170
+ "2_MINUTES": 120,
171
+ "1_MINUTE": 60,
172
+ "10_SECONDS": 10,
173
+ "5_SECONDS": 5,
174
+ "1_SECOND": 1,
175
+ MIN: 0,
176
+ };
177
+ function convertReportingConfigTime(time) {
178
+ if ((0, utils_1.isString)(time)) {
179
+ if (!(time in exports.TIME_LOOKUP))
180
+ throw new Error(`Reporting time '${time}' is unknown`);
181
+ return exports.TIME_LOOKUP[time];
182
+ }
183
+ return time;
184
+ }
185
+ async function setupAttributes(entity, coordinatorEndpoint, cluster, config, configureReporting = true, read = true) {
186
+ const endpoints = (0, utils_1.isEndpoint)(entity) ? [entity] : getEndpointsWithCluster(entity, cluster, "input");
187
+ const ieeeAddr = (0, utils_1.isEndpoint)(entity) ? entity.deviceIeeeAddress : entity.ieeeAddr;
188
+ for (const endpoint of endpoints) {
189
+ logger_1.logger.debug(`Configure reporting: ${configureReporting}, read: ${read} for ${ieeeAddr}/${endpoint.ID} ${cluster} ${JSON.stringify(config)}`, "zhc:setupattribute");
190
+ // Split into chunks of 4 to prevent to message becoming too big.
191
+ const chunks = (0, utils_1.splitArrayIntoChunks)(config, 4);
192
+ if (configureReporting) {
193
+ await endpoint.bind(cluster, coordinatorEndpoint);
194
+ for (const chunk of chunks) {
195
+ await endpoint.configureReporting(cluster, chunk.map((a) => ({
196
+ minimumReportInterval: convertReportingConfigTime(a.min),
197
+ maximumReportInterval: convertReportingConfigTime(a.max),
198
+ reportableChange: a.change,
199
+ attribute: a.attribute,
200
+ })));
201
+ }
202
+ }
203
+ if (read) {
204
+ for (const chunk of chunks) {
205
+ try {
206
+ // Don't fail configuration if reading this attribute fails
207
+ // https://github.com/Koenkk/zigbee-herdsman-converters/pull/7074
208
+ await endpoint.read(cluster,
209
+ // @ts-expect-error too dynamic to properly type
210
+ chunk.map((a) => ((0, utils_1.isString)(a) ? a : (0, utils_1.isObject)(a.attribute) ? a.attribute.ID : a.attribute)));
211
+ }
212
+ catch (e) {
213
+ logger_1.logger.debug(`Reading attribute failed: ${e}`, "zhc:setupattribute");
214
+ }
215
+ }
216
+ }
217
+ }
218
+ }
219
+ function setupConfigureForReporting(cluster, attribute, args) {
220
+ const { config = false, access = undefined, endpointNames = undefined, singleEndpoint = false } = args;
221
+ const configureReporting = !!config;
222
+ const read = !!(access & exposes_1.access.GET);
223
+ if (configureReporting || read) {
224
+ const configure = async (device, coordinatorEndpoint, definition) => {
225
+ const reportConfig = config ? { ...config, attribute: attribute } : { attribute, min: -1, max: -1, change: -1 };
226
+ let endpoints;
227
+ if (endpointNames) {
228
+ (0, node_assert_1.default)(!singleEndpoint, "`endpointNames` cannot be used together with `singleEndpoint`");
229
+ const definitionEndpoints = definition.endpoint(device);
230
+ const endpointIds = endpointNames.map((e) => definitionEndpoints[e]);
231
+ endpoints = device.endpoints.filter((e) => endpointIds.includes(e.ID));
232
+ }
233
+ else {
234
+ endpoints = getEndpointsWithCluster(device, cluster, "input");
235
+ if (singleEndpoint) {
236
+ endpoints = [endpoints[0]];
237
+ }
238
+ }
239
+ for (const endpoint of endpoints) {
240
+ await setupAttributes(endpoint, coordinatorEndpoint, cluster, [reportConfig], configureReporting, read);
241
+ }
242
+ };
243
+ return configure;
244
+ }
245
+ return undefined;
246
+ }
247
+ function setupConfigureForBinding(cluster, clusterType, endpointNames) {
248
+ const configure = async (device, coordinatorEndpoint, definition) => {
249
+ if (endpointNames) {
250
+ const definitionEndpoints = definition.endpoint(device);
251
+ const endpointIds = endpointNames.map((e) => definitionEndpoints[e]);
252
+ const endpoints = device.endpoints.filter((e) => endpointIds.includes(e.ID));
253
+ for (const endpoint of endpoints) {
254
+ await endpoint.bind(cluster, coordinatorEndpoint);
255
+ }
256
+ }
257
+ else {
258
+ const endpoints = getEndpointsWithCluster(device, cluster, clusterType);
259
+ for (const endpoint of endpoints) {
260
+ await endpoint.bind(cluster, coordinatorEndpoint);
261
+ }
262
+ }
263
+ };
264
+ return configure;
265
+ }
266
+ function setupConfigureForReading(cluster, attributes, endpointNames) {
267
+ const configure = async (device, coordinatorEndpoint, definition) => {
268
+ if (endpointNames) {
269
+ const definitionEndpoints = definition.endpoint(device);
270
+ const endpointIds = endpointNames.map((e) => definitionEndpoints[e]);
271
+ const endpoints = device.endpoints.filter((e) => endpointIds.includes(e.ID));
272
+ for (const endpoint of endpoints) {
273
+ await endpoint.read(cluster, attributes);
274
+ }
275
+ }
276
+ else {
277
+ const endpoints = getEndpointsWithCluster(device, cluster, "input");
278
+ for (const endpoint of endpoints) {
279
+ await endpoint.read(cluster, attributes);
280
+ }
281
+ }
282
+ };
283
+ return configure;
284
+ }
285
+ // #region General
286
+ function forceDeviceType(args) {
287
+ const configure = [
288
+ (device, coordinatorEndpoint, definition) => {
289
+ device.type = args.type;
290
+ device.save();
291
+ },
292
+ ];
293
+ return { configure, isModernExtend: true };
294
+ }
295
+ function forcePowerSource(args) {
296
+ const configure = [
297
+ (device, coordinatorEndpoint, definition) => {
298
+ device.powerSource = args.powerSource;
299
+ device.save();
300
+ },
301
+ ];
302
+ return { configure, isModernExtend: true };
303
+ }
304
+ function linkQuality(args = {}) {
305
+ const { reporting = false, attribute = "zclVersion", reportingConfig = { min: "1_HOUR", max: "4_HOURS", change: 0 } } = args;
306
+ // Exposes is empty because the application (e.g. Z2M) adds a linkquality sensor
307
+ // for every device already.
308
+ const exposes = [];
309
+ const fromZigbee = [
310
+ {
311
+ cluster: "genBasic",
312
+ type: ["attributeReport", "readResponse"],
313
+ convert: (model, msg, publish, options, meta) => {
314
+ return { linkquality: msg.linkquality };
315
+ },
316
+ },
317
+ ];
318
+ const result = { exposes, fromZigbee, isModernExtend: true };
319
+ if (reporting) {
320
+ result.configure = [setupConfigureForReporting("genBasic", attribute, { config: reportingConfig, access: exposes_1.access.GET })];
321
+ }
322
+ return result;
323
+ }
324
+ function battery(args = {}) {
325
+ const { percentage = true, voltage = false, lowStatus = false, percentageReporting = true, voltageReporting = false, dontDividePercentage = false, percentageReportingConfig = { min: "1_HOUR", max: "MAX", change: 10 }, voltageReportingConfig = { min: "1_HOUR", max: "MAX", change: 10 }, lowStatusReportingConfig = undefined, voltageToPercentage = undefined, } = args;
326
+ const exposes = [];
327
+ if (percentage) {
328
+ exposes.push(exposes_1.presets
329
+ .numeric("battery", exposes_1.access.STATE_GET)
330
+ .withUnit("%")
331
+ .withDescription("Remaining battery in %")
332
+ .withValueMin(0)
333
+ .withValueMax(100)
334
+ .withCategory("diagnostic"));
335
+ }
336
+ if (voltage) {
337
+ exposes.push(exposes_1.presets.numeric("voltage", exposes_1.access.STATE_GET).withUnit("mV").withDescription("Reported battery voltage in millivolts").withCategory("diagnostic"));
338
+ }
339
+ if (lowStatus) {
340
+ exposes.push(exposes_1.presets.binary("battery_low", exposes_1.access.STATE, true, false).withDescription("Empty battery indicator").withCategory("diagnostic"));
341
+ }
342
+ const fromZigbee = [
343
+ {
344
+ cluster: "genPowerCfg",
345
+ type: ["attributeReport", "readResponse"],
346
+ convert: (model, msg, publish, options, meta) => {
347
+ const payload = {};
348
+ if (msg.data.batteryPercentageRemaining !== undefined && msg.data.batteryPercentageRemaining < 255) {
349
+ // Some devices do not comply to the ZCL and report a
350
+ // batteryPercentageRemaining of 100 when the battery is full (should be 200).
351
+ let percentage = msg.data.batteryPercentageRemaining;
352
+ percentage = dontDividePercentage ? percentage : percentage / 2;
353
+ if (percentage)
354
+ payload.battery = (0, utils_1.precisionRound)(percentage, 2);
355
+ }
356
+ if (msg.data.batteryVoltage !== undefined && msg.data.batteryVoltage < 255) {
357
+ // Deprecated: voltage is = mV now but should be V
358
+ if (voltage)
359
+ payload.voltage = msg.data.batteryVoltage * 100;
360
+ if (voltageToPercentage) {
361
+ payload.battery = (0, utils_1.batteryVoltageToPercentage)(payload.voltage, voltageToPercentage);
362
+ }
363
+ }
364
+ if (msg.data.batteryAlarmState !== undefined) {
365
+ const battery1Low = (msg.data.batteryAlarmState & (1 << 0) ||
366
+ msg.data.batteryAlarmState & (1 << 1) ||
367
+ msg.data.batteryAlarmState & (1 << 2) ||
368
+ msg.data.batteryAlarmState & (1 << 3)) > 0;
369
+ const battery2Low = (msg.data.batteryAlarmState & (1 << 10) ||
370
+ msg.data.batteryAlarmState & (1 << 11) ||
371
+ msg.data.batteryAlarmState & (1 << 12) ||
372
+ msg.data.batteryAlarmState & (1 << 13)) > 0;
373
+ const battery3Low = (msg.data.batteryAlarmState & (1 << 20) ||
374
+ msg.data.batteryAlarmState & (1 << 21) ||
375
+ msg.data.batteryAlarmState & (1 << 22) ||
376
+ msg.data.batteryAlarmState & (1 << 23)) > 0;
377
+ if (lowStatus)
378
+ payload.battery_low = battery1Low || battery2Low || battery3Low;
379
+ }
380
+ return payload;
381
+ },
382
+ },
383
+ ];
384
+ const toZigbee = [
385
+ {
386
+ key: ["battery", "voltage"],
387
+ convertGet: async (entity, key, meta) => {
388
+ // Don't fail GET request if reading fails
389
+ // Split reading is needed for more clear debug logs
390
+ const ep = (0, utils_1.determineEndpoint)(entity, meta, "genPowerCfg");
391
+ try {
392
+ await ep.read("genPowerCfg", ["batteryPercentageRemaining"]);
393
+ }
394
+ catch (e) {
395
+ logger_1.logger.debug(`Reading batteryPercentageRemaining failed: ${e}, device probably doesn't support it`, "zhc:setupattribute");
396
+ }
397
+ try {
398
+ await ep.read("genPowerCfg", ["batteryVoltage"]);
399
+ }
400
+ catch (e) {
401
+ logger_1.logger.debug(`Reading batteryVoltage failed: ${e}, device probably doesn't support it`, "zhc:setupattribute");
402
+ }
403
+ },
404
+ },
405
+ ];
406
+ const result = { exposes, fromZigbee, toZigbee, configure: [], isModernExtend: true };
407
+ if (percentageReporting || voltageReporting) {
408
+ if (percentageReporting) {
409
+ result.configure.push(setupConfigureForReporting("genPowerCfg", "batteryPercentageRemaining", {
410
+ config: percentageReportingConfig,
411
+ access: exposes_1.access.STATE_GET,
412
+ singleEndpoint: true,
413
+ }));
414
+ }
415
+ if (voltageReporting) {
416
+ result.configure.push(setupConfigureForReporting("genPowerCfg", "batteryVoltage", {
417
+ config: voltageReportingConfig,
418
+ access: exposes_1.access.STATE_GET,
419
+ singleEndpoint: true,
420
+ }));
421
+ }
422
+ result.configure.push((0, utils_1.configureSetPowerSourceWhenUnknown)("Battery"));
423
+ }
424
+ if (voltageToPercentage || dontDividePercentage) {
425
+ const meta = { battery: {} };
426
+ if (voltageToPercentage)
427
+ meta.battery.voltageToPercentage = voltageToPercentage;
428
+ if (dontDividePercentage)
429
+ meta.battery.dontDividePercentage = dontDividePercentage;
430
+ result.meta = meta;
431
+ }
432
+ if (lowStatusReportingConfig) {
433
+ result.configure.push(setupConfigureForReporting("genPowerCfg", "batteryAlarmState", {
434
+ config: lowStatusReportingConfig,
435
+ access: exposes_1.access.STATE_GET,
436
+ singleEndpoint: true,
437
+ }));
438
+ }
439
+ return result;
440
+ }
441
+ function deviceTemperature(args = {}) {
442
+ return numeric({
443
+ name: "device_temperature",
444
+ cluster: "genDeviceTempCfg",
445
+ attribute: "currentTemperature",
446
+ reporting: { min: "5_MINUTES", max: "1_HOUR", change: 1 },
447
+ description: "Temperature of the device",
448
+ unit: "°C",
449
+ access: "STATE_GET",
450
+ entityCategory: "diagnostic",
451
+ ...args,
452
+ });
453
+ }
454
+ function identify(args = { isSleepy: false }) {
455
+ const { isSleepy } = args;
456
+ const normal = exposes_1.presets.enum("identify", exposes_1.access.SET, ["identify"]).withDescription("Initiate device identification").withCategory("config");
457
+ const sleepy = exposes_1.presets
458
+ .enum("identify", exposes_1.access.SET, ["identify"])
459
+ .withDescription("Initiate device identification. This device is asleep by default." +
460
+ "You may need to wake it up first before sending the identify command.")
461
+ .withCategory("config");
462
+ const exposes = isSleepy ? [sleepy] : [normal];
463
+ const identifyTimeout = exposes_1.presets
464
+ .numeric("identify_timeout", exposes_1.access.SET)
465
+ .withDescription("Sets the duration of the identification procedure in seconds (i.e., how long the device would flash)." +
466
+ "The value ranges from 1 to 30 seconds (default: 3).")
467
+ .withValueMin(1)
468
+ .withValueMax(30);
469
+ const toZigbee = [
470
+ {
471
+ key: ["identify"],
472
+ options: [identifyTimeout],
473
+ convertSet: async (entity, key, value, meta) => {
474
+ const identifyTimeout = meta.options.identify_timeout ?? 3;
475
+ await entity.command("genIdentify", "identify", { identifytime: identifyTimeout }, (0, utils_1.getOptions)(meta.mapped, entity));
476
+ },
477
+ },
478
+ ];
479
+ return { exposes, toZigbee, isModernExtend: true };
480
+ }
481
+ function onOff(args = {}) {
482
+ const { powerOnBehavior = true, skipDuplicateTransaction = false, configureReporting = true, endpointNames = undefined, description = undefined, ota = false, } = args;
483
+ const exposes = description ? (0, utils_1.exposeEndpoints)(exposes_1.presets.switch(description), endpointNames) : (0, utils_1.exposeEndpoints)(exposes_1.presets.switch(), endpointNames);
484
+ const fromZigbee = [skipDuplicateTransaction ? fz.on_off_skip_duplicate_transaction : fz.on_off];
485
+ const toZigbee = [endpointNames ? { ...tz.on_off, endpoints: endpointNames } : tz.on_off];
486
+ if (powerOnBehavior) {
487
+ exposes.push(...(0, utils_1.exposeEndpoints)(exposes_1.presets.power_on_behavior(["off", "on", "toggle", "previous"]), endpointNames));
488
+ fromZigbee.push(fz.power_on_behavior);
489
+ toZigbee.push(tz.power_on_behavior);
490
+ }
491
+ const result = { exposes, fromZigbee, toZigbee, isModernExtend: true };
492
+ if (ota)
493
+ result.ota = ota;
494
+ if (configureReporting) {
495
+ result.configure = [
496
+ async (device, coordinatorEndpoint) => {
497
+ await setupAttributes(device, coordinatorEndpoint, "genOnOff", [{ attribute: "onOff", min: "MIN", max: "MAX", change: 1 }]);
498
+ if (powerOnBehavior) {
499
+ try {
500
+ // Don't fail configure if reading this attribute fails, some devices don't support it.
501
+ await setupAttributes(device, coordinatorEndpoint, "genOnOff", [{ attribute: "startUpOnOff", min: "MIN", max: "MAX", change: 1 }], false);
502
+ }
503
+ catch (error) {
504
+ if (error.message.includes("UNSUPPORTED_ATTRIBUTE")) {
505
+ logger_1.logger.debug("Reading startUpOnOff failed, this features is unsupported", "zhc:onoff");
506
+ }
507
+ else {
508
+ throw error;
509
+ }
510
+ }
511
+ }
512
+ },
513
+ (0, utils_1.configureSetPowerSourceWhenUnknown)("Mains (single phase)"),
514
+ ];
515
+ }
516
+ return result;
517
+ }
518
+ function commandsOnOff(args = {}) {
519
+ const { commands = ["on", "off", "toggle"], bind = true, endpointNames = undefined } = args;
520
+ let actions = commands;
521
+ if (endpointNames) {
522
+ actions = commands.flatMap((c) => endpointNames.map((e) => `${c}_${e}`));
523
+ }
524
+ const exposes = [exposes_1.presets.enum("action", exposes_1.access.STATE, actions).withDescription("Triggered action (e.g. a button click)")];
525
+ const actionPayloadLookup = {
526
+ commandOn: "on",
527
+ commandOff: "off",
528
+ commandOffWithEffect: "off",
529
+ commandToggle: "toggle",
530
+ };
531
+ const fromZigbee = [
532
+ {
533
+ cluster: "genOnOff",
534
+ type: ["commandOn", "commandOff", "commandOffWithEffect", "commandToggle"],
535
+ convert: (model, msg, publish, options, meta) => {
536
+ if ((0, utils_1.hasAlreadyProcessedMessage)(msg, model))
537
+ return;
538
+ const payload = { action: (0, utils_1.postfixWithEndpointName)(actionPayloadLookup[msg.type], msg, model, meta) };
539
+ (0, utils_1.addActionGroup)(payload, msg, model);
540
+ return payload;
541
+ },
542
+ },
543
+ ];
544
+ const result = { exposes, fromZigbee, isModernExtend: true };
545
+ if (bind)
546
+ result.configure = [setupConfigureForBinding("genOnOff", "output", endpointNames)];
547
+ return result;
548
+ }
549
+ function poll(args) {
550
+ const optionKey = args.optionKey ?? `${args.key}_poll_interval`;
551
+ const onEvent = [
552
+ (event) => {
553
+ if (event.type === "start" || (event.type === "deviceOptionsChanged" && event.data.from[optionKey] !== event.data.to[optionKey])) {
554
+ let seconds = args.defaultIntervalSeconds;
555
+ if (args.option) {
556
+ seconds = (0, utils_1.toNumber)(event.data.options[optionKey] ?? args.defaultIntervalSeconds, optionKey);
557
+ }
558
+ clearTimeout(globalStore.getValue(event.data.device.ieeeAddr, args.key));
559
+ if (seconds <= 0) {
560
+ logger_1.logger.debug(`Not polling '${args.key}' for '${event.data.device.ieeeAddr}' since poll interval is <= 0 (got ${seconds})`, NS);
561
+ }
562
+ else {
563
+ logger_1.logger.debug(`Polling '${args.key}' for '${event.data.device.ieeeAddr}' at an interval of ${seconds}`, NS);
564
+ const setTimer = () => {
565
+ const timer = setTimeout(async () => {
566
+ try {
567
+ await args.poll(event.data.device, event.data.options);
568
+ }
569
+ catch (error) {
570
+ logger_1.logger.debug(`Poll of '${event.data.device.ieeeAddr}' failed (${error})`, NS);
571
+ }
572
+ if (globalStore.getValue(event.data.device.ieeeAddr, args.key) === timer) {
573
+ setTimer();
574
+ }
575
+ }, seconds * 1000);
576
+ globalStore.putValue(event.data.device.ieeeAddr, args.key, timer);
577
+ };
578
+ setTimer();
579
+ }
580
+ }
581
+ else if (event.type === "stop") {
582
+ clearTimeout(globalStore.getValue(event.data.ieeeAddr, args.key));
583
+ globalStore.clearValue(event.data.ieeeAddr, args.key);
584
+ }
585
+ },
586
+ ];
587
+ return { onEvent, options: args.option ? [args.option] : [], isModernExtend: true };
588
+ }
589
+ function writeTimeDaily(args) {
590
+ return poll({
591
+ key: "time",
592
+ defaultIntervalSeconds: 60 * 60 * 24,
593
+ poll: (device) => {
594
+ const time = Math.round((Date.now() - constants.OneJanuary2000) / 1000 + new Date().getTimezoneOffset() * -1 * 60);
595
+ device
596
+ .getEndpoint(args.endpointId)
597
+ .write("genTime", { time: time }, { sendPolicy: "queue" })
598
+ .catch((error) => logger_1.logger.error(`Failed to write time to '${device.ieeeAddr}' (${error})`, NS));
599
+ },
600
+ });
601
+ }
602
+ function iasArmCommandDefaultResponse() {
603
+ const converter = {
604
+ cluster: "ssIasAce",
605
+ type: ["commandArm"],
606
+ convert: (model, msg, publish, options, meta) => {
607
+ // Since arm command has a response zigbee-herdsman doesn't send a default response.
608
+ // This causes the remote to repeat the arm command, so send a default response here.
609
+ msg.endpoint
610
+ .defaultResponse(0, 0, 1281, msg.meta.zclTransactionSequenceNumber)
611
+ .catch((error) => logger_1.logger.error(`Failed to send default response to '${msg.device.ieeeAddr}' (${error})`, NS));
612
+ },
613
+ };
614
+ return { fromZigbee: [converter], isModernExtend: true };
615
+ }
616
+ function iasGetPanelStatusResponse() {
617
+ const converter = {
618
+ cluster: "ssIasAce",
619
+ type: ["commandGetPanelStatus"],
620
+ convert: (model, msg, publish, options, meta) => {
621
+ if (globalStore.hasValue(msg.endpoint, "panelStatus")) {
622
+ const delayUntil = globalStore.getValue(msg.endpoint, "delayUntil", 0);
623
+ const secondsRemain = delayUntil > 0 ? Math.round(Math.max(0, delayUntil - performance.now()) / 1000) : 0;
624
+ const payload = {
625
+ panelstatus: globalStore.getValue(msg.endpoint, "panelStatus"),
626
+ secondsremain: Math.min(secondsRemain, constants.iasMaxSecondsRemain),
627
+ audiblenotif: 0x00,
628
+ alarmstatus: 0x00,
629
+ };
630
+ (0, utils_1.assertNumber)(msg.meta.zclTransactionSequenceNumber);
631
+ msg.endpoint
632
+ .commandResponse("ssIasAce", "getPanelStatusRsp", payload, {}, msg.meta.zclTransactionSequenceNumber)
633
+ .catch((error) => logger_1.logger.error(`Failed to send panel status response '${msg.device.ieeeAddr}' (${error})`, NS));
634
+ }
635
+ },
636
+ };
637
+ return { fromZigbee: [converter], isModernExtend: true };
638
+ }
639
+ function customTimeResponse(start) {
640
+ // The Zigbee Cluster Library specification states that the genTime.time response should be the
641
+ // number of seconds since 1st Jan 2000 00:00:00 UTC. This extend modifies that:
642
+ // 1970_UTC: number of seconds since the Unix Epoch (1st Jan 1970 00:00:00 UTC)
643
+ // 2000_LOCAL: seconds since 1 January in the local time zone.
644
+ // Disable the responses of zigbee-herdsman and respond here instead.
645
+ const onEvent = [
646
+ (event) => {
647
+ if (event.type === "start" && !event.data.device.customReadResponse) {
648
+ event.data.device.customReadResponse = (frame, endpoint) => {
649
+ if (frame.isCluster("genTime")) {
650
+ const payload = {};
651
+ if (start === "1970_UTC") {
652
+ const time = Math.round(Date.now() / 1000);
653
+ payload.time = time;
654
+ payload.localTime = time - new Date().getTimezoneOffset() * 60;
655
+ }
656
+ else if (start === "2000_LOCAL") {
657
+ const oneJanuary2000 = new Date("January 01, 2000 00:00:00 UTC+00:00").getTime();
658
+ const secondsUTC = Math.round((Date.now() - oneJanuary2000) / 1000);
659
+ payload.time = secondsUTC - new Date().getTimezoneOffset() * 60;
660
+ }
661
+ endpoint.readResponse("genTime", frame.header.transactionSequenceNumber, payload).catch((e) => {
662
+ logger_1.logger.warning(`Custom time response failed for '${event.data.device.ieeeAddr}': ${e}`, "zhc:customtimeresponse");
663
+ });
664
+ return true;
665
+ }
666
+ return false;
667
+ };
668
+ }
669
+ },
670
+ ];
671
+ return { onEvent, isModernExtend: true };
672
+ }
673
+ // #endregion
674
+ // #region Measurement and Sensing
675
+ function illuminance(args = {}) {
676
+ const luxScale = (value, type) => {
677
+ let result = value;
678
+ if (type === "from") {
679
+ result = 10 ** ((result - 1) / 10000);
680
+ }
681
+ return result;
682
+ };
683
+ const result = numeric({
684
+ name: "illuminance",
685
+ cluster: "msIlluminanceMeasurement",
686
+ attribute: "measuredValue",
687
+ reporting: { min: "10_SECONDS", max: "1_HOUR", change: 5 }, // 5 lux
688
+ description: "Measured illuminance",
689
+ unit: "lx",
690
+ scale: luxScale,
691
+ access: "STATE_GET",
692
+ ...args,
693
+ });
694
+ const fzIlluminanceRaw = {
695
+ cluster: "msIlluminanceMeasurement",
696
+ type: ["attributeReport", "readResponse"],
697
+ options: [exposes_1.options.illuminance_raw()],
698
+ convert: (model, msg, publish, options, meta) => {
699
+ if (options.illuminance_raw) {
700
+ return { illuminance_raw: msg.data.measuredValue };
701
+ }
702
+ },
703
+ };
704
+ result.fromZigbee.push(fzIlluminanceRaw);
705
+ const exposeIlluminanceRaw = (device, options) => {
706
+ return options?.illuminance_raw ? [exposes_1.presets.illuminance_raw()] : [];
707
+ };
708
+ result.exposes.push(exposeIlluminanceRaw);
709
+ return result;
710
+ }
711
+ function temperature(args = {}) {
712
+ return numeric({
713
+ name: "temperature",
714
+ cluster: "msTemperatureMeasurement",
715
+ attribute: "measuredValue",
716
+ reporting: { min: "10_SECONDS", max: "1_HOUR", change: 100 },
717
+ description: "Measured temperature value",
718
+ unit: "°C",
719
+ scale: 100,
720
+ access: "STATE_GET",
721
+ ...args,
722
+ });
723
+ }
724
+ function pressure(args = {}) {
725
+ return numeric({
726
+ name: "pressure",
727
+ cluster: "msPressureMeasurement",
728
+ attribute: "measuredValue",
729
+ reporting: { min: "10_SECONDS", max: "1_HOUR", change: 50 }, // 5 kPa
730
+ description: "The measured atmospheric pressure",
731
+ unit: "kPa",
732
+ scale: 10,
733
+ access: "STATE_GET",
734
+ ...args,
735
+ });
736
+ }
737
+ function flow(args = {}) {
738
+ return numeric({
739
+ name: "flow",
740
+ cluster: "msFlowMeasurement",
741
+ attribute: "measuredValue",
742
+ reporting: { min: "10_SECONDS", max: "1_HOUR", change: 10 },
743
+ description: "Measured water flow",
744
+ unit: "m³/h",
745
+ scale: 10,
746
+ access: "STATE_GET",
747
+ ...args,
748
+ });
749
+ }
750
+ function humidity(args = {}) {
751
+ return numeric({
752
+ name: "humidity",
753
+ cluster: "msRelativeHumidity",
754
+ attribute: "measuredValue",
755
+ reporting: { min: "10_SECONDS", max: "1_HOUR", change: 100 },
756
+ description: "Measured relative humidity",
757
+ unit: "%",
758
+ scale: 100,
759
+ access: "STATE_GET",
760
+ ...args,
761
+ });
762
+ }
763
+ function soilMoisture(args = {}) {
764
+ return numeric({
765
+ name: "soil_moisture",
766
+ cluster: "msSoilMoisture",
767
+ attribute: "measuredValue",
768
+ reporting: { min: "10_SECONDS", max: "1_HOUR", change: 100 },
769
+ description: "Measured soil moisture value",
770
+ unit: "%",
771
+ scale: 100,
772
+ access: "STATE_GET",
773
+ ...args,
774
+ });
775
+ }
776
+ function windSpeed(args = {}) {
777
+ return numeric({
778
+ name: "wind_speed",
779
+ cluster: "msWindSpeed",
780
+ attribute: "measuredValue",
781
+ reporting: { min: "10_SECONDS", max: "1_HOUR", change: 1 },
782
+ description: "Measured wind speed value",
783
+ unit: "m/s",
784
+ scale: 100,
785
+ access: "STATE_GET",
786
+ ...args,
787
+ });
788
+ }
789
+ function occupancy(args = {}) {
790
+ const { reporting = true, reportingConfig = { min: "MIN", max: "1_HOUR", change: 0 }, pirConfig = undefined, ultrasonicConfig = undefined, contactConfig = undefined, endpointNames = undefined, } = args;
791
+ const templateExposes = [exposes_1.presets.occupancy().withAccess(exposes_1.access.STATE_GET)];
792
+ const exposes = endpointNames
793
+ ? templateExposes.flatMap((exp) => endpointNames.map((ep) => exp.withEndpoint(ep)))
794
+ : templateExposes;
795
+ const fromZigbee = [
796
+ {
797
+ cluster: "msOccupancySensing",
798
+ type: ["attributeReport", "readResponse"],
799
+ options: [exposes_1.options.no_occupancy_since_false()],
800
+ convert: (model, msg, publish, options, meta) => {
801
+ if ("occupancy" in msg.data && (!endpointNames || endpointNames.includes((0, utils_1.getEndpointName)(msg, model, meta).toString()))) {
802
+ const propertyName = (0, utils_1.postfixWithEndpointName)("occupancy", msg, model, meta);
803
+ const payload = { [propertyName]: (msg.data.occupancy & 1) > 0 };
804
+ (0, utils_1.noOccupancySince)(msg.endpoint, options, publish, payload[propertyName] ? "stop" : "start");
805
+ return payload;
806
+ }
807
+ },
808
+ },
809
+ ];
810
+ const toZigbee = [
811
+ {
812
+ key: ["occupancy"],
813
+ convertGet: async (entity, key, meta) => {
814
+ await (0, utils_1.determineEndpoint)(entity, meta, "msOccupancySensing").read("msOccupancySensing", ["occupancy"]);
815
+ },
816
+ },
817
+ ];
818
+ const settingsExtends = [];
819
+ const settingsTemplate = {
820
+ cluster: "msOccupancySensing",
821
+ description: "",
822
+ endpointNames: endpointNames,
823
+ access: "ALL",
824
+ entityCategory: "config",
825
+ };
826
+ const attributesForReading = [];
827
+ if (pirConfig) {
828
+ if (pirConfig.includes("otu_delay")) {
829
+ settingsExtends.push(numeric({
830
+ name: "occupancy_timeout",
831
+ attribute: "pirOToUDelay",
832
+ valueMin: 0,
833
+ valueMax: 65534,
834
+ unit: "s",
835
+ ...settingsTemplate,
836
+ description: "Time in seconds before occupancy is cleared after the last detected movement.",
837
+ }));
838
+ attributesForReading.push("pirOToUDelay");
839
+ }
840
+ if (pirConfig.includes("uto_delay")) {
841
+ settingsExtends.push(numeric({
842
+ name: "pir_uto_delay",
843
+ attribute: "pirUToODelay",
844
+ valueMin: 0,
845
+ valueMax: 65534,
846
+ ...settingsTemplate,
847
+ }));
848
+ attributesForReading.push("pirUToODelay");
849
+ }
850
+ if (pirConfig.includes("uto_threshold")) {
851
+ settingsExtends.push(numeric({
852
+ name: "pir_uto_threshold",
853
+ attribute: "pirUToOThreshold",
854
+ valueMin: 1,
855
+ valueMax: 254,
856
+ ...settingsTemplate,
857
+ }));
858
+ attributesForReading.push("pirUToOThreshold");
859
+ }
860
+ }
861
+ if (ultrasonicConfig) {
862
+ if (ultrasonicConfig.includes("otu_delay")) {
863
+ settingsExtends.push(numeric({
864
+ name: "ultrasonic_otu_delay",
865
+ attribute: "ultrasonicOToUDelay",
866
+ valueMin: 0,
867
+ valueMax: 65534,
868
+ ...settingsTemplate,
869
+ }));
870
+ attributesForReading.push("ultrasonicOToUDelay");
871
+ }
872
+ if (ultrasonicConfig.includes("uto_delay")) {
873
+ settingsExtends.push(numeric({
874
+ name: "ultrasonic_uto_delay",
875
+ attribute: "ultrasonicUToODelay",
876
+ valueMin: 0,
877
+ valueMax: 65534,
878
+ ...settingsTemplate,
879
+ }));
880
+ attributesForReading.push("ultrasonicUToODelay");
881
+ }
882
+ if (ultrasonicConfig.includes("uto_threshold")) {
883
+ settingsExtends.push(numeric({
884
+ name: "ultrasonic_uto_threshold",
885
+ attribute: "ultrasonicUToOThreshold",
886
+ valueMin: 1,
887
+ valueMax: 254,
888
+ ...settingsTemplate,
889
+ }));
890
+ attributesForReading.push("ultrasonicUToOThreshold");
891
+ }
892
+ }
893
+ if (contactConfig) {
894
+ if (contactConfig.includes("otu_delay")) {
895
+ settingsExtends.push(numeric({
896
+ name: "contact_otu_delay",
897
+ attribute: "contactOToUDelay",
898
+ valueMin: 0,
899
+ valueMax: 65534,
900
+ ...settingsTemplate,
901
+ }));
902
+ attributesForReading.push("contactOToUDelay");
903
+ }
904
+ if (contactConfig.includes("uto_delay")) {
905
+ settingsExtends.push(numeric({
906
+ name: "contact_uto_delay",
907
+ attribute: "contactUToODelay",
908
+ valueMin: 0,
909
+ valueMax: 65534,
910
+ ...settingsTemplate,
911
+ }));
912
+ attributesForReading.push("contactUToODelay");
913
+ }
914
+ if (contactConfig.includes("uto_threshold")) {
915
+ settingsExtends.push(numeric({
916
+ name: "contact_uto_threshold",
917
+ attribute: "contactUToOThreshold",
918
+ valueMin: 1,
919
+ valueMax: 254,
920
+ ...settingsTemplate,
921
+ }));
922
+ attributesForReading.push("contactUToOThreshold");
923
+ }
924
+ }
925
+ settingsExtends.map((extend) => exposes.push(...extend.exposes));
926
+ settingsExtends.map((extend) => fromZigbee.push(...extend.fromZigbee));
927
+ settingsExtends.map((extend) => toZigbee.push(...extend.toZigbee));
928
+ const configure = [];
929
+ if (attributesForReading.length > 0)
930
+ configure.push(setupConfigureForReading("msOccupancySensing", attributesForReading, endpointNames));
931
+ if (reporting) {
932
+ configure.push(setupConfigureForReporting("msOccupancySensing", "occupancy", {
933
+ config: reportingConfig,
934
+ access: exposes_1.access.STATE_GET,
935
+ endpointNames: endpointNames,
936
+ }));
937
+ }
938
+ return { exposes, fromZigbee, toZigbee, configure, isModernExtend: true };
939
+ }
940
+ function co2(args = {}) {
941
+ return numeric({
942
+ name: "co2",
943
+ cluster: "msCO2",
944
+ label: "CO2",
945
+ attribute: "measuredValue",
946
+ reporting: { min: "10_SECONDS", max: "1_HOUR", change: 0.00005 }, // 50 ppm change
947
+ description: "Measured value",
948
+ unit: "ppm",
949
+ scale: 0.000001,
950
+ access: "STATE_GET",
951
+ ...args,
952
+ });
953
+ }
954
+ function pm25(args = {}) {
955
+ return numeric({
956
+ name: "pm25",
957
+ cluster: "pm25Measurement",
958
+ attribute: "measuredValue",
959
+ reporting: { min: "10_SECONDS", max: "1_HOUR", change: 1 },
960
+ description: "Measured PM2.5 (particulate matter) concentration",
961
+ unit: "µg/m³",
962
+ access: "STATE_GET",
963
+ ...args,
964
+ });
965
+ }
966
+ function light(args = {}) {
967
+ const { effect = true, powerOnBehavior = true, configureReporting = false, ota = false, color = undefined, levelConfig = undefined, turnsOffAtBrightness1 = false, endpointNames = undefined, levelReportingConfig = undefined, moveToLevelWithOnOffDisable = false, } = args;
968
+ let { colorTemp = undefined } = args;
969
+ if (colorTemp) {
970
+ colorTemp = { startup: true, ...colorTemp };
971
+ }
972
+ const argsColor = color
973
+ ? {
974
+ modes: ["xy"],
975
+ applyRedFix: false,
976
+ enhancedHue: true,
977
+ ...((0, utils_1.isObject)(color) ? color : {}),
978
+ }
979
+ : false;
980
+ const lightExpose = (0, utils_1.exposeEndpoints)(exposes_1.presets.light().withBrightness(), endpointNames);
981
+ const fromZigbee = [fz.on_off, fz.brightness, fz.level_config];
982
+ const toZigbee = [
983
+ endpointNames ? { ...tz.light_onoff_brightness, endpoints: endpointNames } : tz.light_onoff_brightness,
984
+ tz.ignore_transition,
985
+ tz.level_config,
986
+ tz.ignore_rate,
987
+ tz.light_brightness_move,
988
+ tz.light_brightness_step,
989
+ ];
990
+ const meta = {};
991
+ if (colorTemp || argsColor) {
992
+ fromZigbee.push(fz.color_colortemp);
993
+ if (colorTemp && argsColor)
994
+ toZigbee.push(tz.light_color_colortemp);
995
+ else if (colorTemp)
996
+ toZigbee.push(tz.light_colortemp);
997
+ else if (argsColor)
998
+ toZigbee.push(tz.light_color);
999
+ toZigbee.push(tz.light_color_mode, tz.light_color_options);
1000
+ }
1001
+ if (colorTemp) {
1002
+ lightExpose.forEach((e) => {
1003
+ e.withColorTemp(colorTemp.range);
1004
+ });
1005
+ toZigbee.push(tz.light_colortemp_move, tz.light_colortemp_step);
1006
+ if (colorTemp.startup) {
1007
+ toZigbee.push(tz.light_colortemp_startup);
1008
+ lightExpose.forEach((e) => {
1009
+ e.withColorTempStartup(colorTemp.range);
1010
+ });
1011
+ }
1012
+ }
1013
+ if (argsColor) {
1014
+ lightExpose.forEach((e) => {
1015
+ e.withColor(argsColor.modes);
1016
+ });
1017
+ toZigbee.push(tz.light_hue_saturation_move, tz.light_hue_saturation_step);
1018
+ if (argsColor.modes.includes("hs")) {
1019
+ meta.supportsHueAndSaturation = true;
1020
+ }
1021
+ if (argsColor.applyRedFix) {
1022
+ meta.applyRedFix = true;
1023
+ }
1024
+ if (!argsColor.enhancedHue) {
1025
+ meta.supportsEnhancedHue = false;
1026
+ }
1027
+ }
1028
+ if (levelConfig) {
1029
+ lightExpose.forEach((e) => {
1030
+ levelConfig.features ? e.withLevelConfig(levelConfig.features) : e.withLevelConfig();
1031
+ });
1032
+ toZigbee.push(tz.level_config);
1033
+ }
1034
+ const exposes = lightExpose;
1035
+ if (effect) {
1036
+ const effects = exposes_1.presets.effect();
1037
+ if (color) {
1038
+ effects.values.push("colorloop", "stop_colorloop");
1039
+ }
1040
+ exposes.push(...(0, utils_1.exposeEndpoints)(effects, endpointNames));
1041
+ toZigbee.push(tz.effect);
1042
+ }
1043
+ if (powerOnBehavior) {
1044
+ exposes.push(...(0, utils_1.exposeEndpoints)(exposes_1.presets.power_on_behavior(["off", "on", "toggle", "previous"]), endpointNames));
1045
+ fromZigbee.push(fz.power_on_behavior);
1046
+ toZigbee.push(tz.power_on_behavior);
1047
+ }
1048
+ if (turnsOffAtBrightness1) {
1049
+ meta.turnsOffAtBrightness1 = turnsOffAtBrightness1;
1050
+ }
1051
+ if (moveToLevelWithOnOffDisable) {
1052
+ meta.moveToLevelWithOnOffDisable = true;
1053
+ }
1054
+ const configure = [
1055
+ async (device, coordinatorEndpoint, definition) => {
1056
+ await (0, light_1.configure)(device, coordinatorEndpoint, true);
1057
+ if (configureReporting) {
1058
+ await setupAttributes(device, coordinatorEndpoint, "genOnOff", [{ attribute: "onOff", min: "MIN", max: "MAX", change: 1 }]);
1059
+ await setupAttributes(device, coordinatorEndpoint, "genLevelCtrl", [
1060
+ { attribute: "currentLevel", min: "5_SECONDS", max: "MAX", change: 1, ...(levelReportingConfig || {}) },
1061
+ ]);
1062
+ if (colorTemp) {
1063
+ await setupAttributes(device, coordinatorEndpoint, "lightingColorCtrl", [
1064
+ { attribute: "colorTemperature", min: "10_SECONDS", max: "MAX", change: 1 },
1065
+ ]);
1066
+ }
1067
+ if (argsColor) {
1068
+ const attributes = [];
1069
+ if (argsColor.modes.includes("xy")) {
1070
+ attributes.push({ attribute: "currentX", min: "10_SECONDS", max: "MAX", change: 1 }, { attribute: "currentY", min: "10_SECONDS", max: "MAX", change: 1 });
1071
+ }
1072
+ if (argsColor.modes.includes("hs")) {
1073
+ attributes.push({ attribute: argsColor.enhancedHue ? "enhancedCurrentHue" : "currentHue", min: "10_SECONDS", max: "MAX", change: 1 }, { attribute: "currentSaturation", min: "10_SECONDS", max: "MAX", change: 1 });
1074
+ }
1075
+ await setupAttributes(device, coordinatorEndpoint, "lightingColorCtrl", attributes);
1076
+ }
1077
+ }
1078
+ },
1079
+ (0, utils_1.configureSetPowerSourceWhenUnknown)("Mains (single phase)"),
1080
+ ];
1081
+ const result = { exposes, fromZigbee, toZigbee, configure, meta, isModernExtend: true };
1082
+ if (ota)
1083
+ result.ota = ota;
1084
+ return result;
1085
+ }
1086
+ function commandsLevelCtrl(args = {}) {
1087
+ const { commands = [
1088
+ "brightness_move_to_level",
1089
+ "brightness_move_up",
1090
+ "brightness_move_down",
1091
+ "brightness_step_up",
1092
+ "brightness_step_down",
1093
+ "brightness_stop",
1094
+ ], bind = true, endpointNames = undefined, } = args;
1095
+ let actions = commands;
1096
+ if (endpointNames) {
1097
+ actions = commands.flatMap((c) => endpointNames.map((e) => `${c}_${e}`));
1098
+ }
1099
+ const exposes = [
1100
+ exposes_1.presets.enum("action", exposes_1.access.STATE, actions).withDescription("Triggered action (e.g. a button click)").withCategory("diagnostic"),
1101
+ ];
1102
+ const fromZigbee = [fz.command_move_to_level, fz.command_move, fz.command_step, fz.command_stop];
1103
+ const result = { exposes, fromZigbee, isModernExtend: true };
1104
+ if (bind)
1105
+ result.configure = [setupConfigureForBinding("genLevelCtrl", "output", endpointNames)];
1106
+ return result;
1107
+ }
1108
+ function commandsColorCtrl(args = {}) {
1109
+ const { commands = [
1110
+ "color_temperature_move_stop",
1111
+ "color_temperature_move_up",
1112
+ "color_temperature_move_down",
1113
+ "color_temperature_step_up",
1114
+ "color_temperature_step_down",
1115
+ "enhanced_move_to_hue_and_saturation",
1116
+ "move_to_hue_and_saturation",
1117
+ "color_hue_step_up",
1118
+ "color_hue_step_down",
1119
+ "color_saturation_step_up",
1120
+ "color_saturation_step_down",
1121
+ "color_loop_set",
1122
+ "color_temperature_move",
1123
+ "color_move",
1124
+ "hue_move",
1125
+ "hue_stop",
1126
+ "move_to_saturation",
1127
+ "move_to_hue",
1128
+ "stop_move_step",
1129
+ ], bind = true, endpointNames = undefined, } = args;
1130
+ let actions = commands;
1131
+ if (endpointNames) {
1132
+ actions = commands.flatMap((c) => endpointNames.map((e) => `${c}_${e}`));
1133
+ }
1134
+ const exposes = [
1135
+ exposes_1.presets.enum("action", exposes_1.access.STATE, actions).withDescription("Triggered action (e.g. a button click)").withCategory("diagnostic"),
1136
+ ];
1137
+ const fromZigbee = [
1138
+ fz.command_move_color_temperature,
1139
+ fz.command_step_color_temperature,
1140
+ fz.command_enhanced_move_to_hue_and_saturation,
1141
+ fz.command_move_to_hue_and_saturation,
1142
+ fz.command_step_hue,
1143
+ fz.command_step_saturation,
1144
+ fz.command_color_loop_set,
1145
+ fz.command_move_to_color_temp,
1146
+ fz.command_move_to_color,
1147
+ fz.command_move_hue,
1148
+ fz.command_move_to_saturation,
1149
+ fz.command_move_to_hue,
1150
+ fz.command_stop_move_step,
1151
+ ];
1152
+ const result = { exposes, fromZigbee, isModernExtend: true };
1153
+ if (bind)
1154
+ result.configure = [setupConfigureForBinding("lightingColorCtrl", "output", endpointNames)];
1155
+ return result;
1156
+ }
1157
+ function lightingBallast() {
1158
+ const result = {
1159
+ fromZigbee: [fz.lighting_ballast_configuration],
1160
+ toZigbee: [tz.ballast_config],
1161
+ exposes: [
1162
+ new exposes_1.Numeric("ballast_minimum_level", exposes_1.access.ALL)
1163
+ .withValueMin(1)
1164
+ .withValueMax(254)
1165
+ .withDescription("Specifies the minimum light output of the ballast"),
1166
+ new exposes_1.Numeric("ballast_maximum_level", exposes_1.access.ALL)
1167
+ .withValueMin(1)
1168
+ .withValueMax(254)
1169
+ .withDescription("Specifies the maximum light output of the ballast"),
1170
+ ],
1171
+ configure: [setupConfigureForReading("lightingBallastCfg", ["minLevel", "maxLevel"])],
1172
+ isModernExtend: true,
1173
+ };
1174
+ return result;
1175
+ }
1176
+ // #endregion
1177
+ // #region HVAC
1178
+ function customLocalTemperatureCalibrationRange({ min, max }) {
1179
+ // Some devices have a custom range for localTemperatureCalibration attribute.
1180
+ // To find the range for a specific device: https://github.com/Koenkk/zigbee2mqtt/issues/30448#issuecomment-3707495349
1181
+ return deviceAddCustomCluster("hvacThermostat", {
1182
+ ID: 0x0201,
1183
+ attributes: {
1184
+ localTemperatureCalibration: { ID: 0x0010, type: enums_1.DataType.INT8, write: true, min: min * 10, max: max * 10, default: 0 },
1185
+ },
1186
+ commands: {},
1187
+ commandsResponse: {},
1188
+ });
1189
+ }
1190
+ function lock(args) {
1191
+ const { endpointNames = undefined, pinCodeCount, readPinCodeOnProgrammingEvent = false } = args;
1192
+ const fromZigbee = [fz.lock, fz.lock_operation_event, fz.lock_programming_event, fz.lock_pin_code_response, fz.lock_user_status_response];
1193
+ const toZigbee = [{ ...tz.lock, endpoints: endpointNames }, tz.pincode_lock, tz.lock_userstatus, tz.lock_auto_relock_time, tz.lock_sound_volume];
1194
+ const exposes = [
1195
+ exposes_1.presets.lock(),
1196
+ exposes_1.presets.pincode(),
1197
+ exposes_1.presets.lock_action(),
1198
+ exposes_1.presets.lock_action_source_name(),
1199
+ exposes_1.presets.lock_action_user(),
1200
+ exposes_1.presets.auto_relock_time().withValueMin(0).withValueMax(3600),
1201
+ exposes_1.presets.sound_volume(),
1202
+ ];
1203
+ const configure = [
1204
+ setupConfigureForReporting("closuresDoorLock", "lockState", { config: { min: "MIN", max: "1_HOUR", change: 0 }, access: exposes_1.access.STATE_GET }),
1205
+ ];
1206
+ const meta = { pinCodeCount: pinCodeCount };
1207
+ const result = { fromZigbee, toZigbee, exposes, configure, meta, isModernExtend: true };
1208
+ if (endpointNames) {
1209
+ result.exposes = (0, utils_1.flatten)(exposes.map((expose) => endpointNames.map((endpoint) => expose.clone().withEndpoint(endpoint))));
1210
+ }
1211
+ if (readPinCodeOnProgrammingEvent) {
1212
+ fromZigbee.push(fz.lock_programming_event_read_pincode);
1213
+ }
1214
+ return result;
1215
+ }
1216
+ function windowCovering(args) {
1217
+ const { stateSource = "lift", configureReporting = true, controls, coverInverted = false, coverMode, endpointNames = undefined } = args;
1218
+ let coverExpose = exposes_1.presets.cover();
1219
+ if (controls.includes("lift"))
1220
+ coverExpose = coverExpose.withPosition();
1221
+ if (controls.includes("tilt"))
1222
+ coverExpose = coverExpose.withTilt();
1223
+ const exposes = [coverExpose];
1224
+ const fromZigbee = [fz.cover_position_tilt];
1225
+ const toZigbee = [{ ...tz.cover_state, endpoints: endpointNames }, tz.cover_position_tilt];
1226
+ const result = { exposes, fromZigbee, toZigbee, isModernExtend: true };
1227
+ if (configureReporting) {
1228
+ const configure = [];
1229
+ if (controls.includes("lift")) {
1230
+ configure.push(setupConfigureForReporting("closuresWindowCovering", "currentPositionLiftPercentage", {
1231
+ config: { min: "1_SECOND", max: "MAX", change: 1 },
1232
+ access: exposes_1.access.STATE_GET,
1233
+ }));
1234
+ }
1235
+ if (controls.includes("tilt")) {
1236
+ configure.push(setupConfigureForReporting("closuresWindowCovering", "currentPositionTiltPercentage", {
1237
+ config: { min: "1_SECOND", max: "MAX", change: 1 },
1238
+ access: exposes_1.access.STATE_GET,
1239
+ }));
1240
+ }
1241
+ result.configure = configure;
1242
+ }
1243
+ if (coverInverted || stateSource === "tilt") {
1244
+ const meta = {};
1245
+ if (coverInverted)
1246
+ meta.coverInverted = true;
1247
+ if (stateSource === "tilt")
1248
+ meta.coverStateFromTilt = true;
1249
+ result.meta = meta;
1250
+ }
1251
+ if (coverMode) {
1252
+ result.toZigbee.push(tz.cover_mode);
1253
+ result.exposes.push(exposes_1.presets.cover_mode());
1254
+ }
1255
+ if (endpointNames) {
1256
+ result.exposes = (0, utils_1.flatten)(exposes.map((expose) => endpointNames.map((endpoint) => expose.clone().withEndpoint(endpoint))));
1257
+ }
1258
+ return result;
1259
+ }
1260
+ function commandsWindowCovering(args = {}) {
1261
+ const { commands = ["open", "close", "stop"], bind = true, endpointNames = undefined } = args;
1262
+ let actions = commands;
1263
+ if (endpointNames) {
1264
+ actions = commands.flatMap((c) => endpointNames.map((e) => `${c}_${e}`));
1265
+ }
1266
+ const exposes = [
1267
+ exposes_1.presets.enum("action", exposes_1.access.STATE, actions).withDescription("Triggered action (e.g. a button click)").withCategory("diagnostic"),
1268
+ ];
1269
+ const actionPayloadLookup = {
1270
+ commandUpOpen: "open",
1271
+ commandDownClose: "close",
1272
+ commandStop: "stop",
1273
+ };
1274
+ const fromZigbee = [
1275
+ {
1276
+ cluster: "closuresWindowCovering",
1277
+ type: ["commandUpOpen", "commandDownClose", "commandStop"],
1278
+ convert: (model, msg, publish, options, meta) => {
1279
+ if ((0, utils_1.hasAlreadyProcessedMessage)(msg, model))
1280
+ return;
1281
+ const payload = { action: (0, utils_1.postfixWithEndpointName)(actionPayloadLookup[msg.type], msg, model, meta) };
1282
+ (0, utils_1.addActionGroup)(payload, msg, model);
1283
+ return payload;
1284
+ },
1285
+ },
1286
+ ];
1287
+ const result = { exposes, fromZigbee, isModernExtend: true };
1288
+ if (bind)
1289
+ result.configure = [setupConfigureForBinding("closuresWindowCovering", "output", endpointNames)];
1290
+ return result;
1291
+ }
1292
+ function iasZoneAlarm(args) {
1293
+ const exposes = [];
1294
+ let invertAlarmPayload = args.zoneType === "contact";
1295
+ if (args.invertAlarm)
1296
+ invertAlarmPayload = !invertAlarmPayload;
1297
+ const bothAlarms = args.zoneAttributes.includes("alarm_1") && args.zoneAttributes.includes("alarm_2");
1298
+ let alarm1Name = "alarm_1";
1299
+ let alarm2Name = "alarm_2";
1300
+ if (args.zoneType === "generic") {
1301
+ args.zoneAttributes.forEach((attr) => {
1302
+ let expose = IAS_EXPOSE_LOOKUP[attr];
1303
+ if (args.description) {
1304
+ expose = expose.clone().withDescription(args.description);
1305
+ }
1306
+ exposes.push(expose);
1307
+ });
1308
+ }
1309
+ else {
1310
+ if (bothAlarms) {
1311
+ exposes.push(exposes_1.presets
1312
+ .binary(`${args.zoneType}_alarm_1`, exposes_1.access.STATE, true, false)
1313
+ .withDescription(`${IAS_EXPOSE_LOOKUP[args.zoneType].description} (alarm_1)`));
1314
+ alarm1Name = `${args.zoneType}_alarm_1`;
1315
+ exposes.push(exposes_1.presets
1316
+ .binary(`${args.zoneType}_alarm_2`, exposes_1.access.STATE, true, false)
1317
+ .withDescription(`${IAS_EXPOSE_LOOKUP[args.zoneType].description} (alarm_2)`));
1318
+ alarm2Name = `${args.zoneType}_alarm_2`;
1319
+ }
1320
+ else {
1321
+ exposes.push(IAS_EXPOSE_LOOKUP[args.zoneType]);
1322
+ alarm1Name = args.zoneType;
1323
+ alarm2Name = args.zoneType;
1324
+ }
1325
+ args.zoneAttributes.forEach((attr) => {
1326
+ if (attr !== "alarm_1" && attr !== "alarm_2")
1327
+ exposes.push(IAS_EXPOSE_LOOKUP[attr]);
1328
+ });
1329
+ }
1330
+ if (args.manufacturerZoneAttributes)
1331
+ args.manufacturerZoneAttributes.forEach((attr) => {
1332
+ let expose = exposes_1.presets.binary(attr.name, exposes_1.access.STATE, attr.valueOn, attr.valueOff).withDescription(attr.description);
1333
+ if (attr.entityCategory)
1334
+ expose = expose.withCategory(attr.entityCategory);
1335
+ exposes.push(expose);
1336
+ });
1337
+ const timeoutProperty = `${args.zoneType}_timeout`;
1338
+ const fromZigbee = [
1339
+ {
1340
+ cluster: "ssIasZone",
1341
+ type: ["commandStatusChangeNotification", "attributeReport", "readResponse"],
1342
+ options: args.alarmTimeout
1343
+ ? [
1344
+ exposes_1.presets
1345
+ .numeric(timeoutProperty, exposes_1.access.SET)
1346
+ .withValueMin(0)
1347
+ .withDescription(`Time in seconds after which ${args.zoneType} is cleared after detecting it (default 90 seconds).`),
1348
+ ]
1349
+ : [],
1350
+ convert: (model, msg, publish, options, meta) => {
1351
+ if (args.alarmTimeout) {
1352
+ const timeout = options?.[timeoutProperty] != null ? Number(options[timeoutProperty]) : 90;
1353
+ clearTimeout(globalStore.getValue(msg.endpoint, "timer"));
1354
+ if (timeout !== 0) {
1355
+ const timer = setTimeout(() => publish({ [alarm1Name]: false, [alarm2Name]: false }), timeout * 1000);
1356
+ globalStore.putValue(msg.endpoint, "timer", timer);
1357
+ }
1358
+ }
1359
+ const isChange = msg.type === "commandStatusChangeNotification";
1360
+ const zoneStatus = "zonestatus" in msg.data ? msg.data.zonestatus : msg.data.zoneStatus;
1361
+ if (zoneStatus !== undefined) {
1362
+ let payload = {};
1363
+ if (args.zoneAttributes.includes("tamper")) {
1364
+ payload = { tamper: (zoneStatus & (1 << 2)) > 0, ...payload };
1365
+ }
1366
+ if (args.zoneAttributes.includes("battery_low")) {
1367
+ payload = { battery_low: (zoneStatus & (1 << 3)) > 0, ...payload };
1368
+ }
1369
+ if (args.zoneAttributes.includes("supervision_reports")) {
1370
+ payload = { supervision_reports: (zoneStatus & (1 << 4)) > 0, ...payload };
1371
+ }
1372
+ if (args.zoneAttributes.includes("restore_reports")) {
1373
+ payload = { restore_reports: (zoneStatus & (1 << 5)) > 0, ...payload };
1374
+ }
1375
+ if (args.zoneAttributes.includes("trouble")) {
1376
+ payload = { trouble: (zoneStatus & (1 << 6)) > 0, ...payload };
1377
+ }
1378
+ if (args.zoneAttributes.includes("ac_status")) {
1379
+ payload = { ac_status: (zoneStatus & (1 << 7)) > 0, ...payload };
1380
+ }
1381
+ if (args.zoneAttributes.includes("test")) {
1382
+ payload = { test: (zoneStatus & (1 << 8)) > 0, ...payload };
1383
+ }
1384
+ if (args.zoneAttributes.includes("battery_defect")) {
1385
+ payload = { battery_defect: (zoneStatus & (1 << 9)) > 0, ...payload };
1386
+ }
1387
+ let alarm1Payload = (zoneStatus & 1) > 0;
1388
+ let alarm2Payload = (zoneStatus & (1 << 1)) > 0;
1389
+ if (invertAlarmPayload) {
1390
+ alarm1Payload = !alarm1Payload;
1391
+ alarm2Payload = !alarm2Payload;
1392
+ }
1393
+ // Can't just alarm1Payload || alarm2Payload as an unused alarm's bit might be always 1 or random in the received data
1394
+ let addTimeout = false;
1395
+ if (args.zoneAttributes.includes("alarm_1")) {
1396
+ payload = { [alarm1Name]: alarm1Payload, ...payload };
1397
+ addTimeout ||= alarm1Payload;
1398
+ }
1399
+ if (args.zoneAttributes.includes("alarm_2")) {
1400
+ payload = { [alarm2Name]: alarm2Payload, ...payload };
1401
+ addTimeout ||= alarm2Payload;
1402
+ }
1403
+ const keepAliveTimeout = args?.keepAliveTimeout?.(msg.device);
1404
+ if (isChange && keepAliveTimeout !== undefined && keepAliveTimeout > 0) {
1405
+ // This sensor continuously sends occupation updates as long as motion is detected; (re)start a timeout
1406
+ // each time we receive one, in case the clearance message gets lost. Normally, these kinds of sensors
1407
+ // send a clearance message, so this is an additional safety measure.
1408
+ clearTimeout(globalStore.getValue(msg.endpoint, "timeout"));
1409
+ if (addTimeout) {
1410
+ // At least one zone active
1411
+ const timer = setTimeout(() => publish({ [alarm1Name]: false, [alarm2Name]: false }), keepAliveTimeout * 1000);
1412
+ globalStore.putValue(msg.endpoint, "timeout", timer);
1413
+ }
1414
+ else {
1415
+ globalStore.clearValue(msg.endpoint, "timeout");
1416
+ }
1417
+ }
1418
+ if (args.manufacturerZoneAttributes)
1419
+ args.manufacturerZoneAttributes.forEach((attr) => {
1420
+ payload = { [attr.name]: (zoneStatus & (1 << attr.bit)) > 0, ...payload };
1421
+ });
1422
+ return payload;
1423
+ }
1424
+ },
1425
+ },
1426
+ ];
1427
+ let configure;
1428
+ if (args.zoneStatusReporting) {
1429
+ configure = [
1430
+ async (device, coordinatorEndpoint) => {
1431
+ await setupAttributes(device, coordinatorEndpoint, "ssIasZone", [{ attribute: "zoneStatus", min: "MIN", max: "MAX", change: 0 }]);
1432
+ },
1433
+ ];
1434
+ }
1435
+ return { fromZigbee, exposes, isModernExtend: true, ...(configure && { configure }) };
1436
+ }
1437
+ function iasWarning(args = {}) {
1438
+ const { reversePayload = false } = args;
1439
+ const warningMode = { stop: 0, burglar: 1, fire: 2, emergency: 3, police_panic: 4, fire_panic: 5, emergency_panic: 6 };
1440
+ // levels for siren, strobe and squawk are identical
1441
+ const level = { low: 0, medium: 1, high: 2, very_high: 3 };
1442
+ const exposes = [
1443
+ exposes_1.presets
1444
+ .composite("warning", "warning", exposes_1.access.SET)
1445
+ .withFeature(exposes_1.presets.enum("mode", exposes_1.access.SET, Object.keys(warningMode)).withDescription("Mode of the warning (sound effect)"))
1446
+ .withFeature(exposes_1.presets.enum("level", exposes_1.access.SET, Object.keys(level)).withDescription("Sound level"))
1447
+ .withFeature(exposes_1.presets.enum("strobe_level", exposes_1.access.SET, Object.keys(level)).withDescription("Intensity of the strobe"))
1448
+ .withFeature(exposes_1.presets.binary("strobe", exposes_1.access.SET, true, false).withDescription("Turn on/off the strobe (light) during warning"))
1449
+ .withFeature(exposes_1.presets.numeric("strobe_duty_cycle", exposes_1.access.SET).withValueMax(10).withValueMin(0).withDescription("Length of the flash cycle"))
1450
+ .withFeature(exposes_1.presets.numeric("duration", exposes_1.access.SET).withUnit("s").withDescription("Duration in seconds of the alarm")),
1451
+ ];
1452
+ const toZigbee = [
1453
+ {
1454
+ key: ["warning"],
1455
+ convertSet: async (entity, key, value, meta) => {
1456
+ const values = {
1457
+ // @ts-expect-error ignore
1458
+ mode: value.mode || "emergency",
1459
+ // @ts-expect-error ignore
1460
+ level: value.level || "medium",
1461
+ // @ts-expect-error ignore
1462
+ strobe: value.strobe != null ? value.strobe : true,
1463
+ // @ts-expect-error ignore
1464
+ duration: value.duration != null ? value.duration : 10,
1465
+ // @ts-expect-error ignore
1466
+ strobeDutyCycle: value.strobe_duty_cycle != null ? value.strobe_duty_cycle * 10 : 0,
1467
+ // @ts-expect-error ignore
1468
+ strobeLevel: value.strobe_level != null ? utils.getFromLookup(value.strobe_level, strobeLevel) : 1,
1469
+ };
1470
+ // biome-ignore lint/suspicious/noImplicitAnyLet: ignored using `--suppress`
1471
+ let info;
1472
+ if (reversePayload) {
1473
+ info = (0, utils_1.getFromLookup)(values.mode, warningMode) + ((values.strobe ? 1 : 0) << 4) + ((0, utils_1.getFromLookup)(values.level, level) << 6);
1474
+ }
1475
+ else {
1476
+ info = ((0, utils_1.getFromLookup)(values.mode, warningMode) << 4) + ((values.strobe ? 1 : 0) << 2) + (0, utils_1.getFromLookup)(values.level, level);
1477
+ }
1478
+ const payload = {
1479
+ startwarninginfo: info,
1480
+ warningduration: values.duration,
1481
+ strobedutycycle: values.strobeDutyCycle,
1482
+ strobelevel: values.strobeLevel,
1483
+ };
1484
+ await entity.command("ssIasWd", "startWarning", payload, (0, utils_1.getOptions)(meta.mapped, entity));
1485
+ },
1486
+ },
1487
+ ];
1488
+ return { toZigbee, exposes, isModernExtend: true };
1489
+ }
1490
+ function genericMeter(args = {}) {
1491
+ const { tariffs = false } = args;
1492
+ if (args.cluster !== "electrical") {
1493
+ const divisors = new Set([
1494
+ args.cluster === "metering" && (0, utils_1.isObject)(args.power) ? args.power?.divisor : false,
1495
+ (0, utils_1.isObject)(args.energy) ? args.energy?.divisor : false,
1496
+ (0, utils_1.isObject)(args.producedEnergy) ? args.producedEnergy?.divisor : false,
1497
+ ]);
1498
+ divisors.delete(false);
1499
+ const multipliers = new Set([
1500
+ args.cluster === "metering" && (0, utils_1.isObject)(args.power) ? args.power?.multiplier : false,
1501
+ (0, utils_1.isObject)(args.energy) ? args.energy?.multiplier : false,
1502
+ (0, utils_1.isObject)(args.producedEnergy) ? args.producedEnergy?.multiplier : false,
1503
+ ]);
1504
+ multipliers.delete(false);
1505
+ if (multipliers.size > 1 || divisors.size > 1) {
1506
+ throw new Error(`When cluster is metering, power and energy divisor/multiplier should be equal, got divisors=${Array.from(divisors).join(", ")}, multipliers=${Array.from(multipliers).join(", ")}`);
1507
+ }
1508
+ }
1509
+ if (args.cluster === "electrical" && args.producedEnergy) {
1510
+ throw new Error(`Produced energy is not supported with cluster 'electrical', use 'both' or 'metering'`);
1511
+ }
1512
+ if (args.cluster === "metering" && args.acFrequency) {
1513
+ throw new Error(`AC frequency is not supported with cluster 'metering', use 'both' or 'electrical'`);
1514
+ }
1515
+ if (args.cluster === "metering" && args.powerFactor) {
1516
+ throw new Error(`Power factor is not supported with cluster 'metering', use 'both' or 'electrical'`);
1517
+ }
1518
+ if (args.cluster === "metering" && args.electricalMeasurementType === "dc") {
1519
+ throw new Error(`DC attributes are not supported with cluster 'metering', use 'both' or 'ac'`);
1520
+ }
1521
+ let exposes = [];
1522
+ let fromZigbee;
1523
+ let toZigbee;
1524
+ const changeLookup = {
1525
+ gas: {
1526
+ power: 0.01,
1527
+ energy: 0.1,
1528
+ },
1529
+ electricity: {
1530
+ power: 0.005,
1531
+ energy: 0.1,
1532
+ },
1533
+ };
1534
+ const configureLookup = {
1535
+ haElectricalMeasurement: {
1536
+ // Report change with every 5W change
1537
+ power: { attribute: "activePower", divisor: "acPowerDivisor", multiplier: "acPowerMultiplier", forced: args.power, change: 5 },
1538
+ power_phase_b: {
1539
+ attribute: "activePowerPhB",
1540
+ divisor: "acPowerDivisor",
1541
+ multiplier: "acPowerMultiplier",
1542
+ forced: args.power,
1543
+ change: 5,
1544
+ },
1545
+ power_phase_c: {
1546
+ attribute: "activePowerPhC",
1547
+ divisor: "acPowerDivisor",
1548
+ multiplier: "acPowerMultiplier",
1549
+ forced: args.power,
1550
+ change: 5,
1551
+ },
1552
+ // Report change with every 0.05A change
1553
+ current: {
1554
+ attribute: "rmsCurrent",
1555
+ divisor: "acCurrentDivisor",
1556
+ multiplier: "acCurrentMultiplier",
1557
+ forced: args.current,
1558
+ change: 0.05,
1559
+ },
1560
+ // Report change every 1 Hz
1561
+ ac_frequency: {
1562
+ attribute: "acFrequency",
1563
+ divisor: "acFrequencyDivisor",
1564
+ multiplier: "acFrequencyMultiplier",
1565
+ forced: (0, utils_1.isObject)(args.acFrequency) ? args.acFrequency : false,
1566
+ change: 1,
1567
+ },
1568
+ current_phase_b: {
1569
+ attribute: "rmsCurrentPhB",
1570
+ divisor: "acCurrentDivisor",
1571
+ multiplier: "acCurrentMultiplier",
1572
+ forced: args.current,
1573
+ change: 0.05,
1574
+ },
1575
+ current_phase_c: {
1576
+ attribute: "rmsCurrentPhC",
1577
+ divisor: "acCurrentDivisor",
1578
+ multiplier: "acCurrentMultiplier",
1579
+ forced: args.current,
1580
+ change: 0.05,
1581
+ },
1582
+ power_factor: {
1583
+ attribute: "powerFactor",
1584
+ change: 10,
1585
+ },
1586
+ // Report change with every 5V change
1587
+ voltage: {
1588
+ attribute: "rmsVoltage",
1589
+ divisor: "acVoltageDivisor",
1590
+ multiplier: "acVoltageMultiplier",
1591
+ forced: args.voltage,
1592
+ change: 5,
1593
+ },
1594
+ voltage_phase_b: {
1595
+ attribute: "rmsVoltagePhB",
1596
+ divisor: "acVoltageDivisor",
1597
+ multiplier: "acVoltageMultiplier",
1598
+ forced: args.voltage,
1599
+ change: 5,
1600
+ },
1601
+ voltage_phase_c: {
1602
+ attribute: "rmsVoltagePhC",
1603
+ divisor: "acVoltageDivisor",
1604
+ multiplier: "acVoltageMultiplier",
1605
+ forced: args.voltage,
1606
+ change: 5,
1607
+ },
1608
+ // Report change with every 100mW change
1609
+ dc_power: {
1610
+ attribute: "dcPower",
1611
+ divisor: "dcPowerDivisor",
1612
+ multiplier: "dcPowerMultiplier",
1613
+ forced: args.power,
1614
+ change: 0.1,
1615
+ },
1616
+ // Report change with every 100mV change
1617
+ dc_voltage: {
1618
+ attribute: "dcVoltage",
1619
+ divisor: "dcVoltageDivisor",
1620
+ multiplier: "dcVoltageMultiplier",
1621
+ forced: args.voltage,
1622
+ change: 0.1,
1623
+ },
1624
+ // Report change with every 100mA change
1625
+ dc_current: {
1626
+ attribute: "dcCurrent",
1627
+ divisor: "dcCurrentDivisor",
1628
+ multiplier: "dcCurrentMultiplier",
1629
+ forced: args.current,
1630
+ change: 0.1,
1631
+ },
1632
+ },
1633
+ seMetering: {
1634
+ // Report change with every 5W change
1635
+ power: {
1636
+ attribute: "instantaneousDemand",
1637
+ divisor: "divisor",
1638
+ multiplier: "multiplier",
1639
+ forced: args.power,
1640
+ change: changeLookup[args.type].power,
1641
+ },
1642
+ // Report change with every 0.1kWh change
1643
+ energy: {
1644
+ attribute: "currentSummDelivered",
1645
+ divisor: "divisor",
1646
+ multiplier: "multiplier",
1647
+ forced: args.energy,
1648
+ change: changeLookup[args.type].energy,
1649
+ },
1650
+ produced_energy: {
1651
+ attribute: "currentSummReceived",
1652
+ divisor: "divisor",
1653
+ multiplier: "multiplier",
1654
+ forced: (0, utils_1.isObject)(args.producedEnergy) ? args.producedEnergy : false,
1655
+ change: 0.1,
1656
+ },
1657
+ energy_tier_1: {
1658
+ attribute: "currentTier1SummDelivered",
1659
+ divisor: "divisor",
1660
+ multiplier: "multiplier",
1661
+ forced: false,
1662
+ change: 0.1,
1663
+ },
1664
+ energy_tier_2: {
1665
+ attribute: "currentTier2SummDelivered",
1666
+ divisor: "divisor",
1667
+ multiplier: "multiplier",
1668
+ forced: false,
1669
+ change: 0.1,
1670
+ },
1671
+ produced_energy_tier_1: {
1672
+ attribute: "currentTier1SummReceived",
1673
+ divisor: "divisor",
1674
+ multiplier: "multiplier",
1675
+ forced: false,
1676
+ change: 0.1,
1677
+ },
1678
+ produced_energy_tier_2: {
1679
+ attribute: "currentTier2SummReceived",
1680
+ divisor: "divisor",
1681
+ multiplier: "multiplier",
1682
+ forced: false,
1683
+ change: 0.1,
1684
+ },
1685
+ status: {
1686
+ attribute: "status",
1687
+ change: 1,
1688
+ },
1689
+ extended_status: {
1690
+ attribute: "extendedStatus",
1691
+ change: 1,
1692
+ },
1693
+ },
1694
+ };
1695
+ if (args.power === false) {
1696
+ delete configureLookup.haElectricalMeasurement.power;
1697
+ delete configureLookup.seMetering.power;
1698
+ delete configureLookup.haElectricalMeasurement.power_phase_b;
1699
+ delete configureLookup.haElectricalMeasurement.power_phase_c;
1700
+ delete configureLookup.haElectricalMeasurement.dc_power;
1701
+ }
1702
+ if (args.voltage === false) {
1703
+ delete configureLookup.haElectricalMeasurement.voltage;
1704
+ delete configureLookup.haElectricalMeasurement.voltage_phase_b;
1705
+ delete configureLookup.haElectricalMeasurement.voltage_phase_c;
1706
+ delete configureLookup.haElectricalMeasurement.dc_voltage;
1707
+ }
1708
+ if (args.current === false) {
1709
+ delete configureLookup.haElectricalMeasurement.current;
1710
+ delete configureLookup.haElectricalMeasurement.current_phase_b;
1711
+ delete configureLookup.haElectricalMeasurement.current_phase_c;
1712
+ delete configureLookup.haElectricalMeasurement.dc_current;
1713
+ }
1714
+ if (args.energy === false) {
1715
+ delete configureLookup.seMetering.energy;
1716
+ }
1717
+ if (args.producedEnergy === false) {
1718
+ delete configureLookup.seMetering.produced_energy;
1719
+ }
1720
+ if (args.powerFactor === false) {
1721
+ delete configureLookup.haElectricalMeasurement.power_factor;
1722
+ }
1723
+ if (args.acFrequency === false) {
1724
+ delete configureLookup.haElectricalMeasurement.ac_frequency;
1725
+ }
1726
+ if (args.threePhase === false) {
1727
+ delete configureLookup.haElectricalMeasurement.power_phase_b;
1728
+ delete configureLookup.haElectricalMeasurement.power_phase_c;
1729
+ delete configureLookup.haElectricalMeasurement.current_phase_b;
1730
+ delete configureLookup.haElectricalMeasurement.current_phase_c;
1731
+ delete configureLookup.haElectricalMeasurement.voltage_phase_b;
1732
+ delete configureLookup.haElectricalMeasurement.voltage_phase_c;
1733
+ }
1734
+ if (args.electricalMeasurementType === "dc") {
1735
+ delete configureLookup.haElectricalMeasurement.power;
1736
+ delete configureLookup.haElectricalMeasurement.voltage;
1737
+ delete configureLookup.haElectricalMeasurement.current;
1738
+ delete configureLookup.haElectricalMeasurement.power_factor;
1739
+ delete configureLookup.haElectricalMeasurement.ac_frequency;
1740
+ delete configureLookup.haElectricalMeasurement.power_phase_b;
1741
+ delete configureLookup.haElectricalMeasurement.power_phase_c;
1742
+ delete configureLookup.haElectricalMeasurement.current_phase_b;
1743
+ delete configureLookup.haElectricalMeasurement.current_phase_c;
1744
+ delete configureLookup.haElectricalMeasurement.voltage_phase_b;
1745
+ delete configureLookup.haElectricalMeasurement.voltage_phase_c;
1746
+ }
1747
+ if (args.electricalMeasurementType === "ac") {
1748
+ delete configureLookup.haElectricalMeasurement.dc_power;
1749
+ delete configureLookup.haElectricalMeasurement.dc_voltage;
1750
+ delete configureLookup.haElectricalMeasurement.dc_current;
1751
+ }
1752
+ if (args.status === false) {
1753
+ delete configureLookup.seMetering.status;
1754
+ }
1755
+ if (args.extendedStatus === false) {
1756
+ delete configureLookup.seMetering.extended_status;
1757
+ }
1758
+ if (tariffs === false) {
1759
+ delete configureLookup.seMetering.energy_tier_1;
1760
+ delete configureLookup.seMetering.energy_tier_2;
1761
+ delete configureLookup.seMetering.produced_energy_tier_1;
1762
+ delete configureLookup.seMetering.produced_energy_tier_2;
1763
+ }
1764
+ if (args.cluster === "both") {
1765
+ if (args.power !== false)
1766
+ exposes.push(exposes_1.presets.power().withAccess(exposes_1.access.STATE_GET));
1767
+ if (args.voltage !== false)
1768
+ exposes.push(exposes_1.presets.voltage().withAccess(exposes_1.access.STATE_GET));
1769
+ if (args.acFrequency !== false)
1770
+ exposes.push(exposes_1.presets.ac_frequency().withAccess(exposes_1.access.STATE_GET));
1771
+ if (args.powerFactor !== false)
1772
+ exposes.push(exposes_1.presets.power_factor().withAccess(exposes_1.access.STATE_GET));
1773
+ if (args.current !== false)
1774
+ exposes.push(exposes_1.presets.current().withAccess(exposes_1.access.STATE_GET));
1775
+ if (args.energy !== false)
1776
+ exposes.push(exposes_1.presets.energy().withAccess(exposes_1.access.STATE_GET));
1777
+ if (args.producedEnergy !== false)
1778
+ exposes.push(exposes_1.presets.produced_energy().withAccess(exposes_1.access.STATE_GET));
1779
+ if (tariffs === true) {
1780
+ exposes.push(exposes_1.presets.numeric("energy_tier_1", exposes_1.access.STATE_GET).withUnit("kWh").withDescription("Energy consumed in tariff 1 (peak/high) - OBIS 1.8.1"), exposes_1.presets.numeric("energy_tier_2", exposes_1.access.STATE_GET).withUnit("kWh").withDescription("Energy consumed in tariff 2 (off-peak/low) - OBIS 1.8.2"), exposes_1.presets
1781
+ .numeric("produced_energy_tier_1", exposes_1.access.STATE_GET)
1782
+ .withUnit("kWh")
1783
+ .withDescription("Energy produced in tariff 1 (peak/high) - OBIS 2.8.1"), exposes_1.presets
1784
+ .numeric("produced_energy_tier_2", exposes_1.access.STATE_GET)
1785
+ .withUnit("kWh")
1786
+ .withDescription("Energy produced in tariff 2 (off-peak/low) - OBIS 2.8.2"));
1787
+ }
1788
+ fromZigbee = [args.fzElectricalMeasurement ?? fz.electrical_measurement, args.fzMetering ?? fz.metering];
1789
+ const useMeteringForPower = args.power !== false && args.power?.cluster === "metering";
1790
+ toZigbee = [
1791
+ useMeteringForPower ? tz.metering_power : tz.electrical_measurement_power,
1792
+ tz.acvoltage,
1793
+ tz.accurrent,
1794
+ tz.currentsummdelivered,
1795
+ tz.currentsummreceived,
1796
+ tz.frequency,
1797
+ tz.powerfactor,
1798
+ ];
1799
+ if (useMeteringForPower) {
1800
+ delete configureLookup.haElectricalMeasurement.power;
1801
+ }
1802
+ else {
1803
+ delete configureLookup.seMetering.power;
1804
+ }
1805
+ }
1806
+ else if (args.cluster === "metering" && args.type === "electricity") {
1807
+ if (args.power !== false)
1808
+ exposes.push(exposes_1.presets.power().withAccess(exposes_1.access.STATE_GET));
1809
+ if (args.energy !== false)
1810
+ exposes.push(exposes_1.presets.energy().withAccess(exposes_1.access.STATE_GET));
1811
+ if (args.producedEnergy !== false)
1812
+ exposes.push(exposes_1.presets.produced_energy().withAccess(exposes_1.access.STATE_GET));
1813
+ if (tariffs === true) {
1814
+ exposes.push(exposes_1.presets.numeric("energy_tier_1", exposes_1.access.STATE_GET).withUnit("kWh").withDescription("Energy consumed in tariff 1 (peak/high) - OBIS 1.8.1"), exposes_1.presets.numeric("energy_tier_2", exposes_1.access.STATE_GET).withUnit("kWh").withDescription("Energy consumed in tariff 2 (off-peak/low) - OBIS 1.8.2"), exposes_1.presets
1815
+ .numeric("produced_energy_tier_1", exposes_1.access.STATE_GET)
1816
+ .withUnit("kWh")
1817
+ .withDescription("Energy produced in tariff 1 (peak/high) - OBIS 2.8.1"), exposes_1.presets
1818
+ .numeric("produced_energy_tier_2", exposes_1.access.STATE_GET)
1819
+ .withUnit("kWh")
1820
+ .withDescription("Energy produced in tariff 2 (off-peak/low) - OBIS 2.8.2"));
1821
+ }
1822
+ fromZigbee = [args.fzMetering ?? fz.metering];
1823
+ toZigbee = [tz.metering_power, tz.currentsummdelivered, tz.currentsummreceived];
1824
+ delete configureLookup.haElectricalMeasurement;
1825
+ }
1826
+ else if (args.cluster === "metering" && args.type === "gas") {
1827
+ if (args.power !== false)
1828
+ exposes.push(exposes_1.presets.numeric("volume_flow_rate", exposes_1.access.STATE_GET).withUnit("m³/h").withDescription("Instantaneous gas flow in m³/h"));
1829
+ if (args.energy !== false)
1830
+ exposes.push(exposes_1.presets.numeric("gas", exposes_1.access.STATE_GET).withUnit("m³").withDescription("Total gas consumption in m³"));
1831
+ fromZigbee = [args.fzMetering ?? fz.gas_metering];
1832
+ toZigbee = [
1833
+ {
1834
+ key: ["gas"],
1835
+ convertGet: async (entity, key, meta) => {
1836
+ const ep = (0, utils_1.determineEndpoint)(entity, meta, "seMetering");
1837
+ await ep.read("seMetering", ["currentSummDelivered"]);
1838
+ },
1839
+ convertSet: async (entity, key, value, meta) => {
1840
+ (0, utils_1.assertNumber)(value);
1841
+ await entity.write("seMetering", { currentSummDelivered: Math.round(value * 100) });
1842
+ return { state: { energy: value } };
1843
+ },
1844
+ },
1845
+ tz.metering_power,
1846
+ tz.metering_status,
1847
+ tz.metering_extended_status,
1848
+ ];
1849
+ delete configureLookup.haElectricalMeasurement;
1850
+ }
1851
+ else if (args.cluster === "electrical") {
1852
+ if (args.power !== false)
1853
+ exposes.push(exposes_1.presets.power().withAccess(exposes_1.access.STATE_GET));
1854
+ if (args.voltage !== false)
1855
+ exposes.push(exposes_1.presets.voltage().withAccess(exposes_1.access.STATE_GET));
1856
+ if (args.current !== false)
1857
+ exposes.push(exposes_1.presets.current().withAccess(exposes_1.access.STATE_GET));
1858
+ if (args.acFrequency !== false)
1859
+ exposes.push(exposes_1.presets.ac_frequency().withAccess(exposes_1.access.STATE_GET));
1860
+ if (args.powerFactor !== false)
1861
+ exposes.push(exposes_1.presets.power_factor().withAccess(exposes_1.access.STATE_GET));
1862
+ fromZigbee = [args.fzElectricalMeasurement ?? fz.electrical_measurement];
1863
+ toZigbee = [tz.electrical_measurement_power, tz.acvoltage, tz.accurrent, tz.frequency, tz.powerfactor];
1864
+ if (args.electricalMeasurementType === "dc") {
1865
+ toZigbee = [tz.dcvoltage, tz.dccurrent, tz.dcpower];
1866
+ }
1867
+ delete configureLookup.seMetering;
1868
+ }
1869
+ if (args.threePhase === true) {
1870
+ if (args.power !== false) {
1871
+ exposes.push(exposes_1.presets.power_phase_b().withAccess(exposes_1.access.STATE_GET), exposes_1.presets.power_phase_c().withAccess(exposes_1.access.STATE_GET));
1872
+ toZigbee.push(tz.electrical_measurement_power_phase_b, tz.electrical_measurement_power_phase_c);
1873
+ }
1874
+ if (args.voltage !== false) {
1875
+ exposes.push(exposes_1.presets.voltage_phase_b().withAccess(exposes_1.access.STATE_GET), exposes_1.presets.voltage_phase_c().withAccess(exposes_1.access.STATE_GET));
1876
+ toZigbee.push(tz.acvoltage_phase_b, tz.acvoltage_phase_c);
1877
+ }
1878
+ if (args.current !== false) {
1879
+ exposes.push(exposes_1.presets.current_phase_b().withAccess(exposes_1.access.STATE_GET), exposes_1.presets.current_phase_c().withAccess(exposes_1.access.STATE_GET));
1880
+ toZigbee.push(tz.accurrent_phase_b, tz.accurrent_phase_c);
1881
+ }
1882
+ }
1883
+ if (args.endpointNames) {
1884
+ exposes = (0, utils_1.flatten)(exposes.map((expose) => args.endpointNames.map((endpoint) => expose.clone().withEndpoint(endpoint))));
1885
+ }
1886
+ const result = { exposes, fromZigbee, toZigbee, isModernExtend: true };
1887
+ if (args.configureReporting) {
1888
+ result.configure = [
1889
+ async (device, coordinatorEndpoint) => {
1890
+ for (const [cluster, properties] of Object.entries(configureLookup)) {
1891
+ for (const endpoint of getEndpointsWithCluster(device, cluster, "input")) {
1892
+ const items = [];
1893
+ for (const property of Object.values(properties)) {
1894
+ let change = property.change;
1895
+ let min = "10_SECONDS";
1896
+ let max = "MAX";
1897
+ // Check if this property has a divisor and multiplier, e.g. AC frequency doesn't.
1898
+ if ("divisor" in property) {
1899
+ // In case multiplier or divisor was provided, use that instead of reading from device.
1900
+ if (property.forced && (property.forced.divisor || property.forced.multiplier)) {
1901
+ endpoint.saveClusterAttributeKeyValue(cluster, {
1902
+ [property.divisor]: property.forced.divisor ?? 1,
1903
+ [property.multiplier]: property.forced.multiplier ?? 1,
1904
+ });
1905
+ endpoint.save();
1906
+ }
1907
+ else {
1908
+ await endpoint.read(cluster, [property.divisor, property.multiplier]);
1909
+ }
1910
+ const divisor = endpoint.getClusterAttributeValue(cluster, property.divisor);
1911
+ (0, utils_1.assertNumber)(divisor, property.divisor);
1912
+ const multiplier = endpoint.getClusterAttributeValue(cluster, property.multiplier);
1913
+ (0, utils_1.assertNumber)(multiplier, property.multiplier);
1914
+ change = property.change * (divisor / multiplier);
1915
+ }
1916
+ if ("forced" in property && property.forced) {
1917
+ if ("min" in property.forced) {
1918
+ min = property.forced.min;
1919
+ }
1920
+ if ("max" in property.forced) {
1921
+ max = property.forced.max;
1922
+ }
1923
+ if ("change" in property.forced) {
1924
+ change = property.forced.change;
1925
+ }
1926
+ }
1927
+ items.push({ attribute: property.attribute, min, max, change });
1928
+ }
1929
+ if (items.length) {
1930
+ await setupAttributes(endpoint, coordinatorEndpoint, cluster, items);
1931
+ }
1932
+ }
1933
+ }
1934
+ },
1935
+ ];
1936
+ }
1937
+ return result;
1938
+ }
1939
+ function electricityMeter(args = {}) {
1940
+ return genericMeter({
1941
+ type: "electricity",
1942
+ cluster: "both",
1943
+ electricalMeasurementType: "ac",
1944
+ configureReporting: true,
1945
+ threePhase: false,
1946
+ producedEnergy: false,
1947
+ acFrequency: false,
1948
+ powerFactor: false,
1949
+ status: false,
1950
+ extendedStatus: false,
1951
+ ...args,
1952
+ });
1953
+ }
1954
+ function gasMeter(args = {}) {
1955
+ return genericMeter({
1956
+ type: "gas",
1957
+ cluster: "metering",
1958
+ configureReporting: true,
1959
+ status: true,
1960
+ extendedStatus: true,
1961
+ producedEnergy: false,
1962
+ ...args,
1963
+ });
1964
+ }
1965
+ // #endregion
1966
+ // #region Other extends
1967
+ /**
1968
+ * Version of the GP spec: 1.1.1
1969
+ */
1970
+ exports.GPDF_COMMANDS = {
1971
+ /*0x00*/ 0: "identify",
1972
+ /*0x10*/ 16: "recall_scene0",
1973
+ /*0x11*/ 17: "recall_scene1",
1974
+ /*0x12*/ 18: "recall_scene2",
1975
+ /*0x13*/ 19: "recall_scene3",
1976
+ /*0x14*/ 20: "recall_scene4",
1977
+ /*0x15*/ 21: "recall_scene5",
1978
+ /*0x16*/ 22: "recall_scene6",
1979
+ /*0x17*/ 23: "recall_scene7",
1980
+ /*0x18*/ 24: "store_scene0",
1981
+ /*0x19*/ 25: "store_scene1",
1982
+ /*0x1a*/ 26: "store_scene2",
1983
+ /*0x1b*/ 27: "store_scene3",
1984
+ /*0x1c*/ 28: "store_scene4",
1985
+ /*0x1d*/ 29: "store_scene5",
1986
+ /*0x1e*/ 30: "store_scene6",
1987
+ /*0x1f*/ 31: "store_scene7",
1988
+ /*0x20*/ 32: "off",
1989
+ /*0x21*/ 33: "on",
1990
+ /*0x22*/ 34: "toggle",
1991
+ /*0x23*/ 35: "release",
1992
+ /*0x30*/ 48: "move_up", // with payload
1993
+ /*0x31*/ 49: "move_down", // with payload
1994
+ /*0x32*/ 50: "step_up", // with payload
1995
+ /*0x33*/ 51: "step_down", // with payload
1996
+ /*0x34*/ 52: "level_control_stop",
1997
+ /*0x35*/ 53: "move_up_with_on_off", // with payload
1998
+ /*0x36*/ 54: "move_down_with_on_off", // with payload
1999
+ /*0x37*/ 55: "step_up_with_on_off", // with payload
2000
+ /*0x38*/ 56: "step_down_with_on_off", // with payload
2001
+ /*0x40*/ 64: "move_hue_stop",
2002
+ /*0x41*/ 65: "move_hue_up", // with payload
2003
+ /*0x42*/ 66: "move_hue_down", // with payload
2004
+ /*0x43*/ 67: "step_hue_up", // with payload
2005
+ /*0x44*/ 68: "step_huw_down", // with payload
2006
+ /*0x45*/ 69: "move_saturation_stop",
2007
+ /*0x46*/ 70: "move_saturation_up", // with payload
2008
+ /*0x47*/ 71: "move_saturation_down", // with payload
2009
+ /*0x48*/ 72: "step_saturation_up", // with payload
2010
+ /*0x49*/ 73: "step_saturation_down", // with payload
2011
+ /*0x4a*/ 74: "move_color", // with payload
2012
+ /*0x4b*/ 75: "step_color", // with payload
2013
+ /*0x50*/ 80: "lock_door",
2014
+ /*0x51*/ 81: "unlock_door",
2015
+ /*0x60*/ 96: "press11",
2016
+ /*0x61*/ 97: "release11",
2017
+ /*0x62*/ 98: "press12",
2018
+ /*0x63*/ 99: "release12",
2019
+ /*0x64*/ 100: "press22",
2020
+ /*0x65*/ 101: "release22",
2021
+ /*0x66*/ 102: "short_press11",
2022
+ /*0x67*/ 103: "short_press12",
2023
+ /*0x68*/ 104: "short_press22",
2024
+ /*0x69*/ 105: "press_8bit_vector", // with payload
2025
+ /*0x6a*/ 106: "release_8bit_vector", // with payload
2026
+ /*0xa0*/ 160: "attribute_reporting", // with payload
2027
+ /*0xa1*/ 161: "manufacture_specific_attr_reporting", // with payload
2028
+ /*0xa2*/ 162: "multi_cluster_reporting", // with payload
2029
+ /*0xa3*/ 163: "manufacturer_specific_mcluster_reporting", // with payload
2030
+ /*0xa4*/ 164: "request_attributes", // with payload
2031
+ /*0xa5*/ 165: "read_attributes_response", // with payload
2032
+ /*0xa6*/ 166: "zcl_tunneling", // with payload
2033
+ /*0xa8*/ 168: "compact_attribute_reporting", // with payload
2034
+ /*0xaf*/ 175: "any_sensor_command_a0_a3", // with payload
2035
+ /*0xe0*/ 224: "commissioning", // with payload
2036
+ /*0xe1*/ 225: "decommissioning",
2037
+ /*0xe2*/ 226: "success",
2038
+ /*0xe3*/ 227: "channel_request", // with payload
2039
+ /*0xe4*/ 228: "application_description", // with payload
2040
+ //-- sent to GPD
2041
+ // /*0xf0*/ 240: "commissioning_reply",
2042
+ // /*0xf1*/ 241: "write_attributes",
2043
+ // /*0xf2*/ 242: "read_attributes",
2044
+ // /*0xf3*/ 243: "channel_configuration",
2045
+ // /*0xf6*/ 246: "zcl_tunneling",
2046
+ };
2047
+ function genericGreenPower() {
2048
+ const exposes = [
2049
+ exposes_1.presets.action(Object.values(exports.GPDF_COMMANDS)),
2050
+ exposes_1.presets.list("payload", exposes_1.access.STATE, exposes_1.presets.numeric("payload", exposes_1.access.STATE).withDescription("Byte")).withDescription("Payload of the command"),
2051
+ ];
2052
+ const fromZigbee = [
2053
+ {
2054
+ cluster: "greenPower",
2055
+ type: ["commandNotification", "commandCommissioningNotification"],
2056
+ convert: (model, msg, publish, options, meta) => {
2057
+ const commandID = msg.data.commandID;
2058
+ if ((0, utils_1.hasAlreadyProcessedMessage)(msg, model, msg.data.frameCounter, `${msg.device.ieeeAddr}_${commandID}`))
2059
+ return;
2060
+ if (commandID >= 0xe0)
2061
+ return; // Skip op commands
2062
+ const gpdfCommandStr = exports.GPDF_COMMANDS[commandID];
2063
+ const payloadBuf = "raw" in msg.data.commandFrame ? msg.data.commandFrame.raw : undefined;
2064
+ return {
2065
+ action: gpdfCommandStr ?? `unknown_${commandID}`,
2066
+ payload: payloadBuf?.length > 0 ? Array.from(payloadBuf) : [],
2067
+ };
2068
+ },
2069
+ },
2070
+ ];
2071
+ return { exposes, fromZigbee, isModernExtend: true };
2072
+ }
2073
+ function commandsScenes(args = {}) {
2074
+ const { commands = ["recall", "store", "add", "remove", "remove_all"], bind = true, endpointNames = undefined } = args;
2075
+ // biome-ignore lint/style/noNonNullAssertion: ignored using `--suppress`
2076
+ let actions = commands;
2077
+ if (endpointNames) {
2078
+ actions = commands.flatMap((c) => endpointNames.map((e) => `${c}_${e}`));
2079
+ }
2080
+ const exposesArray = [exposes_1.presets.enum("action", exposes_1.access.STATE, actions).withDescription("Triggered scene action (e.g. recall a scene)")];
2081
+ const actionPayloadLookup = {
2082
+ commandRecall: "recall",
2083
+ commandStore: "store",
2084
+ commandAdd: "add",
2085
+ commandRemove: "remove",
2086
+ commandRemoveAll: "remove_all",
2087
+ };
2088
+ const fromZigbee = [
2089
+ {
2090
+ cluster: "genScenes",
2091
+ type: ["commandRecall", "commandStore", "commandAdd", "commandRemove", "commandRemoveAll"],
2092
+ convert: (model, msg, publish, options, meta) => {
2093
+ if ((0, utils_1.hasAlreadyProcessedMessage)(msg, model))
2094
+ return;
2095
+ let trailing = "";
2096
+ if (msg.type === "commandRecall" || msg.type === "commandStore") {
2097
+ (0, node_assert_1.default)("sceneid" in msg.data);
2098
+ trailing = `_${msg.data.sceneid}`;
2099
+ }
2100
+ const payload = {
2101
+ action: (0, utils_1.postfixWithEndpointName)(actionPayloadLookup[msg.type] + trailing, msg, model, meta),
2102
+ };
2103
+ (0, utils_1.addActionGroup)(payload, msg, model);
2104
+ return payload;
2105
+ },
2106
+ },
2107
+ ];
2108
+ const result = { exposes: exposesArray, fromZigbee, isModernExtend: true };
2109
+ if (bind)
2110
+ result.configure = [setupConfigureForBinding("genScenes", "output", endpointNames)];
2111
+ return result;
2112
+ }
2113
+ function enumLookup(args) {
2114
+ const { name, lookup, cluster, attribute, description, zigbeeCommandOptions, endpointName, reporting, entityCategory, label, fzConvert } = args;
2115
+ const attributeKey = (0, utils_1.isString)(attribute) ? attribute : attribute.ID;
2116
+ const access = exposes_1.access[args.access ?? "ALL"];
2117
+ let expose = exposes_1.presets.enum(name, access, Object.keys(lookup)).withDescription(description);
2118
+ if (endpointName)
2119
+ expose = expose.withEndpoint(endpointName);
2120
+ if (entityCategory)
2121
+ expose = expose.withCategory(entityCategory);
2122
+ if (label !== undefined)
2123
+ expose = expose.withLabel(label);
2124
+ const fromZigbee = [
2125
+ {
2126
+ cluster: cluster.toString(),
2127
+ type: ["attributeReport", "readResponse"],
2128
+ convert: fzConvert ??
2129
+ ((model, msg, publish, options, meta) => {
2130
+ if (attributeKey in msg.data && (!endpointName || (0, utils_1.getEndpointName)(msg, model, meta) === endpointName)) {
2131
+ // skip undefined value
2132
+ if (msg.data[attributeKey] !== undefined)
2133
+ return { [expose.property]: (0, utils_1.getFromLookupByValue)(msg.data[attributeKey], lookup) };
2134
+ }
2135
+ }),
2136
+ // biome-ignore lint/suspicious/noExplicitAny: generic
2137
+ },
2138
+ ];
2139
+ const toZigbee = [
2140
+ {
2141
+ key: [name],
2142
+ convertSet: access & exposes_1.access.SET
2143
+ ? async (entity, key, value, meta) => {
2144
+ const payloadValue = (0, utils_1.getFromLookup)(value, lookup);
2145
+ const payload = (0, utils_1.isString)(attribute)
2146
+ ? { [attribute]: payloadValue }
2147
+ : { [attribute.ID]: { value: payloadValue, type: attribute.type } };
2148
+ await (0, utils_1.determineEndpoint)(entity, meta, cluster).write(cluster,
2149
+ // XXX: too dynamic for typing
2150
+ payload, zigbeeCommandOptions);
2151
+ return { state: { [key]: value } };
2152
+ }
2153
+ : undefined,
2154
+ convertGet: access & exposes_1.access.GET
2155
+ ? async (entity, key, meta) => {
2156
+ await (0, utils_1.determineEndpoint)(entity, meta, cluster).read(cluster,
2157
+ // XXX: too dynamic for typing
2158
+ [attributeKey], zigbeeCommandOptions);
2159
+ }
2160
+ : undefined,
2161
+ },
2162
+ ];
2163
+ const endpointNames = endpointName ? [endpointName] : null;
2164
+ const configure = [setupConfigureForReporting(cluster, attribute, { config: reporting, access, endpointNames })];
2165
+ return { exposes: [expose], fromZigbee, toZigbee, configure, isModernExtend: true };
2166
+ }
2167
+ function numeric(args) {
2168
+ const { name, cluster, attribute, description, zigbeeCommandOptions, unit, reporting, valueMin, valueMax, valueStep, scale, label, entityCategory, precision, fzConvert, } = args;
2169
+ const endpoints = args.endpointNames;
2170
+ const attributeKey = (0, utils_1.isString)(attribute) ? attribute : attribute.ID;
2171
+ const access = exposes_1.access[args.access ?? "ALL"];
2172
+ const exposes = [];
2173
+ const createExpose = (endpoint) => {
2174
+ let expose = exposes_1.presets.numeric(name, access).withDescription(description);
2175
+ if (endpoint)
2176
+ expose = expose.withEndpoint(endpoint);
2177
+ if (unit)
2178
+ expose = expose.withUnit(unit);
2179
+ if (valueMin !== undefined)
2180
+ expose = expose.withValueMin(valueMin);
2181
+ if (valueMax !== undefined)
2182
+ expose = expose.withValueMax(valueMax);
2183
+ if (valueStep !== undefined)
2184
+ expose = expose.withValueStep(valueStep);
2185
+ if (label !== undefined)
2186
+ expose = expose.withLabel(label);
2187
+ if (entityCategory)
2188
+ expose = expose.withCategory(entityCategory);
2189
+ return expose;
2190
+ };
2191
+ // Generate for multiple endpoints only if required.
2192
+ if (!endpoints) {
2193
+ exposes.push(createExpose(undefined));
2194
+ }
2195
+ else {
2196
+ for (const endpoint of endpoints) {
2197
+ exposes.push(createExpose(endpoint));
2198
+ }
2199
+ }
2200
+ const fromZigbee = [
2201
+ {
2202
+ cluster: cluster.toString(),
2203
+ type: ["attributeReport", "readResponse"],
2204
+ convert: fzConvert ??
2205
+ ((model, msg, publish, options, meta) => {
2206
+ if (attributeKey in msg.data) {
2207
+ const endpoint = endpoints?.find((e) => (0, utils_1.getEndpointName)(msg, model, meta) === e);
2208
+ if (endpoints && !endpoint) {
2209
+ return;
2210
+ }
2211
+ let value = msg.data[attributeKey];
2212
+ (0, utils_1.assertNumber)(value);
2213
+ if (scale !== undefined) {
2214
+ value = typeof scale === "number" ? value / scale : scale(value, "from");
2215
+ }
2216
+ (0, utils_1.assertNumber)(value);
2217
+ if (precision != null)
2218
+ value = (0, utils_1.precisionRound)(value, precision);
2219
+ const expose = exposes.length === 1 ? exposes[0] : exposes.find((e) => e.endpoint === endpoint);
2220
+ return { [expose.property]: value };
2221
+ }
2222
+ }),
2223
+ // biome-ignore lint/suspicious/noExplicitAny: generic
2224
+ },
2225
+ ];
2226
+ const toZigbee = [
2227
+ {
2228
+ key: [name],
2229
+ convertSet: access & exposes_1.access.SET
2230
+ ? async (entity, key, value, meta) => {
2231
+ (0, utils_1.assertNumber)(value, key);
2232
+ let payloadValue = value;
2233
+ if (scale !== undefined) {
2234
+ payloadValue = typeof scale === "number" ? payloadValue * scale : scale(payloadValue, "to");
2235
+ }
2236
+ (0, utils_1.assertNumber)(payloadValue);
2237
+ if (precision != null)
2238
+ payloadValue = (0, utils_1.precisionRound)(payloadValue, precision);
2239
+ const payload = (0, utils_1.isString)(attribute)
2240
+ ? { [attribute]: payloadValue }
2241
+ : { [attribute.ID]: { value: payloadValue, type: attribute.type } };
2242
+ await (0, utils_1.determineEndpoint)(entity, meta, cluster).write(cluster,
2243
+ // XXX: too dynamic for typing
2244
+ payload, zigbeeCommandOptions);
2245
+ return { state: { [key]: value } };
2246
+ }
2247
+ : undefined,
2248
+ convertGet: access & exposes_1.access.GET
2249
+ ? async (entity, key, meta) => {
2250
+ await (0, utils_1.determineEndpoint)(entity, meta, cluster).read(cluster,
2251
+ // XXX: too dynamic for typing
2252
+ [attributeKey], zigbeeCommandOptions);
2253
+ }
2254
+ : undefined,
2255
+ },
2256
+ ];
2257
+ const configure = [setupConfigureForReporting(cluster, attribute, { config: reporting, access, endpointNames: endpoints })];
2258
+ return { exposes, fromZigbee, toZigbee, configure, isModernExtend: true };
2259
+ }
2260
+ function binary(args) {
2261
+ const { name, valueOn, valueOff, cluster, attribute, description, zigbeeCommandOptions, endpointName, reporting, label, entityCategory } = args;
2262
+ const attributeKey = (0, utils_1.isString)(attribute) ? attribute : attribute.ID;
2263
+ const access = exposes_1.access[args.access ?? "ALL"];
2264
+ let expose = exposes_1.presets.binary(name, access, valueOn[0], valueOff[0]).withDescription(description);
2265
+ if (endpointName)
2266
+ expose = expose.withEndpoint(endpointName);
2267
+ if (label)
2268
+ expose = expose.withLabel(label);
2269
+ if (entityCategory)
2270
+ expose = expose.withCategory(entityCategory);
2271
+ const fromZigbee = [
2272
+ {
2273
+ cluster: cluster.toString(),
2274
+ type: ["attributeReport", "readResponse"],
2275
+ convert: (model, msg, publish, options, meta) => {
2276
+ if (attributeKey in msg.data && (!endpointName || (0, utils_1.getEndpointName)(msg, model, meta) === endpointName)) {
2277
+ return { [expose.property]: msg.data[attributeKey] === valueOn[1] ? valueOn[0] : valueOff[0] };
2278
+ }
2279
+ },
2280
+ // biome-ignore lint/suspicious/noExplicitAny: generic
2281
+ },
2282
+ ];
2283
+ const toZigbee = [
2284
+ {
2285
+ key: [name],
2286
+ convertSet: access & exposes_1.access.SET
2287
+ ? async (entity, key, value, meta) => {
2288
+ const payloadValue = value === valueOn[0] ? valueOn[1] : valueOff[1];
2289
+ const payload = (0, utils_1.isString)(attribute)
2290
+ ? { [attribute]: payloadValue }
2291
+ : { [attribute.ID]: { value: payloadValue, type: attribute.type } };
2292
+ await (0, utils_1.determineEndpoint)(entity, meta, cluster).write(cluster,
2293
+ // XXX: too dynamic for typing
2294
+ payload, zigbeeCommandOptions);
2295
+ return { state: { [key]: value } };
2296
+ }
2297
+ : undefined,
2298
+ convertGet: access & exposes_1.access.GET
2299
+ ? async (entity, key, meta) => {
2300
+ await (0, utils_1.determineEndpoint)(entity, meta, cluster).read(cluster,
2301
+ // XXX: too dynamic for typing
2302
+ [attributeKey], zigbeeCommandOptions);
2303
+ }
2304
+ : undefined,
2305
+ },
2306
+ ];
2307
+ const endpointNames = endpointName ? [endpointName] : null;
2308
+ const configure = [setupConfigureForReporting(cluster, attribute, { config: reporting, access, endpointNames })];
2309
+ return { exposes: [expose], fromZigbee, toZigbee, configure, isModernExtend: true };
2310
+ }
2311
+ function text(args) {
2312
+ const { name, cluster, attribute, description, zigbeeCommandOptions, endpointName, reporting, entityCategory, validate } = args;
2313
+ const attributeKey = (0, utils_1.isString)(attribute) ? attribute : attribute.ID;
2314
+ const access = exposes_1.access[args.access ?? "ALL"];
2315
+ let expose = exposes_1.presets.text(name, access).withDescription(description);
2316
+ if (endpointName)
2317
+ expose = expose.withEndpoint(endpointName);
2318
+ if (entityCategory)
2319
+ expose = expose.withCategory(entityCategory);
2320
+ const fromZigbee = [
2321
+ {
2322
+ cluster: cluster.toString(),
2323
+ type: ["attributeReport", "readResponse"],
2324
+ convert: (model, msg, publish, options, meta) => {
2325
+ if (attributeKey in msg.data && (!endpointName || (0, utils_1.getEndpointName)(msg, model, meta) === endpointName)) {
2326
+ return { [expose.property]: msg.data[attributeKey] };
2327
+ }
2328
+ },
2329
+ // biome-ignore lint/suspicious/noExplicitAny: generic
2330
+ },
2331
+ ];
2332
+ const toZigbee = [
2333
+ {
2334
+ key: [name],
2335
+ convertSet: access & exposes_1.access.SET
2336
+ ? async (entity, key, value, meta) => {
2337
+ void validate(value);
2338
+ const payload = (0, utils_1.isString)(attribute) ? { [attribute]: value } : { [attribute.ID]: { value, type: attribute.type } };
2339
+ await (0, utils_1.determineEndpoint)(entity, meta, cluster).write(cluster,
2340
+ // XXX: too dynamic for typing
2341
+ payload, zigbeeCommandOptions);
2342
+ return { state: { [key]: value } };
2343
+ }
2344
+ : undefined,
2345
+ convertGet: access & exposes_1.access.GET
2346
+ ? async (entity, key, meta) => {
2347
+ await (0, utils_1.determineEndpoint)(entity, meta, cluster).read(cluster,
2348
+ // XXX: too dynamic for typing
2349
+ [attributeKey], zigbeeCommandOptions);
2350
+ }
2351
+ : undefined,
2352
+ },
2353
+ ];
2354
+ const endpointNames = endpointName ? [endpointName] : null;
2355
+ const configure = [setupConfigureForReporting(cluster, attribute, { config: reporting, access, endpointNames })];
2356
+ return { exposes: [expose], fromZigbee, toZigbee, configure, isModernExtend: true };
2357
+ }
2358
+ function actionEnumLookup(args) {
2359
+ const { actionLookup: lookup, attribute, cluster, buttonLookup, commands } = args;
2360
+ const attributeKey = (0, utils_1.isString)(attribute) ? attribute : attribute.ID;
2361
+ const parse = args.parse;
2362
+ let actions = Object.keys(lookup).flatMap((a) => (args.endpointNames ? args.endpointNames.map((e) => `${a}_${e}`) : [a]));
2363
+ // allows direct external input to be used by other extends in the same device
2364
+ if (args.extraActions)
2365
+ actions = actions.concat(args.extraActions);
2366
+ const expose = exposes_1.presets.enum("action", exposes_1.access.STATE, actions).withDescription("Triggered action (e.g. a button click)").withCategory("diagnostic");
2367
+ const fromZigbee = [
2368
+ {
2369
+ cluster: cluster.toString(),
2370
+ // XXX: typing is rather annoying here, asserted for now...
2371
+ type: (commands || ["attributeReport", "readResponse"]),
2372
+ convert: (model, msg, publish, options, meta) => {
2373
+ if (attributeKey in msg.data) {
2374
+ const msgValue = parse ? parse(msg, attributeKey) : msg.data[attributeKey];
2375
+ let value = (0, utils_1.getFromLookupByValue)(msgValue, lookup);
2376
+ // endpointNames is used when action endpoint names don't overlap with other endpoint names
2377
+ if (args.endpointNames)
2378
+ value = (0, utils_1.postfixWithEndpointName)(value, msg, model, meta);
2379
+ // buttonLookup is used when action endpoint names overlap with other endpoint names
2380
+ if (args.buttonLookup) {
2381
+ const endpointName = (0, utils_1.getFromLookupByValue)(msg.endpoint.ID, buttonLookup);
2382
+ value = `${value}_${endpointName}`;
2383
+ }
2384
+ return { [expose.property]: value };
2385
+ }
2386
+ },
2387
+ },
2388
+ ];
2389
+ return { exposes: [expose], fromZigbee, isModernExtend: true };
2390
+ }
2391
+ function quirkAddEndpointCluster(args) {
2392
+ const { endpointID, inputClusters, outputClusters } = args;
2393
+ const configure = [
2394
+ (device, coordinatorEndpoint, definition) => {
2395
+ const endpoint = device.getEndpoint(endpointID);
2396
+ if (endpoint === undefined) {
2397
+ logger_1.logger.error(`Quirk: cannot add clusters to endpoint ${endpointID}, endpoint does not exist!`, "zhc:quirkaddendpointcluster");
2398
+ return;
2399
+ }
2400
+ inputClusters?.forEach((cluster) => {
2401
+ const clusterID = (0, utils_1.isString)(cluster) ? zigbee_herdsman_1.Zcl.Utils.getCluster(cluster, device.manufacturerID, device.customClusters).ID : cluster;
2402
+ if (!endpoint.inputClusters.includes(clusterID)) {
2403
+ logger_1.logger.debug(`Quirk: adding input cluster ${clusterID} to endpoint ${endpointID}.`, "zhc:quirkaddendpointcluster");
2404
+ endpoint.inputClusters.push(clusterID);
2405
+ }
2406
+ });
2407
+ outputClusters?.forEach((cluster) => {
2408
+ const clusterID = (0, utils_1.isString)(cluster) ? zigbee_herdsman_1.Zcl.Utils.getCluster(cluster, device.manufacturerID, device.customClusters).ID : cluster;
2409
+ if (!endpoint.outputClusters.includes(clusterID)) {
2410
+ logger_1.logger.debug(`Quirk: adding output cluster ${clusterID} to endpoint ${endpointID}.`, "zhc:quirkaddendpointcluster");
2411
+ endpoint.outputClusters.push(clusterID);
2412
+ }
2413
+ });
2414
+ device.save();
2415
+ },
2416
+ ];
2417
+ return { configure, isModernExtend: true };
2418
+ }
2419
+ function quirkCheckinInterval(timeout) {
2420
+ const configure = [
2421
+ (device, coordinatorEndpoint, definition) => {
2422
+ device.checkinInterval = typeof timeout === "number" ? timeout : exports.TIME_LOOKUP[timeout];
2423
+ device.save();
2424
+ },
2425
+ ];
2426
+ return { configure, isModernExtend: true };
2427
+ }
2428
+ function reconfigureReportingsOnDeviceAnnounce() {
2429
+ const onEvent = [
2430
+ async (event) => {
2431
+ if (event.type === "deviceAnnounce") {
2432
+ for (const endpoint of event.data.device.endpoints) {
2433
+ for (const c of endpoint.configuredReportings) {
2434
+ await endpoint.configureReporting(c.cluster.name, [
2435
+ {
2436
+ // @ts-expect-error dynamic, expected valid since already applied
2437
+ attribute: c.attribute.name,
2438
+ minimumReportInterval: c.minimumReportInterval,
2439
+ maximumReportInterval: c.maximumReportInterval,
2440
+ reportableChange: c.reportableChange,
2441
+ },
2442
+ ]);
2443
+ }
2444
+ }
2445
+ }
2446
+ },
2447
+ ];
2448
+ return { onEvent, isModernExtend: true };
2449
+ }
2450
+ function skipDefaultResponse() {
2451
+ const onEvent = [
2452
+ (event) => {
2453
+ if (event.type === "start") {
2454
+ event.data.device.skipDefaultResponse = true;
2455
+ }
2456
+ },
2457
+ ];
2458
+ return { onEvent, isModernExtend: true };
2459
+ }
2460
+ function deviceEndpoints(args) {
2461
+ const result = {
2462
+ meta: { multiEndpoint: true },
2463
+ endpoint: (d) => args.endpoints,
2464
+ isModernExtend: true,
2465
+ };
2466
+ if (args.multiEndpointSkip)
2467
+ result.meta.multiEndpointSkip = args.multiEndpointSkip;
2468
+ return result;
2469
+ }
2470
+ function deviceAddCustomCluster(clusterName, clusterDefinition) {
2471
+ const addCluster = (device) => device.addCustomCluster(clusterName, clusterDefinition);
2472
+ const onEvent = [(event) => event.type === "start" && addCluster(event.data.device)];
2473
+ const configure = [addCluster];
2474
+ return { onEvent, configure, isModernExtend: true };
2475
+ }
2476
+ function ignoreClusterReport(args) {
2477
+ const fromZigbee = [
2478
+ {
2479
+ cluster: args.cluster.toString(),
2480
+ type: ["attributeReport", "readResponse"],
2481
+ convert: (model, msg, publish, options, meta) => { },
2482
+ },
2483
+ ];
2484
+ return { fromZigbee, isModernExtend: true };
2485
+ }
2486
+ function bindCluster(args) {
2487
+ const configure = [setupConfigureForBinding(args.cluster, args.clusterType, args.endpointNames)];
2488
+ return { configure, isModernExtend: true };
2489
+ }
2490
+ const SETPOINT_LOOKUP = {
2491
+ occupiedHeatingSetpoint: { property: "occupied_heating_setpoint", tzConverter: tz.thermostat_occupied_heating_setpoint },
2492
+ unoccupiedHeatingSetpoint: { property: "unoccupied_heating_setpoint", tzConverter: tz.thermostat_unoccupied_heating_setpoint },
2493
+ occupiedCoolingSetpoint: { property: "occupied_cooling_setpoint", tzConverter: tz.thermostat_occupied_cooling_setpoint },
2494
+ unoccupiedCoolingSetpoint: { property: "unoccupied_cooling_setpoint", tzConverter: tz.thermostat_unoccupied_cooling_setpoint },
2495
+ };
2496
+ const SETPOINT_LIMIT_LOOKUP = {
2497
+ maxHeatSetpointLimit: { tzConverter: tz.thermostat_max_heat_setpoint_limit, expose: exposes_1.presets.max_heat_setpoint_limit },
2498
+ minHeatSetpointLimit: { tzConverter: tz.thermostat_min_heat_setpoint_limit, expose: exposes_1.presets.min_heat_setpoint_limit },
2499
+ maxCoolSetpointLimit: { tzConverter: tz.thermostat_max_cool_setpoint_limit, expose: exposes_1.presets.max_cool_setpoint_limit },
2500
+ minCoolSetpointLimit: { tzConverter: tz.thermostat_min_cool_setpoint_limit, expose: exposes_1.presets.min_cool_setpoint_limit },
2501
+ };
2502
+ function thermostat(args) {
2503
+ const { localTemperature = undefined, localTemperatureCalibration = undefined, setpoints, setpointsLimit = {}, systemMode = undefined, runningState = undefined, runningMode = undefined, fanMode = undefined, piHeatingDemand = undefined, temperatureSetpointHold = false, temperatureSetpointHoldDuration = false, endpoint = undefined, ctrlSeqeOfOper = undefined, programmingOperationMode = undefined, setpointChangeSource = undefined, weeklySchedule = undefined, } = args;
2504
+ const endpointNames = endpoint ? [endpoint] : undefined;
2505
+ const repConfigChange0 = { min: "MIN", max: "1_HOUR", change: 0 };
2506
+ const repConfigChange10 = { min: "MIN", max: "1_HOUR", change: 10 };
2507
+ const exposes = [];
2508
+ const fromZigbee = [];
2509
+ const toZigbee = [];
2510
+ const onEvent = [];
2511
+ const configure = [];
2512
+ const expose = exposes_1.presets.climate().withLocalTemperature(undefined, localTemperature?.values?.description ?? undefined);
2513
+ exposes.push(expose);
2514
+ if (!localTemperature?.fromZigbee?.skip) {
2515
+ fromZigbee.push(fz.thermostat);
2516
+ }
2517
+ if (!localTemperature?.toZigbee?.skip) {
2518
+ toZigbee.push(tz.thermostat_local_temperature);
2519
+ }
2520
+ if (!localTemperature?.configure?.skip) {
2521
+ configure.push(setupConfigureForBinding("hvacThermostat", "input", endpointNames), setupConfigureForReporting("hvacThermostat", "localTemp", {
2522
+ config: localTemperature?.configure?.reporting ?? repConfigChange10,
2523
+ access: localTemperature?.configure?.access ?? exposes_1.access.STATE_GET,
2524
+ endpointNames: endpointNames,
2525
+ }));
2526
+ }
2527
+ if (localTemperatureCalibration) {
2528
+ const { min, max, step } = localTemperatureCalibration.values === true ? { min: -2.5, max: 2.5, step: 0.1 } : localTemperatureCalibration.values;
2529
+ expose.withLocalTemperatureCalibration(min, max, step);
2530
+ if (min !== -2.5 || max !== 2.5) {
2531
+ // -2.5 - 2.5 is the default ZCL range, add a custom range if different.
2532
+ const customRange = customLocalTemperatureCalibrationRange({ min, max });
2533
+ onEvent.push(...customRange.onEvent);
2534
+ configure.push(...customRange.configure);
2535
+ }
2536
+ if (!localTemperatureCalibration.toZigbee?.skip) {
2537
+ toZigbee.push(tz.thermostat_local_temperature_calibration);
2538
+ }
2539
+ if (!localTemperatureCalibration.configure?.skip) {
2540
+ configure.push(setupConfigureForReporting("hvacThermostat", "localTemperatureCalibration", {
2541
+ config: localTemperatureCalibration.configure?.reporting ?? false,
2542
+ access: localTemperatureCalibration.configure?.access ?? exposes_1.access.STATE_GET,
2543
+ endpointNames: endpointNames,
2544
+ }));
2545
+ }
2546
+ }
2547
+ for (const key of Object.keys(setpoints.values)) {
2548
+ const { min, max, step } = setpoints.values[key];
2549
+ const { property, tzConverter } = SETPOINT_LOOKUP[key];
2550
+ expose.withSetpoint(property, min, max, step);
2551
+ if (!setpoints.toZigbee?.skip) {
2552
+ toZigbee.push(tzConverter);
2553
+ }
2554
+ if (!setpoints.configure?.skip) {
2555
+ configure.push(setupConfigureForReporting("hvacThermostat", key, {
2556
+ config: setpoints.configure?.reporting ?? repConfigChange10,
2557
+ access: setpoints.configure?.access ?? exposes_1.access.STATE_GET,
2558
+ endpointNames: endpointNames,
2559
+ }));
2560
+ }
2561
+ }
2562
+ if (systemMode) {
2563
+ expose.withSystemMode(systemMode.values);
2564
+ if (!systemMode.toZigbee?.skip) {
2565
+ toZigbee.push(tz.thermostat_system_mode);
2566
+ }
2567
+ if (!systemMode.configure?.skip) {
2568
+ configure.push(setupConfigureForReporting("hvacThermostat", "systemMode", {
2569
+ config: systemMode.configure?.reporting ?? repConfigChange0,
2570
+ access: systemMode.configure?.access ?? exposes_1.access.STATE_GET,
2571
+ endpointNames: endpointNames,
2572
+ }));
2573
+ }
2574
+ }
2575
+ if (runningState) {
2576
+ expose.withRunningState(runningState.values);
2577
+ if (!runningState.toZigbee?.skip) {
2578
+ toZigbee.push(tz.thermostat_running_state);
2579
+ }
2580
+ if (!runningState.configure?.skip) {
2581
+ configure.push(setupConfigureForReporting("hvacThermostat", "runningState", {
2582
+ config: runningState.configure?.reporting ?? repConfigChange0,
2583
+ access: runningState.configure?.access ?? exposes_1.access.STATE_GET,
2584
+ endpointNames: endpointNames,
2585
+ }));
2586
+ }
2587
+ }
2588
+ if (runningMode) {
2589
+ expose.withRunningMode(runningMode.values);
2590
+ if (!runningMode.toZigbee?.skip) {
2591
+ toZigbee.push(tz.thermostat_running_mode);
2592
+ }
2593
+ if (!runningMode.configure?.skip) {
2594
+ configure.push(setupConfigureForReporting("hvacThermostat", "runningMode", {
2595
+ config: runningMode.configure?.reporting ?? repConfigChange0,
2596
+ access: runningMode.configure?.access ?? exposes_1.access.STATE_GET,
2597
+ endpointNames: endpointNames,
2598
+ }));
2599
+ }
2600
+ }
2601
+ if (fanMode) {
2602
+ expose.withFanMode(fanMode);
2603
+ toZigbee.push(tz.fan_mode);
2604
+ configure.push(setupConfigureForBinding("hvacFanCtrl", "input", endpointNames), setupConfigureForReporting("hvacFanCtrl", "fanMode", {
2605
+ config: repConfigChange0,
2606
+ access: exposes_1.access.STATE_GET,
2607
+ endpointNames: endpointNames,
2608
+ }));
2609
+ }
2610
+ if (piHeatingDemand) {
2611
+ expose.withPiHeatingDemand(piHeatingDemand.values !== true ? piHeatingDemand.values : undefined);
2612
+ if (!piHeatingDemand.toZigbee?.skip) {
2613
+ toZigbee.push(tz.thermostat_pi_heating_demand);
2614
+ }
2615
+ if (!piHeatingDemand.configure?.skip) {
2616
+ configure.push(setupConfigureForReporting("hvacThermostat", "pIHeatingDemand", {
2617
+ config: piHeatingDemand.configure?.reporting ?? repConfigChange0,
2618
+ access: piHeatingDemand.configure?.access ?? exposes_1.access.STATE_GET,
2619
+ endpointNames: endpointNames,
2620
+ }));
2621
+ }
2622
+ }
2623
+ if (temperatureSetpointHold) {
2624
+ exposes.push(exposes_1.presets
2625
+ .binary("temperature_setpoint_hold", exposes_1.access.ALL, true, false)
2626
+ .withDescription("Prevent changes. `false` = run normally. `true` = prevent from making changes."));
2627
+ toZigbee.push(tz.thermostat_temperature_setpoint_hold);
2628
+ if (temperatureSetpointHold === true || ((0, utils_1.isObject)(temperatureSetpointHold) && !temperatureSetpointHold.configure.skip)) {
2629
+ configure.push(setupConfigureForReporting("hvacThermostat", "tempSetpointHold", {
2630
+ config: repConfigChange0,
2631
+ access: exposes_1.access.STATE_GET,
2632
+ endpointNames: endpointNames,
2633
+ }));
2634
+ }
2635
+ }
2636
+ if (temperatureSetpointHoldDuration) {
2637
+ exposes.push(exposes_1.presets
2638
+ .numeric("temperature_setpoint_hold_duration", exposes_1.access.ALL)
2639
+ .withValueMin(0)
2640
+ .withValueMax(65535)
2641
+ .withDescription("Period in minutes for which the setpoint hold will be active (65535 - forever)"));
2642
+ toZigbee.push(tz.thermostat_temperature_setpoint_hold_duration);
2643
+ configure.push(setupConfigureForReading("hvacThermostat", ["tempSetpointHoldDuration"], endpointNames));
2644
+ }
2645
+ for (const key of Object.keys(setpointsLimit)) {
2646
+ const { min, max, step } = setpointsLimit[key];
2647
+ const { expose, tzConverter } = SETPOINT_LIMIT_LOOKUP[key];
2648
+ exposes.push(expose(min, max, step));
2649
+ toZigbee.push(tzConverter);
2650
+ configure.push(setupConfigureForReporting("hvacThermostat", key, {
2651
+ access: exposes_1.access.STATE_GET,
2652
+ endpointNames: endpointNames,
2653
+ }));
2654
+ }
2655
+ if (endpoint) {
2656
+ expose.withEndpoint(endpoint);
2657
+ }
2658
+ if (ctrlSeqeOfOper) {
2659
+ expose.withControlSequenceOfOperation(ctrlSeqeOfOper.values);
2660
+ if (!ctrlSeqeOfOper.toZigbee?.skip) {
2661
+ toZigbee.push(tz.thermostat_control_sequence_of_operation);
2662
+ }
2663
+ if (!ctrlSeqeOfOper.configure?.skip) {
2664
+ configure.push(setupConfigureForReporting("hvacThermostat", "ctrlSeqeOfOper", {
2665
+ config: ctrlSeqeOfOper.configure?.reporting ?? repConfigChange0,
2666
+ access: ctrlSeqeOfOper.configure?.access ?? exposes_1.access.ALL,
2667
+ }));
2668
+ }
2669
+ }
2670
+ if (programmingOperationMode) {
2671
+ expose.withProgrammingOperationMode(programmingOperationMode.values);
2672
+ if (!programmingOperationMode.toZigbee?.skip) {
2673
+ toZigbee.push(tz.thermostat_programming_operation_mode);
2674
+ }
2675
+ if (!programmingOperationMode.configure?.skip) {
2676
+ configure.push(setupConfigureForReading("hvacThermostat", ["programingOperMode"], endpointNames));
2677
+ }
2678
+ }
2679
+ if (setpointChangeSource) {
2680
+ expose.withSetpointChangeSource();
2681
+ if (!setpointChangeSource.configure?.skip) {
2682
+ configure.push(setupConfigureForReporting("hvacThermostat", "setpointChangeSource", {
2683
+ config: setpointChangeSource.configure?.reporting ?? repConfigChange0,
2684
+ access: setpointChangeSource.configure?.access ?? exposes_1.access.STATE,
2685
+ }));
2686
+ }
2687
+ }
2688
+ if (weeklySchedule) {
2689
+ expose.withWeeklySchedule(weeklySchedule.values);
2690
+ fromZigbee.push(fz.thermostat_weekly_schedule);
2691
+ if (!weeklySchedule.toZigbee?.skip) {
2692
+ toZigbee.push(tz.thermostat_weekly_schedule);
2693
+ toZigbee.push(tz.thermostat_clear_weekly_schedule);
2694
+ }
2695
+ if (!weeklySchedule.configure?.skip) {
2696
+ configure.push(setupConfigureForReading("hvacThermostat", ["numberOfWeeklyTrans", "numberOfDailyTrans", "startOfWeek"], endpointNames));
2697
+ }
2698
+ }
2699
+ return { exposes, fromZigbee, toZigbee, configure, onEvent, isModernExtend: true };
2700
+ }
2701
+ // #endregion
2702
+ //# sourceMappingURL=modernExtend.js.map