@zwave-js/cc 15.21.1 → 15.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (419) hide show
  1. package/build/cjs/cc/AlarmSensorCC.d.ts +2 -2
  2. package/build/cjs/cc/AlarmSensorCC.js +18 -57
  3. package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
  4. package/build/cjs/cc/ApplicationStatusCC.js +9 -48
  5. package/build/cjs/cc/ApplicationStatusCC.js.map +1 -1
  6. package/build/cjs/cc/AssociationCC.d.ts +2 -2
  7. package/build/cjs/cc/AssociationCC.js +32 -71
  8. package/build/cjs/cc/AssociationCC.js.map +2 -2
  9. package/build/cjs/cc/AssociationGroupInfoCC.d.ts +2 -2
  10. package/build/cjs/cc/AssociationGroupInfoCC.js +28 -65
  11. package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
  12. package/build/cjs/cc/BarrierOperatorCC.d.ts +2 -2
  13. package/build/cjs/cc/BarrierOperatorCC.js +28 -67
  14. package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
  15. package/build/cjs/cc/BasicCC.d.ts +2 -2
  16. package/build/cjs/cc/BasicCC.js +15 -54
  17. package/build/cjs/cc/BasicCC.js.map +2 -2
  18. package/build/cjs/cc/BasicWindowCoveringCC.js +12 -51
  19. package/build/cjs/cc/BasicWindowCoveringCC.js.map +1 -1
  20. package/build/cjs/cc/BatteryCC.d.ts +2 -2
  21. package/build/cjs/cc/BatteryCC.js +15 -54
  22. package/build/cjs/cc/BatteryCC.js.map +2 -2
  23. package/build/cjs/cc/BinarySensorCC.d.ts +2 -2
  24. package/build/cjs/cc/BinarySensorCC.js +19 -58
  25. package/build/cjs/cc/BinarySensorCC.js.map +2 -2
  26. package/build/cjs/cc/BinarySwitchCC.d.ts +2 -2
  27. package/build/cjs/cc/BinarySwitchCC.js +15 -54
  28. package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
  29. package/build/cjs/cc/CRC16CC.js +7 -46
  30. package/build/cjs/cc/CRC16CC.js.map +1 -1
  31. package/build/cjs/cc/CentralSceneCC.js +19 -58
  32. package/build/cjs/cc/CentralSceneCC.js.map +1 -1
  33. package/build/cjs/cc/ClimateControlScheduleCC.js +25 -64
  34. package/build/cjs/cc/ClimateControlScheduleCC.js.map +1 -1
  35. package/build/cjs/cc/ClockCC.d.ts +2 -2
  36. package/build/cjs/cc/ClockCC.js +15 -54
  37. package/build/cjs/cc/ClockCC.js.map +2 -2
  38. package/build/cjs/cc/ColorSwitchCC.d.ts +2 -2
  39. package/build/cjs/cc/ColorSwitchCC.js +26 -65
  40. package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
  41. package/build/cjs/cc/ConfigurationCC.d.ts +2 -2
  42. package/build/cjs/cc/ConfigurationCC.js +43 -82
  43. package/build/cjs/cc/ConfigurationCC.js.map +2 -2
  44. package/build/cjs/cc/DeviceResetLocallyCC.js +7 -46
  45. package/build/cjs/cc/DeviceResetLocallyCC.js.map +1 -1
  46. package/build/cjs/cc/DoorLockCC.d.ts +2 -2
  47. package/build/cjs/cc/DoorLockCC.js +26 -65
  48. package/build/cjs/cc/DoorLockCC.js.map +2 -2
  49. package/build/cjs/cc/DoorLockLoggingCC.d.ts +2 -2
  50. package/build/cjs/cc/DoorLockLoggingCC.js +17 -56
  51. package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
  52. package/build/cjs/cc/EnergyProductionCC.d.ts +2 -2
  53. package/build/cjs/cc/EnergyProductionCC.js +13 -52
  54. package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
  55. package/build/cjs/cc/EntryControlCC.d.ts +2 -2
  56. package/build/cjs/cc/EntryControlCC.js +25 -64
  57. package/build/cjs/cc/EntryControlCC.js.map +2 -2
  58. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +34 -73
  59. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  60. package/build/cjs/cc/HailCC.js +3 -42
  61. package/build/cjs/cc/HailCC.js.map +1 -1
  62. package/build/cjs/cc/HumidityControlModeCC.d.ts +2 -2
  63. package/build/cjs/cc/HumidityControlModeCC.js +19 -58
  64. package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
  65. package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +2 -2
  66. package/build/cjs/cc/HumidityControlOperatingStateCC.js +11 -50
  67. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
  68. package/build/cjs/cc/HumidityControlSetpointCC.d.ts +2 -2
  69. package/build/cjs/cc/HumidityControlSetpointCC.js +30 -69
  70. package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
  71. package/build/cjs/cc/InclusionControllerCC.js +9 -48
  72. package/build/cjs/cc/InclusionControllerCC.js.map +1 -1
  73. package/build/cjs/cc/IndicatorCC.d.ts +2 -2
  74. package/build/cjs/cc/IndicatorCC.js +31 -70
  75. package/build/cjs/cc/IndicatorCC.js.map +2 -2
  76. package/build/cjs/cc/IrrigationCC.d.ts +2 -2
  77. package/build/cjs/cc/IrrigationCC.js +54 -93
  78. package/build/cjs/cc/IrrigationCC.js.map +2 -2
  79. package/build/cjs/cc/LanguageCC.d.ts +2 -2
  80. package/build/cjs/cc/LanguageCC.js +15 -54
  81. package/build/cjs/cc/LanguageCC.js.map +2 -2
  82. package/build/cjs/cc/LockCC.d.ts +2 -2
  83. package/build/cjs/cc/LockCC.js +15 -54
  84. package/build/cjs/cc/LockCC.js.map +2 -2
  85. package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +2 -2
  86. package/build/cjs/cc/ManufacturerProprietaryCC.js +10 -49
  87. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
  88. package/build/cjs/cc/ManufacturerSpecificCC.js +16 -55
  89. package/build/cjs/cc/ManufacturerSpecificCC.js.map +1 -1
  90. package/build/cjs/cc/MeterCC.d.ts +2 -2
  91. package/build/cjs/cc/MeterCC.js +23 -62
  92. package/build/cjs/cc/MeterCC.js.map +2 -2
  93. package/build/cjs/cc/MultiChannelAssociationCC.d.ts +2 -2
  94. package/build/cjs/cc/MultiChannelAssociationCC.js +26 -65
  95. package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
  96. package/build/cjs/cc/MultiChannelCC.js +34 -73
  97. package/build/cjs/cc/MultiChannelCC.js.map +1 -1
  98. package/build/cjs/cc/MultiCommandCC.js +9 -48
  99. package/build/cjs/cc/MultiCommandCC.js.map +1 -1
  100. package/build/cjs/cc/MultilevelSensorCC.d.ts +2 -2
  101. package/build/cjs/cc/MultilevelSensorCC.js +23 -62
  102. package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
  103. package/build/cjs/cc/MultilevelSwitchCC.d.ts +2 -2
  104. package/build/cjs/cc/MultilevelSwitchCC.js +24 -63
  105. package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
  106. package/build/cjs/cc/NoOperationCC.js +5 -44
  107. package/build/cjs/cc/NoOperationCC.js.map +1 -1
  108. package/build/cjs/cc/NodeNamingCC.d.ts +2 -2
  109. package/build/cjs/cc/NodeNamingCC.js +22 -61
  110. package/build/cjs/cc/NodeNamingCC.js.map +2 -2
  111. package/build/cjs/cc/NotificationCC.d.ts +20 -3
  112. package/build/cjs/cc/NotificationCC.js +141 -104
  113. package/build/cjs/cc/NotificationCC.js.map +2 -2
  114. package/build/cjs/cc/PowerlevelCC.js +22 -61
  115. package/build/cjs/cc/PowerlevelCC.js.map +1 -1
  116. package/build/cjs/cc/ProtectionCC.d.ts +2 -2
  117. package/build/cjs/cc/ProtectionCC.js +33 -72
  118. package/build/cjs/cc/ProtectionCC.js.map +2 -2
  119. package/build/cjs/cc/SceneActivationCC.js +9 -48
  120. package/build/cjs/cc/SceneActivationCC.js.map +1 -1
  121. package/build/cjs/cc/SceneActuatorConfigurationCC.js +14 -53
  122. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +1 -1
  123. package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +2 -2
  124. package/build/cjs/cc/SceneControllerConfigurationCC.js +17 -56
  125. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
  126. package/build/cjs/cc/ScheduleEntryLockCC.js +46 -85
  127. package/build/cjs/cc/ScheduleEntryLockCC.js.map +1 -1
  128. package/build/cjs/cc/Security2CC.js +33 -72
  129. package/build/cjs/cc/Security2CC.js.map +1 -1
  130. package/build/cjs/cc/SecurityCC.js +27 -66
  131. package/build/cjs/cc/SecurityCC.js.map +1 -1
  132. package/build/cjs/cc/SoundSwitchCC.js +29 -68
  133. package/build/cjs/cc/SoundSwitchCC.js.map +1 -1
  134. package/build/cjs/cc/SupervisionCC.js +9 -48
  135. package/build/cjs/cc/SupervisionCC.js.map +1 -1
  136. package/build/cjs/cc/ThermostatFanModeCC.d.ts +2 -2
  137. package/build/cjs/cc/ThermostatFanModeCC.js +19 -58
  138. package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
  139. package/build/cjs/cc/ThermostatFanStateCC.d.ts +2 -2
  140. package/build/cjs/cc/ThermostatFanStateCC.js +11 -50
  141. package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
  142. package/build/cjs/cc/ThermostatModeCC.d.ts +2 -2
  143. package/build/cjs/cc/ThermostatModeCC.js +19 -58
  144. package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
  145. package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +2 -2
  146. package/build/cjs/cc/ThermostatOperatingStateCC.js +11 -50
  147. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
  148. package/build/cjs/cc/ThermostatSetbackCC.d.ts +2 -2
  149. package/build/cjs/cc/ThermostatSetbackCC.js +15 -54
  150. package/build/cjs/cc/ThermostatSetbackCC.js.map +2 -2
  151. package/build/cjs/cc/ThermostatSetpointCC.d.ts +2 -2
  152. package/build/cjs/cc/ThermostatSetpointCC.js +25 -64
  153. package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
  154. package/build/cjs/cc/TimeCC.js +24 -63
  155. package/build/cjs/cc/TimeCC.js.map +1 -1
  156. package/build/cjs/cc/TimeParametersCC.js +13 -52
  157. package/build/cjs/cc/TimeParametersCC.js.map +1 -1
  158. package/build/cjs/cc/TransportServiceCC.js +13 -52
  159. package/build/cjs/cc/TransportServiceCC.js.map +1 -1
  160. package/build/cjs/cc/UserCodeCC.d.ts +6 -4
  161. package/build/cjs/cc/UserCodeCC.js +89 -98
  162. package/build/cjs/cc/UserCodeCC.js.map +2 -2
  163. package/build/cjs/cc/VersionCC.js +25 -64
  164. package/build/cjs/cc/VersionCC.js.map +1 -1
  165. package/build/cjs/cc/WakeUpCC.js +21 -60
  166. package/build/cjs/cc/WakeUpCC.js.map +1 -1
  167. package/build/cjs/cc/WindowCoveringCC.d.ts +2 -2
  168. package/build/cjs/cc/WindowCoveringCC.js +26 -65
  169. package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
  170. package/build/cjs/cc/ZWaveLongRangeCC.js +3 -42
  171. package/build/cjs/cc/ZWaveLongRangeCC.js.map +1 -1
  172. package/build/cjs/cc/ZWavePlusCC.js +11 -50
  173. package/build/cjs/cc/ZWavePlusCC.js.map +1 -1
  174. package/build/cjs/cc/ZWaveProtocolCC.js +73 -112
  175. package/build/cjs/cc/ZWaveProtocolCC.js.map +1 -1
  176. package/build/cjs/cc/_CCValues.generated.d.ts +131 -7
  177. package/build/cjs/cc/_CCValues.generated.js +68 -5
  178. package/build/cjs/cc/_CCValues.generated.js.map +2 -2
  179. package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
  180. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js +22 -59
  181. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
  182. package/build/cjs/lib/CommandClass.d.ts +6 -2
  183. package/build/cjs/lib/CommandClass.js +1 -1
  184. package/build/cjs/lib/CommandClass.js.map +2 -2
  185. package/build/cjs/lib/Security2/Extension.js +9 -48
  186. package/build/cjs/lib/Security2/Extension.js.map +1 -1
  187. package/build/cjs/lib/Values.d.ts +1 -1
  188. package/build/cjs/lib/Values.js.map +1 -1
  189. package/build/esm/cc/AlarmSensorCC.d.ts +2 -2
  190. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  191. package/build/esm/cc/AlarmSensorCC.js +9 -38
  192. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  193. package/build/esm/cc/ApplicationStatusCC.js +1 -34
  194. package/build/esm/cc/ApplicationStatusCC.js.map +1 -1
  195. package/build/esm/cc/AssociationCC.d.ts +2 -2
  196. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  197. package/build/esm/cc/AssociationCC.js +3 -36
  198. package/build/esm/cc/AssociationCC.js.map +1 -1
  199. package/build/esm/cc/AssociationGroupInfoCC.d.ts +2 -2
  200. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  201. package/build/esm/cc/AssociationGroupInfoCC.js +5 -36
  202. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  203. package/build/esm/cc/BarrierOperatorCC.d.ts +2 -2
  204. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  205. package/build/esm/cc/BarrierOperatorCC.js +3 -36
  206. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  207. package/build/esm/cc/BasicCC.d.ts +2 -2
  208. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  209. package/build/esm/cc/BasicCC.js +3 -36
  210. package/build/esm/cc/BasicCC.js.map +1 -1
  211. package/build/esm/cc/BasicWindowCoveringCC.js +1 -34
  212. package/build/esm/cc/BasicWindowCoveringCC.js.map +1 -1
  213. package/build/esm/cc/BatteryCC.d.ts +2 -2
  214. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  215. package/build/esm/cc/BatteryCC.js +3 -36
  216. package/build/esm/cc/BatteryCC.js.map +1 -1
  217. package/build/esm/cc/BinarySensorCC.d.ts +2 -2
  218. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  219. package/build/esm/cc/BinarySensorCC.js +3 -36
  220. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  221. package/build/esm/cc/BinarySwitchCC.d.ts +2 -2
  222. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  223. package/build/esm/cc/BinarySwitchCC.js +3 -36
  224. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  225. package/build/esm/cc/CRC16CC.js +1 -34
  226. package/build/esm/cc/CRC16CC.js.map +1 -1
  227. package/build/esm/cc/CentralSceneCC.js +1 -34
  228. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  229. package/build/esm/cc/ClimateControlScheduleCC.js +1 -34
  230. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  231. package/build/esm/cc/ClockCC.d.ts +2 -2
  232. package/build/esm/cc/ClockCC.d.ts.map +1 -1
  233. package/build/esm/cc/ClockCC.js +3 -36
  234. package/build/esm/cc/ClockCC.js.map +1 -1
  235. package/build/esm/cc/ColorSwitchCC.d.ts +2 -2
  236. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  237. package/build/esm/cc/ColorSwitchCC.js +3 -36
  238. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  239. package/build/esm/cc/ConfigurationCC.d.ts +2 -2
  240. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
  241. package/build/esm/cc/ConfigurationCC.js +3 -36
  242. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  243. package/build/esm/cc/DeviceResetLocallyCC.js +1 -34
  244. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  245. package/build/esm/cc/DoorLockCC.d.ts +2 -2
  246. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  247. package/build/esm/cc/DoorLockCC.js +3 -36
  248. package/build/esm/cc/DoorLockCC.js.map +1 -1
  249. package/build/esm/cc/DoorLockLoggingCC.d.ts +2 -2
  250. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
  251. package/build/esm/cc/DoorLockLoggingCC.js +3 -36
  252. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
  253. package/build/esm/cc/EnergyProductionCC.d.ts +2 -2
  254. package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
  255. package/build/esm/cc/EnergyProductionCC.js +3 -36
  256. package/build/esm/cc/EnergyProductionCC.js.map +1 -1
  257. package/build/esm/cc/EntryControlCC.d.ts +2 -2
  258. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  259. package/build/esm/cc/EntryControlCC.js +3 -36
  260. package/build/esm/cc/EntryControlCC.js.map +1 -1
  261. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +1 -34
  262. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  263. package/build/esm/cc/HailCC.js +1 -34
  264. package/build/esm/cc/HailCC.js.map +1 -1
  265. package/build/esm/cc/HumidityControlModeCC.d.ts +2 -2
  266. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  267. package/build/esm/cc/HumidityControlModeCC.js +3 -36
  268. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  269. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +2 -2
  270. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  271. package/build/esm/cc/HumidityControlOperatingStateCC.js +3 -36
  272. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
  273. package/build/esm/cc/HumidityControlSetpointCC.d.ts +2 -2
  274. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  275. package/build/esm/cc/HumidityControlSetpointCC.js +3 -36
  276. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  277. package/build/esm/cc/InclusionControllerCC.js +1 -34
  278. package/build/esm/cc/InclusionControllerCC.js.map +1 -1
  279. package/build/esm/cc/IndicatorCC.d.ts +2 -2
  280. package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
  281. package/build/esm/cc/IndicatorCC.js +3 -36
  282. package/build/esm/cc/IndicatorCC.js.map +1 -1
  283. package/build/esm/cc/IrrigationCC.d.ts +2 -2
  284. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  285. package/build/esm/cc/IrrigationCC.js +3 -36
  286. package/build/esm/cc/IrrigationCC.js.map +1 -1
  287. package/build/esm/cc/LanguageCC.d.ts +2 -2
  288. package/build/esm/cc/LanguageCC.d.ts.map +1 -1
  289. package/build/esm/cc/LanguageCC.js +3 -36
  290. package/build/esm/cc/LanguageCC.js.map +1 -1
  291. package/build/esm/cc/LockCC.d.ts +2 -2
  292. package/build/esm/cc/LockCC.d.ts.map +1 -1
  293. package/build/esm/cc/LockCC.js +3 -36
  294. package/build/esm/cc/LockCC.js.map +1 -1
  295. package/build/esm/cc/ManufacturerProprietaryCC.d.ts +2 -2
  296. package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
  297. package/build/esm/cc/ManufacturerProprietaryCC.js +3 -36
  298. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  299. package/build/esm/cc/ManufacturerSpecificCC.js +1 -34
  300. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  301. package/build/esm/cc/MeterCC.d.ts +2 -2
  302. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  303. package/build/esm/cc/MeterCC.js +3 -36
  304. package/build/esm/cc/MeterCC.js.map +1 -1
  305. package/build/esm/cc/MultiChannelAssociationCC.d.ts +2 -2
  306. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  307. package/build/esm/cc/MultiChannelAssociationCC.js +4 -37
  308. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  309. package/build/esm/cc/MultiChannelCC.js +1 -34
  310. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  311. package/build/esm/cc/MultiCommandCC.js +1 -34
  312. package/build/esm/cc/MultiCommandCC.js.map +1 -1
  313. package/build/esm/cc/MultilevelSensorCC.d.ts +2 -2
  314. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  315. package/build/esm/cc/MultilevelSensorCC.js +3 -36
  316. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  317. package/build/esm/cc/MultilevelSwitchCC.d.ts +2 -2
  318. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  319. package/build/esm/cc/MultilevelSwitchCC.js +3 -36
  320. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  321. package/build/esm/cc/NoOperationCC.js +1 -34
  322. package/build/esm/cc/NoOperationCC.js.map +1 -1
  323. package/build/esm/cc/NodeNamingCC.d.ts +2 -2
  324. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
  325. package/build/esm/cc/NodeNamingCC.js +3 -36
  326. package/build/esm/cc/NodeNamingCC.js.map +1 -1
  327. package/build/esm/cc/NotificationCC.d.ts +20 -3
  328. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  329. package/build/esm/cc/NotificationCC.js +143 -89
  330. package/build/esm/cc/NotificationCC.js.map +1 -1
  331. package/build/esm/cc/PowerlevelCC.js +1 -34
  332. package/build/esm/cc/PowerlevelCC.js.map +1 -1
  333. package/build/esm/cc/ProtectionCC.d.ts +2 -2
  334. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  335. package/build/esm/cc/ProtectionCC.js +3 -36
  336. package/build/esm/cc/ProtectionCC.js.map +1 -1
  337. package/build/esm/cc/SceneActivationCC.js +1 -34
  338. package/build/esm/cc/SceneActivationCC.js.map +1 -1
  339. package/build/esm/cc/SceneActuatorConfigurationCC.js +1 -34
  340. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  341. package/build/esm/cc/SceneControllerConfigurationCC.d.ts +2 -2
  342. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
  343. package/build/esm/cc/SceneControllerConfigurationCC.js +3 -36
  344. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  345. package/build/esm/cc/ScheduleEntryLockCC.js +1 -34
  346. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  347. package/build/esm/cc/Security2CC.js +1 -34
  348. package/build/esm/cc/Security2CC.js.map +1 -1
  349. package/build/esm/cc/SecurityCC.js +1 -34
  350. package/build/esm/cc/SecurityCC.js.map +1 -1
  351. package/build/esm/cc/SoundSwitchCC.js +1 -34
  352. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  353. package/build/esm/cc/SupervisionCC.js +1 -34
  354. package/build/esm/cc/SupervisionCC.js.map +1 -1
  355. package/build/esm/cc/ThermostatFanModeCC.d.ts +2 -2
  356. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  357. package/build/esm/cc/ThermostatFanModeCC.js +3 -36
  358. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  359. package/build/esm/cc/ThermostatFanStateCC.d.ts +2 -2
  360. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
  361. package/build/esm/cc/ThermostatFanStateCC.js +3 -36
  362. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
  363. package/build/esm/cc/ThermostatModeCC.d.ts +2 -2
  364. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  365. package/build/esm/cc/ThermostatModeCC.js +3 -36
  366. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  367. package/build/esm/cc/ThermostatOperatingStateCC.d.ts +2 -2
  368. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  369. package/build/esm/cc/ThermostatOperatingStateCC.js +3 -36
  370. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  371. package/build/esm/cc/ThermostatSetbackCC.d.ts +2 -2
  372. package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
  373. package/build/esm/cc/ThermostatSetbackCC.js +3 -36
  374. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
  375. package/build/esm/cc/ThermostatSetpointCC.d.ts +2 -2
  376. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  377. package/build/esm/cc/ThermostatSetpointCC.js +3 -36
  378. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  379. package/build/esm/cc/TimeCC.js +1 -34
  380. package/build/esm/cc/TimeCC.js.map +1 -1
  381. package/build/esm/cc/TimeParametersCC.js +1 -34
  382. package/build/esm/cc/TimeParametersCC.js.map +1 -1
  383. package/build/esm/cc/TransportServiceCC.js +1 -34
  384. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  385. package/build/esm/cc/UserCodeCC.d.ts +6 -4
  386. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  387. package/build/esm/cc/UserCodeCC.js +55 -48
  388. package/build/esm/cc/UserCodeCC.js.map +1 -1
  389. package/build/esm/cc/VersionCC.js +1 -34
  390. package/build/esm/cc/VersionCC.js.map +1 -1
  391. package/build/esm/cc/WakeUpCC.js +1 -34
  392. package/build/esm/cc/WakeUpCC.js.map +1 -1
  393. package/build/esm/cc/WindowCoveringCC.d.ts +2 -2
  394. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  395. package/build/esm/cc/WindowCoveringCC.js +3 -36
  396. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  397. package/build/esm/cc/ZWaveLongRangeCC.js +1 -34
  398. package/build/esm/cc/ZWaveLongRangeCC.js.map +1 -1
  399. package/build/esm/cc/ZWavePlusCC.js +1 -34
  400. package/build/esm/cc/ZWavePlusCC.js.map +1 -1
  401. package/build/esm/cc/ZWaveProtocolCC.js +1 -34
  402. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  403. package/build/esm/cc/_CCValues.generated.d.ts +131 -7
  404. package/build/esm/cc/_CCValues.generated.d.ts.map +1 -1
  405. package/build/esm/cc/_CCValues.generated.js +71 -4
  406. package/build/esm/cc/_CCValues.generated.js.map +1 -1
  407. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +3 -3
  408. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
  409. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +7 -38
  410. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  411. package/build/esm/lib/CommandClass.d.ts +6 -2
  412. package/build/esm/lib/CommandClass.d.ts.map +1 -1
  413. package/build/esm/lib/CommandClass.js +1 -1
  414. package/build/esm/lib/CommandClass.js.map +1 -1
  415. package/build/esm/lib/Security2/Extension.js +1 -34
  416. package/build/esm/lib/Security2/Extension.js.map +1 -1
  417. package/build/esm/lib/Values.d.ts +1 -1
  418. package/build/esm/lib/Values.d.ts.map +1 -1
  419. package/package.json +9 -8
@@ -2,12 +2,12 @@ import type { GetDeviceConfig } from "@zwave-js/config";
2
2
  import { CommandClasses, type ControlsCC, Duration, type EndpointId, type GetEndpoint, type GetNode, type GetSupportedCCVersion, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type NodeId, type Notification, type NotificationState, type SinglecastCC, type SupervisionResult, type SupportsCC, type ValueMetadataNumeric, type WithAddress } from "@zwave-js/core";
3
3
  import { Bytes, type BytesView } from "@zwave-js/shared";
4
4
  import { POLL_VALUE, PhysicalCCAPI, type PollValueImplementation } from "../lib/API.js";
5
- import { CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext } from "../lib/CommandClass.js";
5
+ import { CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions } from "../lib/CommandClass.js";
6
6
  import { NotificationCommand } from "../lib/_Types.js";
7
7
  import type { CCEncodingContext, CCParsingContext } from "../lib/traits.js";
8
8
  import { NotificationCCValues } from "./_CCValues.generated.js";
9
9
  export { NotificationCCValues };
10
- export declare function shouldAutoCreateSimpleDoorSensorValue(ctx: GetValueDB, endpoint: EndpointId): boolean;
10
+ export declare function shouldAutoCreateSyntheticDoorSensorValue(ctx: GetValueDB, endpoint: EndpointId): boolean;
11
11
  export declare class NotificationCCAPI extends PhysicalCCAPI {
12
12
  supportsCommand(cmd: NotificationCommand): MaybeNotKnown<boolean>;
13
13
  protected get [POLL_VALUE](): PollValueImplementation;
@@ -31,8 +31,25 @@ export declare class NotificationCC extends CommandClass {
31
31
  private determineNotificationMode;
32
32
  /** Whether the node implements push or pull notifications */
33
33
  static getNotificationMode(ctx: GetValueDB, node: NodeId): MaybeNotKnown<"push" | "pull">;
34
+ /** Returns the supported notification events for a given notification type */
35
+ static getSupportedNotificationEvents(ctx: GetValueDB, node: NodeId, type: number): MaybeNotKnown<readonly number[]>;
34
36
  interview(ctx: InterviewContext): Promise<void>;
35
- refreshValues(ctx: RefreshValuesContext): Promise<void>;
37
+ /**
38
+ * Applies the `alarmMapping` compat flag by adding metadata and supported notification
39
+ * types/events for the alarm mapping targets.
40
+ */
41
+ private applyAlarmMappingCompat;
42
+ /**
43
+ * Applies the `remapNotifications` compat flag by modifying the supported notification
44
+ * types/events in cache and creating metadata for remapping targets.
45
+ */
46
+ private applyNotificationRemappings;
47
+ /**
48
+ * Sets idle values for all supported notification variables that have an idle state
49
+ * and don't have a value yet.
50
+ */
51
+ private initNotificationIdleValues;
52
+ refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void>;
36
53
  shouldRefreshValues(this: SinglecastCC<this>, ctx: GetValueDB & GetSupportedCCVersion & GetDeviceConfig & GetNode<NodeId & GetEndpoint<EndpointId & SupportsCC & ControlsCC>>): boolean;
37
54
  }
38
55
  export interface NotificationCCSetOptions {
@@ -42,9 +42,10 @@ __export(NotificationCC_exports, {
42
42
  getNotificationEnumBehavior: () => getNotificationEnumBehavior,
43
43
  getNotificationStateValueWithEnum: () => getNotificationStateValueWithEnum,
44
44
  getNotificationValueMetadata: () => getNotificationValueMetadata,
45
- shouldAutoCreateSimpleDoorSensorValue: () => shouldAutoCreateSimpleDoorSensorValue
45
+ shouldAutoCreateSyntheticDoorSensorValue: () => shouldAutoCreateSyntheticDoorSensorValue
46
46
  });
47
47
  module.exports = __toCommonJS(NotificationCC_exports);
48
+ var import_tslib = require("tslib");
48
49
  var __validateArgs = __toESM(require("./NotificationCC._validateArgs.js"), 1);
49
50
  var import_core = require("@zwave-js/core");
50
51
  var import_shared = require("@zwave-js/shared");
@@ -58,48 +59,8 @@ var ccUtils = __toESM(require("../lib/utils.js"), 1);
58
59
  var import_ApplicationStatusCC = require("./ApplicationStatusCC.js");
59
60
  var import_AssociationGroupInfoCC = require("./AssociationGroupInfoCC.js");
60
61
  var import_CCValues_generated = require("./_CCValues.generated.js");
61
- var __runInitializers = function(thisArg, initializers, value) {
62
- var useValue = arguments.length > 2;
63
- for (var i = 0; i < initializers.length; i++) {
64
- value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
65
- }
66
- return useValue ? value : void 0;
67
- };
68
- var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
69
- function accept(f) {
70
- if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
71
- return f;
72
- }
73
- __name(accept, "accept");
74
- var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
75
- var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
76
- var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
77
- var _, done = false;
78
- for (var i = decorators.length - 1; i >= 0; i--) {
79
- var context = {};
80
- for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
81
- for (var p in contextIn.access) context.access[p] = contextIn.access[p];
82
- context.addInitializer = function(f) {
83
- if (done) throw new TypeError("Cannot add initializers after decoration has completed");
84
- extraInitializers.push(accept(f || null));
85
- };
86
- var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
87
- if (kind === "accessor") {
88
- if (result === void 0) continue;
89
- if (result === null || typeof result !== "object") throw new TypeError("Object expected");
90
- if (_ = accept(result.get)) descriptor.get = _;
91
- if (_ = accept(result.set)) descriptor.set = _;
92
- if (_ = accept(result.init)) initializers.unshift(_);
93
- } else if (_ = accept(result)) {
94
- if (kind === "field") initializers.unshift(_);
95
- else descriptor[key] = _;
96
- }
97
- }
98
- if (target) Object.defineProperty(target, contextIn.name, descriptor);
99
- done = true;
100
- };
101
62
  const { validateArgs_NotificationCCAPI_sendReport, validateArgs_NotificationCCAPI_get, validateArgs_NotificationCCAPI_set, validateArgs_NotificationCCAPI_getSupportedEvents } = __validateArgs;
102
- function shouldAutoCreateSimpleDoorSensorValue(ctx, endpoint) {
63
+ function shouldAutoCreateSyntheticDoorSensorValue(ctx, endpoint) {
103
64
  const valueDB = ctx.tryGetValueDB(endpoint.nodeId);
104
65
  if (!valueDB)
105
66
  return false;
@@ -117,7 +78,7 @@ function shouldAutoCreateSimpleDoorSensorValue(ctx, endpoint) {
117
78
  23
118
79
  );
119
80
  }
120
- __name(shouldAutoCreateSimpleDoorSensorValue, "shouldAutoCreateSimpleDoorSensorValue");
81
+ __name(shouldAutoCreateSyntheticDoorSensorValue, "shouldAutoCreateSyntheticDoorSensorValue");
121
82
  let NotificationCCAPI = (() => {
122
83
  let _classDecorators = [(0, import_CommandClassDecorators.API)(import_core.CommandClasses.Notification)];
123
84
  let _classDescriptor;
@@ -142,14 +103,14 @@ let NotificationCCAPI = (() => {
142
103
  _get_decorators = [validateArgs_NotificationCCAPI_get()];
143
104
  _set_decorators = [validateArgs_NotificationCCAPI_set()];
144
105
  _getSupportedEvents_decorators = [validateArgs_NotificationCCAPI_getSupportedEvents()];
145
- __esDecorate(this, null, _sendReport_decorators, { kind: "method", name: "sendReport", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "sendReport" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.sendReport, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
146
- __esDecorate(this, null, _get_decorators, { kind: "method", name: "get", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "get" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.get, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
147
- __esDecorate(this, null, _set_decorators, { kind: "method", name: "set", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "set" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.set, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
148
- __esDecorate(this, null, _getSupportedEvents_decorators, { kind: "method", name: "getSupportedEvents", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "getSupportedEvents" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.getSupportedEvents, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
149
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
106
+ (0, import_tslib.__esDecorate)(this, null, _sendReport_decorators, { kind: "method", name: "sendReport", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "sendReport" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.sendReport, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
107
+ (0, import_tslib.__esDecorate)(this, null, _get_decorators, { kind: "method", name: "get", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "get" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.get, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
108
+ (0, import_tslib.__esDecorate)(this, null, _set_decorators, { kind: "method", name: "set", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "set" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.set, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
109
+ (0, import_tslib.__esDecorate)(this, null, _getSupportedEvents_decorators, { kind: "method", name: "getSupportedEvents", static: false, private: false, access: { has: /* @__PURE__ */ __name((obj) => "getSupportedEvents" in obj, "has"), get: /* @__PURE__ */ __name((obj) => obj.getSupportedEvents, "get") }, metadata: _metadata }, null, _instanceExtraInitializers);
110
+ (0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
150
111
  NotificationCCAPI2 = _classThis = _classDescriptor.value;
151
112
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
152
- __runInitializers(_classThis, _classExtraInitializers);
113
+ (0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
153
114
  }
154
115
  supportsCommand(cmd) {
155
116
  switch (cmd) {
@@ -252,7 +213,7 @@ let NotificationCCAPI = (() => {
252
213
  }
253
214
  constructor() {
254
215
  super(...arguments);
255
- __runInitializers(this, _instanceExtraInitializers);
216
+ (0, import_tslib.__runInitializers)(this, _instanceExtraInitializers);
256
217
  }
257
218
  };
258
219
  return NotificationCCAPI2 = _classThis;
@@ -315,10 +276,10 @@ let NotificationCC = (() => {
315
276
  }
316
277
  static {
317
278
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
318
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
279
+ (0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
319
280
  NotificationCC2 = _classThis = _classDescriptor.value;
320
281
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
321
- __runInitializers(_classThis, _classExtraInitializers);
282
+ (0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
322
283
  }
323
284
  // former AlarmCC (v1..v2)
324
285
  determineRequiredCCInterviews() {
@@ -370,6 +331,10 @@ let NotificationCC = (() => {
370
331
  static getNotificationMode(ctx, node) {
371
332
  return ctx.getValueDB(node.id).getValue(import_CCValues_generated.NotificationCCValues.notificationMode.id);
372
333
  }
334
+ /** Returns the supported notification events for a given notification type */
335
+ static getSupportedNotificationEvents(ctx, node, type) {
336
+ return ctx.getValueDB(node.id).getValue(import_CCValues_generated.NotificationCCValues.supportedNotificationEvents(type).id);
337
+ }
373
338
  async interview(ctx) {
374
339
  const node = this.getNode(ctx);
375
340
  const endpoint = this.getEndpoint(ctx);
@@ -449,26 +414,12 @@ let NotificationCC = (() => {
449
414
  for (let i = 0; i < supportedNotificationTypes.length; i++) {
450
415
  const type = supportedNotificationTypes[i];
451
416
  const name = supportedNotificationNames[i];
452
- const notification = (0, import_core.getNotification)(type);
453
417
  ctx.logNode(node.id, {
454
418
  endpoint: this.endpointIndex,
455
419
  message: `enabling notifications for ${name}...`,
456
420
  direction: "outbound"
457
421
  });
458
422
  await api.set(type, true);
459
- if (notification) {
460
- const events = supportedNotificationEvents.get(type);
461
- if (events) {
462
- for (const variable of notification.variables.filter((v) => !!v.idle)) {
463
- if ([...variable.states.keys()].some((key) => events.includes(key))) {
464
- const value = import_CCValues_generated.NotificationCCValues.notificationVariable(notification.name, variable.name);
465
- if (this.getValue(ctx, value) == void 0) {
466
- this.setValue(ctx, value, 0);
467
- }
468
- }
469
- }
470
- }
471
- }
472
423
  }
473
424
  }
474
425
  }
@@ -476,42 +427,128 @@ let NotificationCC = (() => {
476
427
  this.ensureMetadata(ctx, import_CCValues_generated.NotificationCCValues.alarmType);
477
428
  this.ensureMetadata(ctx, import_CCValues_generated.NotificationCCValues.alarmLevel);
478
429
  }
430
+ this.applyAlarmMappingCompat(ctx);
431
+ this.applyNotificationRemappings(ctx);
432
+ this.initNotificationIdleValues(ctx);
433
+ this.setInterviewComplete(ctx, true);
434
+ }
435
+ /**
436
+ * Applies the `alarmMapping` compat flag by adding metadata and supported notification
437
+ * types/events for the alarm mapping targets.
438
+ */
439
+ applyAlarmMappingCompat(ctx) {
479
440
  const mappings = ctx.getDeviceConfig?.(this.nodeId)?.compat?.alarmMapping;
480
- if (mappings) {
481
- const supportedNotifications = /* @__PURE__ */ new Map();
482
- for (const { to } of mappings) {
483
- const notification = (0, import_core.getNotification)(to.notificationType);
484
- if (!notification)
485
- continue;
486
- const valueConfig = (0, import_core.getNotificationValue)(notification, to.notificationEvent);
487
- if (!supportedNotifications.has(to.notificationType)) {
488
- supportedNotifications.set(to.notificationType, /* @__PURE__ */ new Set());
441
+ if (!mappings)
442
+ return;
443
+ const supportedNotifications = /* @__PURE__ */ new Map();
444
+ for (const { to } of mappings) {
445
+ const notification = (0, import_core.getNotification)(to.notificationType);
446
+ if (!notification)
447
+ continue;
448
+ const valueConfig = (0, import_core.getNotificationValue)(notification, to.notificationEvent);
449
+ if (!supportedNotifications.has(to.notificationType)) {
450
+ supportedNotifications.set(to.notificationType, /* @__PURE__ */ new Set());
451
+ }
452
+ const supportedNotificationTypesSet = supportedNotifications.get(to.notificationType);
453
+ supportedNotificationTypesSet.add(to.notificationEvent);
454
+ if (valueConfig?.type !== "state")
455
+ continue;
456
+ const notificationValue = import_CCValues_generated.NotificationCCValues.notificationVariable(notification.name, valueConfig.variableName);
457
+ const metadata = getNotificationValueMetadata(this.getMetadata(ctx, notificationValue), notification, valueConfig);
458
+ this.setMetadata(ctx, notificationValue, metadata);
459
+ }
460
+ this.setValue(ctx, import_CCValues_generated.NotificationCCValues.supportedNotificationTypes, [...supportedNotifications.keys()]);
461
+ for (const [type, events] of supportedNotifications) {
462
+ this.setValue(ctx, import_CCValues_generated.NotificationCCValues.supportedNotificationEvents(type), [...events]);
463
+ }
464
+ }
465
+ /**
466
+ * Applies the `remapNotifications` compat flag by modifying the supported notification
467
+ * types/events in cache and creating metadata for remapping targets.
468
+ */
469
+ applyNotificationRemappings(ctx) {
470
+ const remappings = ctx.getDeviceConfig?.(this.nodeId)?.compat?.remapNotifications;
471
+ if (!remappings?.length)
472
+ return;
473
+ ctx.logNode(this.nodeId, {
474
+ message: `Applying notification remapping compat flag...`,
475
+ direction: "none",
476
+ level: "verbose"
477
+ });
478
+ const supportedTypes = new Set(this.getValue(ctx, import_CCValues_generated.NotificationCCValues.supportedNotificationTypes) ?? []);
479
+ const supportedEvents = /* @__PURE__ */ new Map();
480
+ for (const type of supportedTypes) {
481
+ const events = NotificationCC2.getSupportedNotificationEvents(ctx, this.getNode(ctx), type);
482
+ if (events) {
483
+ supportedEvents.set(type, new Set(events));
484
+ }
485
+ }
486
+ for (const mapping of remappings) {
487
+ const fromEvents = supportedEvents.get(mapping.from.notificationType);
488
+ if (fromEvents) {
489
+ fromEvents.delete(mapping.from.notificationEvent);
490
+ if (fromEvents.size === 0) {
491
+ supportedEvents.delete(mapping.from.notificationType);
492
+ supportedTypes.delete(mapping.from.notificationType);
493
+ }
494
+ }
495
+ if (mapping.action.type === "remap") {
496
+ const to = mapping.action.to;
497
+ supportedTypes.add(to.notificationType);
498
+ if (!supportedEvents.has(to.notificationType)) {
499
+ supportedEvents.set(to.notificationType, /* @__PURE__ */ new Set());
489
500
  }
490
- const supportedNotificationTypesSet = supportedNotifications.get(to.notificationType);
491
- supportedNotificationTypesSet.add(to.notificationEvent);
501
+ supportedEvents.get(to.notificationType).add(to.notificationEvent);
502
+ }
503
+ }
504
+ this.setValue(ctx, import_CCValues_generated.NotificationCCValues.supportedNotificationTypes, [...supportedTypes]);
505
+ for (const [type, events] of supportedEvents) {
506
+ this.setValue(ctx, import_CCValues_generated.NotificationCCValues.supportedNotificationEvents(type), [...events]);
507
+ }
508
+ for (const [type, events] of supportedEvents) {
509
+ const notification = (0, import_core.getNotification)(type);
510
+ if (!notification)
511
+ continue;
512
+ let isFirst = true;
513
+ for (const value of events) {
514
+ const valueConfig = (0, import_core.getNotificationValue)(notification, value);
492
515
  if (valueConfig?.type !== "state")
493
516
  continue;
494
517
  const notificationValue = import_CCValues_generated.NotificationCCValues.notificationVariable(notification.name, valueConfig.variableName);
495
- const metadata = getNotificationValueMetadata(this.getMetadata(ctx, notificationValue), notification, valueConfig);
518
+ const metadata = getNotificationValueMetadata(isFirst ? void 0 : this.getMetadata(ctx, notificationValue), notification, valueConfig);
496
519
  this.setMetadata(ctx, notificationValue, metadata);
497
- if (valueConfig.idle) {
498
- if (this.getValue(ctx, notificationValue) == void 0) {
499
- this.setValue(ctx, notificationValue, 0);
520
+ isFirst = false;
521
+ }
522
+ }
523
+ }
524
+ /**
525
+ * Sets idle values for all supported notification variables that have an idle state
526
+ * and don't have a value yet.
527
+ */
528
+ initNotificationIdleValues(ctx) {
529
+ const supportedTypes = this.getValue(ctx, import_CCValues_generated.NotificationCCValues.supportedNotificationTypes) ?? [];
530
+ for (const type of supportedTypes) {
531
+ const notification = (0, import_core.getNotification)(type);
532
+ if (!notification)
533
+ continue;
534
+ const events = NotificationCC2.getSupportedNotificationEvents(ctx, this.getNode(ctx), type);
535
+ if (!events)
536
+ continue;
537
+ for (const variable of notification.variables.filter((v) => !!v.idle)) {
538
+ if ([...variable.states.keys()].some((key) => events.includes(key))) {
539
+ const value = import_CCValues_generated.NotificationCCValues.notificationVariable(notification.name, variable.name);
540
+ if (this.getValue(ctx, value) == void 0) {
541
+ this.setValue(ctx, value, 0);
500
542
  }
501
543
  }
502
544
  }
503
- this.setValue(ctx, import_CCValues_generated.NotificationCCValues.supportedNotificationTypes, [...supportedNotifications.keys()]);
504
- for (const [type, events] of supportedNotifications) {
505
- this.setValue(ctx, import_CCValues_generated.NotificationCCValues.supportedNotificationEvents(type), [...events]);
506
- }
507
545
  }
508
- this.setInterviewComplete(ctx, true);
509
546
  }
510
- async refreshValues(ctx) {
547
+ async refreshValues(ctx, options) {
511
548
  const node = this.getNode(ctx);
512
549
  const endpoint = this.getEndpoint(ctx);
513
550
  const api = import_API.CCAPI.create(import_core.CommandClasses.Notification, ctx, endpoint).withOptions({
514
- priority: import_core.MessagePriority.NodeQuery
551
+ priority: options?.priority ?? import_core.MessagePriority.NodeQuery
515
552
  });
516
553
  const supportedNotificationTypes = this.getValue(ctx, import_CCValues_generated.NotificationCCValues.supportedNotificationTypes) ?? [];
517
554
  const supportedNotificationNames = supportedNotificationTypes.map(import_core.getNotificationName);
@@ -563,10 +600,10 @@ let NotificationCCSet = (() => {
563
600
  }
564
601
  static {
565
602
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
566
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
603
+ (0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
567
604
  NotificationCCSet2 = _classThis = _classDescriptor.value;
568
605
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
569
- __runInitializers(_classThis, _classExtraInitializers);
606
+ (0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
570
607
  }
571
608
  constructor(options) {
572
609
  super(options);
@@ -619,10 +656,10 @@ let NotificationCCReport = (() => {
619
656
  }
620
657
  static {
621
658
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
622
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
659
+ (0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
623
660
  NotificationCCReport2 = _classThis = _classDescriptor.value;
624
661
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
625
- __runInitializers(_classThis, _classExtraInitializers);
662
+ (0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
626
663
  }
627
664
  constructor(options) {
628
665
  super(options);
@@ -683,7 +720,7 @@ let NotificationCCReport = (() => {
683
720
  if (ccVersion >= 2) {
684
721
  const supportedNotificationTypes = this.getValue(ctx, import_CCValues_generated.NotificationCCValues.supportedNotificationTypes);
685
722
  if ((0, import_typeguards.isArray)(supportedNotificationTypes) && supportedNotificationTypes.includes(this.alarmType)) {
686
- const supportedNotificationEvents = this.getValue(ctx, import_CCValues_generated.NotificationCCValues.supportedNotificationEvents(this.alarmType));
723
+ const supportedNotificationEvents = NotificationCC.getSupportedNotificationEvents(ctx, this.getNode(ctx), this.alarmType);
687
724
  if ((0, import_typeguards.isArray)(supportedNotificationEvents) && supportedNotificationEvents.includes(this.alarmLevel)) {
688
725
  ctx.logNode(this.nodeId, `treating V1 Alarm frame as Notification Report`);
689
726
  this.notificationType = this.alarmType;
@@ -949,10 +986,10 @@ let NotificationCCGet = (() => {
949
986
  }
950
987
  static {
951
988
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
952
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
989
+ (0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
953
990
  NotificationCCGet2 = _classThis = _classDescriptor.value;
954
991
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
955
- __runInitializers(_classThis, _classExtraInitializers);
992
+ (0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
956
993
  }
957
994
  constructor(options) {
958
995
  super(options);
@@ -1032,10 +1069,10 @@ let NotificationCCSupportedReport = (() => {
1032
1069
  }
1033
1070
  static {
1034
1071
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1035
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1072
+ (0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1036
1073
  NotificationCCSupportedReport2 = _classThis = _classDescriptor.value;
1037
1074
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1038
- __runInitializers(_classThis, _classExtraInitializers);
1075
+ (0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
1039
1076
  }
1040
1077
  constructor(options) {
1041
1078
  super(options);
@@ -1099,10 +1136,10 @@ let NotificationCCSupportedGet = (() => {
1099
1136
  }
1100
1137
  static {
1101
1138
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1102
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1139
+ (0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1103
1140
  NotificationCCSupportedGet2 = _classThis = _classDescriptor.value;
1104
1141
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1105
- __runInitializers(_classThis, _classExtraInitializers);
1142
+ (0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
1106
1143
  }
1107
1144
  };
1108
1145
  return NotificationCCSupportedGet2 = _classThis;
@@ -1122,10 +1159,10 @@ let NotificationCCEventSupportedReport = (() => {
1122
1159
  }
1123
1160
  static {
1124
1161
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1125
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1162
+ (0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1126
1163
  NotificationCCEventSupportedReport2 = _classThis = _classDescriptor.value;
1127
1164
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1128
- __runInitializers(_classThis, _classExtraInitializers);
1165
+ (0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
1129
1166
  }
1130
1167
  constructor(options) {
1131
1168
  super(options);
@@ -1216,10 +1253,10 @@ let NotificationCCEventSupportedGet = (() => {
1216
1253
  }
1217
1254
  static {
1218
1255
  const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(_classSuper[Symbol.metadata] ?? null) : void 0;
1219
- __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1256
+ (0, import_tslib.__esDecorate)(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
1220
1257
  NotificationCCEventSupportedGet2 = _classThis = _classDescriptor.value;
1221
1258
  if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
1222
- __runInitializers(_classThis, _classExtraInitializers);
1259
+ (0, import_tslib.__runInitializers)(_classThis, _classExtraInitializers);
1223
1260
  }
1224
1261
  constructor(options) {
1225
1262
  super(options);
@@ -1264,6 +1301,6 @@ let NotificationCCEventSupportedGet = (() => {
1264
1301
  getNotificationEnumBehavior,
1265
1302
  getNotificationStateValueWithEnum,
1266
1303
  getNotificationValueMetadata,
1267
- shouldAutoCreateSimpleDoorSensorValue
1304
+ shouldAutoCreateSyntheticDoorSensorValue
1268
1305
  });
1269
1306
  //# sourceMappingURL=NotificationCC.js.map