@zwave-js/cc 11.0.0-beta.0 → 11.0.0-beta.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 (276) hide show
  1. package/build/cc/AlarmSensorCC.d.ts +2 -2
  2. package/build/cc/AlarmSensorCC.d.ts.map +1 -1
  3. package/build/cc/AlarmSensorCC.js.map +1 -1
  4. package/build/cc/AssociationCC.d.ts +4 -4
  5. package/build/cc/AssociationCC.d.ts.map +1 -1
  6. package/build/cc/AssociationCC.js +1 -1
  7. package/build/cc/AssociationCC.js.map +1 -1
  8. package/build/cc/AssociationGroupInfoCC.d.ts +7 -7
  9. package/build/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  10. package/build/cc/AssociationGroupInfoCC.js.map +1 -1
  11. package/build/cc/BarrierOperatorCC.d.ts +9 -9
  12. package/build/cc/BarrierOperatorCC.d.ts.map +1 -1
  13. package/build/cc/BarrierOperatorCC.js +73 -57
  14. package/build/cc/BarrierOperatorCC.js.map +1 -1
  15. package/build/cc/BasicCC.d.ts +8 -9
  16. package/build/cc/BasicCC.d.ts.map +1 -1
  17. package/build/cc/BasicCC.js +45 -45
  18. package/build/cc/BasicCC.js.map +1 -1
  19. package/build/cc/BatteryCC.d.ts +6 -6
  20. package/build/cc/BatteryCC.d.ts.map +1 -1
  21. package/build/cc/BatteryCC.js +11 -14
  22. package/build/cc/BatteryCC.js.map +1 -1
  23. package/build/cc/BinarySensorCC.d.ts +5 -5
  24. package/build/cc/BinarySensorCC.d.ts.map +1 -1
  25. package/build/cc/BinarySensorCC.js +10 -13
  26. package/build/cc/BinarySensorCC.js.map +1 -1
  27. package/build/cc/BinarySwitchCC.d.ts +11 -13
  28. package/build/cc/BinarySwitchCC.d.ts.map +1 -1
  29. package/build/cc/BinarySwitchCC.js +35 -33
  30. package/build/cc/BinarySwitchCC.js.map +1 -1
  31. package/build/cc/CRC16CC.d.ts +2 -2
  32. package/build/cc/CRC16CC.d.ts.map +1 -1
  33. package/build/cc/CRC16CC.js.map +1 -1
  34. package/build/cc/CentralSceneCC.d.ts +6 -6
  35. package/build/cc/CentralSceneCC.d.ts.map +1 -1
  36. package/build/cc/CentralSceneCC.js +24 -24
  37. package/build/cc/CentralSceneCC.js.map +1 -1
  38. package/build/cc/ClimateControlScheduleCC.d.ts +5 -5
  39. package/build/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  40. package/build/cc/ClimateControlScheduleCC.js +1 -1
  41. package/build/cc/ClimateControlScheduleCC.js.map +1 -1
  42. package/build/cc/ClockCC.d.ts +3 -2
  43. package/build/cc/ClockCC.d.ts.map +1 -1
  44. package/build/cc/ClockCC.js.map +1 -1
  45. package/build/cc/ColorSwitchCC.d.ts +8 -7
  46. package/build/cc/ColorSwitchCC.d.ts.map +1 -1
  47. package/build/cc/ColorSwitchCC.js +88 -89
  48. package/build/cc/ColorSwitchCC.js.map +1 -1
  49. package/build/cc/ConfigurationCC.d.ts +17 -17
  50. package/build/cc/ConfigurationCC.d.ts.map +1 -1
  51. package/build/cc/ConfigurationCC.js +170 -122
  52. package/build/cc/ConfigurationCC.js.map +1 -1
  53. package/build/cc/DeviceResetLocallyCC.d.ts +1 -1
  54. package/build/cc/DeviceResetLocallyCC.d.ts.map +1 -1
  55. package/build/cc/DeviceResetLocallyCC.js.map +1 -1
  56. package/build/cc/DoorLockCC.d.ts +6 -6
  57. package/build/cc/DoorLockCC.d.ts.map +1 -1
  58. package/build/cc/DoorLockCC.js +17 -18
  59. package/build/cc/DoorLockCC.js.map +1 -1
  60. package/build/cc/DoorLockLoggingCC.d.ts +5 -5
  61. package/build/cc/DoorLockLoggingCC.d.ts.map +1 -1
  62. package/build/cc/DoorLockLoggingCC.js.map +1 -1
  63. package/build/cc/EnergyProductionCC.d.ts +8 -7
  64. package/build/cc/EnergyProductionCC.d.ts.map +1 -1
  65. package/build/cc/EnergyProductionCC.js +9 -12
  66. package/build/cc/EnergyProductionCC.js.map +1 -1
  67. package/build/cc/EntryControlCC.d.ts +5 -5
  68. package/build/cc/EntryControlCC.d.ts.map +1 -1
  69. package/build/cc/EntryControlCC.js +37 -38
  70. package/build/cc/EntryControlCC.js.map +1 -1
  71. package/build/cc/FirmwareUpdateMetaDataCC.d.ts +8 -8
  72. package/build/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  73. package/build/cc/FirmwareUpdateMetaDataCC.js +32 -16
  74. package/build/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  75. package/build/cc/HailCC.js.map +1 -1
  76. package/build/cc/HumidityControlModeCC.d.ts +7 -7
  77. package/build/cc/HumidityControlModeCC.d.ts.map +1 -1
  78. package/build/cc/HumidityControlModeCC.js +15 -16
  79. package/build/cc/HumidityControlModeCC.js.map +1 -1
  80. package/build/cc/HumidityControlOperatingStateCC.d.ts +4 -4
  81. package/build/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  82. package/build/cc/HumidityControlOperatingStateCC.js +9 -12
  83. package/build/cc/HumidityControlOperatingStateCC.js.map +1 -1
  84. package/build/cc/HumidityControlSetpointCC.d.ts +10 -10
  85. package/build/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  86. package/build/cc/HumidityControlSetpointCC.js +16 -17
  87. package/build/cc/HumidityControlSetpointCC.js.map +1 -1
  88. package/build/cc/InclusionControllerCC.d.ts +3 -2
  89. package/build/cc/InclusionControllerCC.d.ts.map +1 -1
  90. package/build/cc/InclusionControllerCC.js.map +1 -1
  91. package/build/cc/IndicatorCC.d.ts +48 -9
  92. package/build/cc/IndicatorCC.d.ts.map +1 -1
  93. package/build/cc/IndicatorCC.js +177 -20
  94. package/build/cc/IndicatorCC.js.map +1 -1
  95. package/build/cc/IrrigationCC.d.ts +9 -9
  96. package/build/cc/IrrigationCC.d.ts.map +1 -1
  97. package/build/cc/IrrigationCC.js +139 -140
  98. package/build/cc/IrrigationCC.js.map +1 -1
  99. package/build/cc/LanguageCC.d.ts +6 -6
  100. package/build/cc/LanguageCC.d.ts.map +1 -1
  101. package/build/cc/LanguageCC.js.map +1 -1
  102. package/build/cc/LockCC.d.ts +6 -6
  103. package/build/cc/LockCC.d.ts.map +1 -1
  104. package/build/cc/LockCC.js +23 -24
  105. package/build/cc/LockCC.js.map +1 -1
  106. package/build/cc/ManufacturerProprietaryCC.d.ts +1 -1
  107. package/build/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
  108. package/build/cc/ManufacturerProprietaryCC.js +1 -1
  109. package/build/cc/ManufacturerProprietaryCC.js.map +1 -1
  110. package/build/cc/ManufacturerSpecificCC.d.ts +4 -4
  111. package/build/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  112. package/build/cc/ManufacturerSpecificCC.js.map +1 -1
  113. package/build/cc/MeterCC.d.ts +13 -13
  114. package/build/cc/MeterCC.d.ts.map +1 -1
  115. package/build/cc/MeterCC.js +45 -46
  116. package/build/cc/MeterCC.js.map +1 -1
  117. package/build/cc/MultiChannelAssociationCC.d.ts +4 -4
  118. package/build/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  119. package/build/cc/MultiChannelAssociationCC.js +4 -2
  120. package/build/cc/MultiChannelAssociationCC.js.map +1 -1
  121. package/build/cc/MultiChannelCC.d.ts +8 -8
  122. package/build/cc/MultiChannelCC.d.ts.map +1 -1
  123. package/build/cc/MultiChannelCC.js.map +1 -1
  124. package/build/cc/MultiCommandCC.d.ts +3 -2
  125. package/build/cc/MultiCommandCC.d.ts.map +1 -1
  126. package/build/cc/MultiCommandCC.js +3 -1
  127. package/build/cc/MultiCommandCC.js.map +1 -1
  128. package/build/cc/MultilevelSensorCC.d.ts +11 -11
  129. package/build/cc/MultilevelSensorCC.d.ts.map +1 -1
  130. package/build/cc/MultilevelSensorCC.js +13 -16
  131. package/build/cc/MultilevelSensorCC.js.map +1 -1
  132. package/build/cc/MultilevelSwitchCC.d.ts +16 -12
  133. package/build/cc/MultilevelSwitchCC.d.ts.map +1 -1
  134. package/build/cc/MultilevelSwitchCC.js +100 -78
  135. package/build/cc/MultilevelSwitchCC.js.map +1 -1
  136. package/build/cc/NoOperationCC.js.map +1 -1
  137. package/build/cc/NodeNamingCC.d.ts +7 -7
  138. package/build/cc/NodeNamingCC.d.ts.map +1 -1
  139. package/build/cc/NodeNamingCC.js +15 -16
  140. package/build/cc/NodeNamingCC.js.map +1 -1
  141. package/build/cc/NotificationCC.d.ts +7 -7
  142. package/build/cc/NotificationCC.d.ts.map +1 -1
  143. package/build/cc/NotificationCC.js +16 -19
  144. package/build/cc/NotificationCC.js.map +1 -1
  145. package/build/cc/PowerlevelCC.d.ts +4 -4
  146. package/build/cc/PowerlevelCC.d.ts.map +1 -1
  147. package/build/cc/PowerlevelCC.js.map +1 -1
  148. package/build/cc/ProtectionCC.d.ts +7 -7
  149. package/build/cc/ProtectionCC.d.ts.map +1 -1
  150. package/build/cc/ProtectionCC.js +26 -29
  151. package/build/cc/ProtectionCC.js.map +1 -1
  152. package/build/cc/SceneActivationCC.d.ts +5 -5
  153. package/build/cc/SceneActivationCC.d.ts.map +1 -1
  154. package/build/cc/SceneActivationCC.js +6 -12
  155. package/build/cc/SceneActivationCC.js.map +1 -1
  156. package/build/cc/SceneActuatorConfigurationCC.d.ts +7 -7
  157. package/build/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
  158. package/build/cc/SceneActuatorConfigurationCC.js +32 -25
  159. package/build/cc/SceneActuatorConfigurationCC.js.map +1 -1
  160. package/build/cc/SceneControllerConfigurationCC.d.ts +7 -7
  161. package/build/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
  162. package/build/cc/SceneControllerConfigurationCC.js +14 -15
  163. package/build/cc/SceneControllerConfigurationCC.js.map +1 -1
  164. package/build/cc/ScheduleEntryLockCC.d.ts +15 -14
  165. package/build/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  166. package/build/cc/ScheduleEntryLockCC.js +1 -1
  167. package/build/cc/ScheduleEntryLockCC.js.map +1 -1
  168. package/build/cc/Security2CC.d.ts +4 -3
  169. package/build/cc/Security2CC.d.ts.map +1 -1
  170. package/build/cc/Security2CC.js.map +1 -1
  171. package/build/cc/SecurityCC.d.ts +3 -2
  172. package/build/cc/SecurityCC.d.ts.map +1 -1
  173. package/build/cc/SecurityCC.js.map +1 -1
  174. package/build/cc/SoundSwitchCC.d.ts +7 -7
  175. package/build/cc/SoundSwitchCC.d.ts.map +1 -1
  176. package/build/cc/SoundSwitchCC.js +57 -55
  177. package/build/cc/SoundSwitchCC.js.map +1 -1
  178. package/build/cc/SupervisionCC.d.ts +2 -2
  179. package/build/cc/SupervisionCC.d.ts.map +1 -1
  180. package/build/cc/SupervisionCC.js.map +1 -1
  181. package/build/cc/ThermostatFanModeCC.d.ts +6 -6
  182. package/build/cc/ThermostatFanModeCC.d.ts.map +1 -1
  183. package/build/cc/ThermostatFanModeCC.js +15 -16
  184. package/build/cc/ThermostatFanModeCC.js.map +1 -1
  185. package/build/cc/ThermostatFanStateCC.d.ts +4 -4
  186. package/build/cc/ThermostatFanStateCC.d.ts.map +1 -1
  187. package/build/cc/ThermostatFanStateCC.js +9 -12
  188. package/build/cc/ThermostatFanStateCC.js.map +1 -1
  189. package/build/cc/ThermostatModeCC.d.ts +6 -6
  190. package/build/cc/ThermostatModeCC.d.ts.map +1 -1
  191. package/build/cc/ThermostatModeCC.js +15 -16
  192. package/build/cc/ThermostatModeCC.js.map +1 -1
  193. package/build/cc/ThermostatOperatingStateCC.d.ts +6 -6
  194. package/build/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  195. package/build/cc/ThermostatOperatingStateCC.js +9 -12
  196. package/build/cc/ThermostatOperatingStateCC.js.map +1 -1
  197. package/build/cc/ThermostatSetbackCC.d.ts +6 -6
  198. package/build/cc/ThermostatSetbackCC.d.ts.map +1 -1
  199. package/build/cc/ThermostatSetbackCC.js +12 -15
  200. package/build/cc/ThermostatSetbackCC.js.map +1 -1
  201. package/build/cc/ThermostatSetpointCC.d.ts +6 -6
  202. package/build/cc/ThermostatSetpointCC.d.ts.map +1 -1
  203. package/build/cc/ThermostatSetpointCC.js +23 -19
  204. package/build/cc/ThermostatSetpointCC.js.map +1 -1
  205. package/build/cc/TimeCC.d.ts +4 -3
  206. package/build/cc/TimeCC.d.ts.map +1 -1
  207. package/build/cc/TimeCC.js +1 -1
  208. package/build/cc/TimeCC.js.map +1 -1
  209. package/build/cc/TimeParametersCC.d.ts +7 -6
  210. package/build/cc/TimeParametersCC.d.ts.map +1 -1
  211. package/build/cc/TimeParametersCC.js +14 -15
  212. package/build/cc/TimeParametersCC.js.map +1 -1
  213. package/build/cc/TransportServiceCC.d.ts +1 -1
  214. package/build/cc/TransportServiceCC.d.ts.map +1 -1
  215. package/build/cc/TransportServiceCC.js +6 -2
  216. package/build/cc/TransportServiceCC.js.map +1 -1
  217. package/build/cc/UserCodeCC.d.ts +18 -18
  218. package/build/cc/UserCodeCC.d.ts.map +1 -1
  219. package/build/cc/UserCodeCC.js +31 -32
  220. package/build/cc/UserCodeCC.js.map +1 -1
  221. package/build/cc/VersionCC.d.ts +3 -3
  222. package/build/cc/VersionCC.d.ts.map +1 -1
  223. package/build/cc/VersionCC.js +1 -4
  224. package/build/cc/VersionCC.js.map +1 -1
  225. package/build/cc/WakeUpCC.d.ts +4 -4
  226. package/build/cc/WakeUpCC.d.ts.map +1 -1
  227. package/build/cc/WakeUpCC.js +17 -18
  228. package/build/cc/WakeUpCC.js.map +1 -1
  229. package/build/cc/WindowCoveringCC.d.ts +9 -8
  230. package/build/cc/WindowCoveringCC.d.ts.map +1 -1
  231. package/build/cc/WindowCoveringCC.js +60 -57
  232. package/build/cc/WindowCoveringCC.js.map +1 -1
  233. package/build/cc/ZWavePlusCC.d.ts +2 -2
  234. package/build/cc/ZWavePlusCC.d.ts.map +1 -1
  235. package/build/cc/ZWavePlusCC.js.map +1 -1
  236. package/build/cc/ZWaveProtocolCC.d.ts +2 -2
  237. package/build/cc/ZWaveProtocolCC.d.ts.map +1 -1
  238. package/build/cc/ZWaveProtocolCC.js.map +1 -1
  239. package/build/cc/index.d.ts +6 -6
  240. package/build/cc/index.d.ts.map +1 -1
  241. package/build/cc/index.js +38 -38
  242. package/build/cc/index.js.map +1 -1
  243. package/build/cc/manufacturerProprietary/Decorators.d.ts +1 -1
  244. package/build/cc/manufacturerProprietary/Decorators.d.ts.map +1 -1
  245. package/build/cc/manufacturerProprietary/FibaroCC.d.ts +5 -5
  246. package/build/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
  247. package/build/cc/manufacturerProprietary/FibaroCC.js +34 -43
  248. package/build/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  249. package/build/index.d.ts +3 -2
  250. package/build/index.d.ts.map +1 -1
  251. package/build/index.js +5 -5
  252. package/build/index.js.map +1 -1
  253. package/build/lib/API.d.ts +10 -8
  254. package/build/lib/API.d.ts.map +1 -1
  255. package/build/lib/API.js +11 -3
  256. package/build/lib/API.js.map +1 -1
  257. package/build/lib/CommandClass.d.ts +5 -5
  258. package/build/lib/CommandClass.d.ts.map +1 -1
  259. package/build/lib/CommandClass.js +2 -2
  260. package/build/lib/CommandClass.js.map +1 -1
  261. package/build/lib/CommandClassDecorators.d.ts +1 -1
  262. package/build/lib/CommandClassDecorators.d.ts.map +1 -1
  263. package/build/lib/EncapsulatingCommandClass.d.ts +1 -1
  264. package/build/lib/EncapsulatingCommandClass.d.ts.map +1 -1
  265. package/build/lib/EncapsulatingCommandClass.js.map +1 -1
  266. package/build/lib/Security2/Extension.d.ts +1 -1
  267. package/build/lib/Security2/Extension.d.ts.map +1 -1
  268. package/build/lib/Security2/Extension.js.map +1 -1
  269. package/build/lib/Values.d.ts +1 -1
  270. package/build/lib/Values.d.ts.map +1 -1
  271. package/build/lib/_Types.d.ts +14 -16
  272. package/build/lib/_Types.d.ts.map +1 -1
  273. package/build/lib/_Types.js.map +1 -1
  274. package/build/lib/utils.d.ts +1 -1
  275. package/build/lib/utils.d.ts.map +1 -1
  276. package/package.json +11 -11
@@ -5,7 +5,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
6
  return c > 3 && r && Object.defineProperty(target, key, r), r;
7
7
  };
8
- var _a, _b;
9
8
  Object.defineProperty(exports, "__esModule", { value: true });
10
9
  exports.ConfigurationCCDefaultReset = exports.ConfigurationCCPropertiesGet = exports.ConfigurationCCPropertiesReport = exports.ConfigurationCCInfoGet = exports.ConfigurationCCInfoReport = exports.ConfigurationCCNameGet = exports.ConfigurationCCNameReport = exports.ConfigurationCCBulkGet = exports.ConfigurationCCBulkReport = exports.ConfigurationCCBulkSet = exports.ConfigurationCCSet = exports.ConfigurationCCGet = exports.ConfigurationCCReport = exports.ConfigurationCC = exports.ConfigurationCCAPI = exports.ConfigurationCCValues = exports.ConfigurationCCError = void 0;
11
10
  function __assertType(argName, typeName, boundHasError) {
@@ -104,18 +103,6 @@ const __assertType__ConfigurationCCAPISetOptions = $o => {
104
103
  function _undefined($o) {
105
104
  return $o !== undefined ? {} : null;
106
105
  }
107
- function _ignore() {
108
- return null;
109
- }
110
- function su__number__11_9_9_9_eu($o) {
111
- const conditions = [_number, _ignore];
112
- for (const condition of conditions) {
113
- const error = condition($o);
114
- if (!error)
115
- return null;
116
- }
117
- return {};
118
- }
119
106
  function _3($o) {
120
107
  if (typeof $o !== "object" || $o === null || Array.isArray($o))
121
108
  return {};
@@ -125,7 +112,7 @@ const __assertType__ConfigurationCCAPISetOptions = $o => {
125
112
  return error;
126
113
  }
127
114
  if ("value" in $o && $o["value"] !== undefined) {
128
- const error = su__number__11_9_9_9_eu($o["value"]);
115
+ const error = _number($o["value"]);
129
116
  if (error)
130
117
  return error;
131
118
  }
@@ -142,17 +129,17 @@ const __assertType__ConfigurationCCAPISetOptions = $o => {
142
129
  }
143
130
  return null;
144
131
  }
145
- function _13($o) {
146
- return $o !== 2 ? {} : null;
147
- }
148
- function _14($o) {
132
+ function _9($o) {
149
133
  return $o !== 1 ? {} : null;
150
134
  }
151
- function _15($o) {
135
+ function _10($o) {
136
+ return $o !== 2 ? {} : null;
137
+ }
138
+ function _11($o) {
152
139
  return $o !== 4 ? {} : null;
153
140
  }
154
- function su__13__14__15_eu($o) {
155
- const conditions = [_13, _14, _15];
141
+ function su__9__10__11_eu($o) {
142
+ const conditions = [_9, _10, _11];
156
143
  for (const condition of conditions) {
157
144
  const error = condition($o);
158
145
  if (!error)
@@ -160,7 +147,7 @@ const __assertType__ConfigurationCCAPISetOptions = $o => {
160
147
  }
161
148
  return {};
162
149
  }
163
- function su__17__18__19__20_eu($o) {
150
+ function su__13__14__15__16_eu($o) {
164
151
  return ![0, 1, 2, 3].includes($o) ? {} : null;
165
152
  }
166
153
  function _5($o) {
@@ -172,21 +159,21 @@ const __assertType__ConfigurationCCAPISetOptions = $o => {
172
159
  return error;
173
160
  }
174
161
  if ("value" in $o && $o["value"] !== undefined) {
175
- const error = su__number__11_9_9_9_eu($o["value"]);
162
+ const error = _number($o["value"]);
176
163
  if (error)
177
164
  return error;
178
165
  }
179
166
  else
180
167
  return {};
181
168
  if ("valueSize" in $o && $o["valueSize"] !== undefined) {
182
- const error = su__13__14__15_eu($o["valueSize"]);
169
+ const error = su__9__10__11_eu($o["valueSize"]);
183
170
  if (error)
184
171
  return error;
185
172
  }
186
173
  else
187
174
  return {};
188
175
  if ("valueFormat" in $o && $o["valueFormat"] !== undefined) {
189
- const error = su__17__18__19__20_eu($o["valueFormat"]);
176
+ const error = su__13__14__15__16_eu($o["valueFormat"]);
190
177
  if (error)
191
178
  return error;
192
179
  }
@@ -261,18 +248,6 @@ const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = $o => {
261
248
  function _undefined($o) {
262
249
  return $o !== undefined ? {} : null;
263
250
  }
264
- function _ignore() {
265
- return null;
266
- }
267
- function su__number__13_11_11_11_eu($o) {
268
- const conditions = [_number, _ignore];
269
- for (const condition of conditions) {
270
- const error = condition($o);
271
- if (!error)
272
- return null;
273
- }
274
- return {};
275
- }
276
251
  function _5($o) {
277
252
  if (typeof $o !== "object" || $o === null || Array.isArray($o))
278
253
  return {};
@@ -282,7 +257,7 @@ const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = $o => {
282
257
  return error;
283
258
  }
284
259
  if ("value" in $o && $o["value"] !== undefined) {
285
- const error = su__number__13_11_11_11_eu($o["value"]);
260
+ const error = _number($o["value"]);
286
261
  if (error)
287
262
  return error;
288
263
  }
@@ -299,17 +274,17 @@ const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = $o => {
299
274
  }
300
275
  return null;
301
276
  }
302
- function _15($o) {
303
- return $o !== 2 ? {} : null;
304
- }
305
- function _16($o) {
277
+ function _11($o) {
306
278
  return $o !== 1 ? {} : null;
307
279
  }
308
- function _17($o) {
280
+ function _12($o) {
281
+ return $o !== 2 ? {} : null;
282
+ }
283
+ function _13($o) {
309
284
  return $o !== 4 ? {} : null;
310
285
  }
311
- function su__15__16__17_eu($o) {
312
- const conditions = [_15, _16, _17];
286
+ function su__11__12__13_eu($o) {
287
+ const conditions = [_11, _12, _13];
313
288
  for (const condition of conditions) {
314
289
  const error = condition($o);
315
290
  if (!error)
@@ -317,7 +292,7 @@ const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = $o => {
317
292
  }
318
293
  return {};
319
294
  }
320
- function su__19__20__21__22_eu($o) {
295
+ function su__15__16__17__18_eu($o) {
321
296
  return ![0, 1, 2, 3].includes($o) ? {} : null;
322
297
  }
323
298
  function _7($o) {
@@ -329,21 +304,21 @@ const __assertType__sa_su_si__4__5_ei_si__4__7_ei_si__4__9_ei_eu_ea_2 = $o => {
329
304
  return error;
330
305
  }
331
306
  if ("value" in $o && $o["value"] !== undefined) {
332
- const error = su__number__13_11_11_11_eu($o["value"]);
307
+ const error = _number($o["value"]);
333
308
  if (error)
334
309
  return error;
335
310
  }
336
311
  else
337
312
  return {};
338
313
  if ("valueSize" in $o && $o["valueSize"] !== undefined) {
339
- const error = su__15__16__17_eu($o["valueSize"]);
314
+ const error = su__11__12__13_eu($o["valueSize"]);
340
315
  if (error)
341
316
  return error;
342
317
  }
343
318
  else
344
319
  return {};
345
320
  if ("valueFormat" in $o && $o["valueFormat"] !== undefined) {
346
- const error = su__19__20__21__22_eu($o["valueFormat"]);
321
+ const error = su__15__16__17__18_eu($o["valueFormat"]);
347
322
  if (error)
348
323
  return error;
349
324
  }
@@ -562,9 +537,25 @@ function getParamInformationFromConfigFile(applHost, nodeId, endpointIndex) {
562
537
  }
563
538
  }
564
539
  let ConfigurationCCAPI = class ConfigurationCCAPI extends API_1.CCAPI {
565
- constructor() {
566
- super(...arguments);
567
- this[_a] = async ({ property, propertyKey }, value) => {
540
+ supportsCommand(cmd) {
541
+ switch (cmd) {
542
+ case _Types_1.ConfigurationCommand.Get:
543
+ case _Types_1.ConfigurationCommand.Set:
544
+ return true; // This is mandatory
545
+ case _Types_1.ConfigurationCommand.BulkGet:
546
+ case _Types_1.ConfigurationCommand.BulkSet:
547
+ return this.version >= 2;
548
+ case _Types_1.ConfigurationCommand.NameGet:
549
+ case _Types_1.ConfigurationCommand.InfoGet:
550
+ case _Types_1.ConfigurationCommand.PropertiesGet:
551
+ return this.version >= 3;
552
+ case _Types_1.ConfigurationCommand.DefaultReset:
553
+ return this.version >= 4;
554
+ }
555
+ return super.supportsCommand(cmd);
556
+ }
557
+ get [API_1.SET_VALUE]() {
558
+ return async function ({ property, propertyKey }, value) {
568
559
  // Config parameters are addressed with numeric properties/keys
569
560
  if (typeof property !== "number") {
570
561
  (0, API_1.throwUnsupportedProperty)(this.ccId, property);
@@ -649,7 +640,9 @@ let ConfigurationCCAPI = class ConfigurationCCAPI extends API_1.CCAPI {
649
640
  }
650
641
  return result;
651
642
  };
652
- this[_b] = async ({ property, propertyKey, }) => {
643
+ }
644
+ get [API_1.POLL_VALUE]() {
645
+ return async function ({ property, propertyKey }) {
653
646
  // Config parameters are addressed with numeric properties/keys
654
647
  if (typeof property !== "number") {
655
648
  (0, API_1.throwUnsupportedProperty)(this.ccId, property);
@@ -660,23 +653,6 @@ let ConfigurationCCAPI = class ConfigurationCCAPI extends API_1.CCAPI {
660
653
  return this.get(property, { valueBitMask: propertyKey });
661
654
  };
662
655
  }
663
- supportsCommand(cmd) {
664
- switch (cmd) {
665
- case _Types_1.ConfigurationCommand.Get:
666
- case _Types_1.ConfigurationCommand.Set:
667
- return true; // This is mandatory
668
- case _Types_1.ConfigurationCommand.BulkGet:
669
- case _Types_1.ConfigurationCommand.BulkSet:
670
- return this.version >= 2;
671
- case _Types_1.ConfigurationCommand.NameGet:
672
- case _Types_1.ConfigurationCommand.InfoGet:
673
- case _Types_1.ConfigurationCommand.PropertiesGet:
674
- return this.version >= 3;
675
- case _Types_1.ConfigurationCommand.DefaultReset:
676
- return this.version >= 4;
677
- }
678
- return super.supportsCommand(cmd);
679
- }
680
656
  /**
681
657
  * Requests the current value of a given config parameter from the device.
682
658
  * This may timeout and return `undefined` if the node does not respond.
@@ -1041,7 +1017,6 @@ let ConfigurationCCAPI = class ConfigurationCCAPI extends API_1.CCAPI {
1041
1017
  }
1042
1018
  }
1043
1019
  };
1044
- _a = API_1.SET_VALUE, _b = API_1.POLL_VALUE;
1045
1020
  ConfigurationCCAPI = __decorate([
1046
1021
  (0, CommandClassDecorators_1.API)(safe_1.CommandClasses.Configuration)
1047
1022
  ], ConfigurationCCAPI);
@@ -1435,31 +1410,42 @@ let ConfigurationCCReport = class ConfigurationCCReport extends ConfigurationCC
1435
1410
  persistValues(applHost) {
1436
1411
  if (!super.persistValues(applHost))
1437
1412
  return false;
1438
- // Check if the initial assumption of SignedInteger holds true
1439
- const oldParamInformation = this.getParamInformation(applHost, this.parameter);
1440
- if (oldParamInformation.format != undefined &&
1441
- oldParamInformation.format !== safe_1.ConfigValueFormat.SignedInteger) {
1413
+ // This parameter may be a partial param in the following cases:
1414
+ // * a config file defines it as such
1415
+ // * it was reported by the device as a bit field
1416
+ const partialParams = this.getPartialParamInfos(applHost, this.parameter);
1417
+ let cachedValueFormat;
1418
+ if (partialParams.length > 0) {
1419
+ // This is a partial param. All definitions should have the same format, so we just take the first one
1420
+ cachedValueFormat = partialParams[0].metadata.format;
1421
+ }
1422
+ else {
1423
+ // Check if the initial assumption of SignedInteger holds true
1424
+ const oldParamInformation = this.getParamInformation(applHost, this.parameter);
1425
+ cachedValueFormat = oldParamInformation.format;
1426
+ // On older CC versions, these reports may be the only way we can retrieve the value size
1427
+ // Therefore we store it here
1428
+ this.extendParamInformation(applHost, this.parameter, undefined, {
1429
+ valueSize: this.valueSize,
1430
+ });
1431
+ if (this.version < 3 &&
1432
+ !this.isParamInformationFromConfig &&
1433
+ oldParamInformation.min == undefined &&
1434
+ oldParamInformation.max == undefined) {
1435
+ const isSigned = oldParamInformation.format == undefined ||
1436
+ oldParamInformation.format ===
1437
+ safe_1.ConfigValueFormat.SignedInteger;
1438
+ this.extendParamInformation(applHost, this.parameter, undefined, (0, safe_1.getIntegerLimits)(this.valueSize, isSigned));
1439
+ }
1440
+ }
1441
+ // We may have to re-interpret the value as unsigned, depending on the cached value format
1442
+ if (cachedValueFormat != undefined &&
1443
+ cachedValueFormat !== safe_1.ConfigValueFormat.SignedInteger) {
1442
1444
  // Re-interpret the value with the new format
1443
- this.value = reInterpretSignedValue(this.value, this.valueSize, oldParamInformation.format);
1444
- }
1445
- // Store the parameter size and value
1446
- this.extendParamInformation(applHost, this.parameter, undefined, {
1447
- valueSize: this.valueSize,
1448
- type: oldParamInformation.format === safe_1.ConfigValueFormat.BitField
1449
- ? "number[]"
1450
- : "number",
1451
- });
1452
- if (this.version < 3 &&
1453
- !this.isParamInformationFromConfig &&
1454
- oldParamInformation.min == undefined &&
1455
- oldParamInformation.max == undefined) {
1456
- const isSigned = oldParamInformation.format == undefined ||
1457
- oldParamInformation.format === safe_1.ConfigValueFormat.SignedInteger;
1458
- this.extendParamInformation(applHost, this.parameter, undefined, (0, safe_1.getIntegerLimits)(this.valueSize, isSigned));
1445
+ this.value = reInterpretSignedValue(this.value, this.valueSize, cachedValueFormat);
1459
1446
  }
1460
1447
  // And store the value itself
1461
1448
  // If we have partial config params defined, we need to split the value
1462
- const partialParams = this.getPartialParamInfos(applHost, this.parameter);
1463
1449
  if (partialParams.length > 0) {
1464
1450
  for (const param of partialParams) {
1465
1451
  if (typeof param.propertyKey === "number") {
@@ -1478,10 +1464,7 @@ let ConfigurationCCReport = class ConfigurationCCReport extends ConfigurationCC
1478
1464
  Buffer.from([this.parameter, this.valueSize & 0b111]),
1479
1465
  Buffer.allocUnsafe(this.valueSize),
1480
1466
  ]);
1481
- const valueFormat = typeof this.value === "number"
1482
- ? this.valueFormat ?? safe_1.ConfigValueFormat.SignedInteger
1483
- : safe_1.ConfigValueFormat.BitField;
1484
- serializeValue(this.payload, 2, this.valueSize, valueFormat, this.value);
1467
+ serializeValue(this.payload, 2, this.valueSize, this.valueFormat ?? safe_1.ConfigValueFormat.SignedInteger, this.value);
1485
1468
  return super.serialize();
1486
1469
  }
1487
1470
  toLogEntry(applHost) {
@@ -1858,9 +1841,31 @@ let ConfigurationCCNameReport = class ConfigurationCCNameReport extends Configur
1858
1841
  persistValues(applHost) {
1859
1842
  if (!super.persistValues(applHost))
1860
1843
  return false;
1861
- this.extendParamInformation(applHost, this.parameter, undefined, {
1862
- label: this.name,
1863
- });
1844
+ // Bitfield parameters that are not documented in a config file
1845
+ // are split into multiple partial parameters. We need to set the name for
1846
+ // all of them.
1847
+ const partialParams = this.getPartialParamInfos(applHost, this.parameter);
1848
+ if (partialParams.length === 0) {
1849
+ this.extendParamInformation(applHost, this.parameter, undefined, {
1850
+ label: this.name,
1851
+ });
1852
+ }
1853
+ else {
1854
+ for (const param of partialParams) {
1855
+ const paramNumber = param.property;
1856
+ const bitMask = param.propertyKey;
1857
+ const bitNumber = Math.log2(bitMask) % 1 === 0
1858
+ ? Math.log2(bitMask)
1859
+ : undefined;
1860
+ let label = `${this.name} - ${bitMask}`;
1861
+ if (bitNumber != undefined) {
1862
+ label += ` (bit ${bitNumber})`;
1863
+ }
1864
+ this.extendParamInformation(applHost, paramNumber, bitMask, {
1865
+ label,
1866
+ });
1867
+ }
1868
+ }
1864
1869
  return true;
1865
1870
  }
1866
1871
  serialize() {
@@ -1950,9 +1955,38 @@ let ConfigurationCCInfoReport = class ConfigurationCCInfoReport extends Configur
1950
1955
  persistValues(applHost) {
1951
1956
  if (!super.persistValues(applHost))
1952
1957
  return false;
1953
- this.extendParamInformation(applHost, this.parameter, undefined, {
1954
- description: this.info,
1955
- });
1958
+ // Bitfield parameters that are not documented in a config file
1959
+ // are split into multiple partial parameters. We need to set the description for
1960
+ // all of them. However, these can get very long, so we put the reported
1961
+ // description on the first partial param, and refer to it from the others
1962
+ const partialParams = this.getPartialParamInfos(applHost, this.parameter).sort((a, b) => (a.propertyKey ?? 0) -
1963
+ (b.propertyKey ?? 0));
1964
+ if (partialParams.length === 0) {
1965
+ this.extendParamInformation(applHost, this.parameter, undefined, {
1966
+ description: this.info,
1967
+ });
1968
+ }
1969
+ else {
1970
+ let firstParamLabel;
1971
+ for (const param of partialParams) {
1972
+ const paramNumber = param.property;
1973
+ const bitMask = param.propertyKey;
1974
+ // We put the description on the first partial param
1975
+ const description = firstParamLabel
1976
+ ? `Refer to ${firstParamLabel}`
1977
+ : this.info;
1978
+ this.extendParamInformation(applHost, paramNumber, bitMask, {
1979
+ description,
1980
+ });
1981
+ // Then we store the name of the first param to refer to it on the
1982
+ // following partial params
1983
+ if (firstParamLabel == undefined) {
1984
+ firstParamLabel =
1985
+ this.getParamInformation(applHost, paramNumber, bitMask)
1986
+ .label ?? `parameter ${paramNumber} - ${bitMask}`;
1987
+ }
1988
+ }
1989
+ }
1956
1990
  return true;
1957
1991
  }
1958
1992
  serialize() {
@@ -2037,7 +2071,10 @@ let ConfigurationCCPropertiesReport = class ConfigurationCCPropertiesReport exte
2037
2071
  const nextParameterOffset = 3 + 3 * this.valueSize;
2038
2072
  (0, safe_1.validatePayload)(this.payload.length >= nextParameterOffset + 2);
2039
2073
  if (this.valueSize > 0) {
2040
- if (this.valueFormat !== safe_1.ConfigValueFormat.BitField) {
2074
+ if (this.valueFormat === safe_1.ConfigValueFormat.BitField) {
2075
+ this.minValue = 0;
2076
+ }
2077
+ else {
2041
2078
  this.minValue = parseValue(this.payload.slice(3), this.valueSize, this.valueFormat);
2042
2079
  }
2043
2080
  this.maxValue = parseValue(this.payload.slice(3 + this.valueSize), this.valueSize, this.valueFormat);
@@ -2090,17 +2127,10 @@ let ConfigurationCCPropertiesReport = class ConfigurationCCPropertiesReport exte
2090
2127
  return false;
2091
2128
  // If we actually received parameter info, store it
2092
2129
  if (this.valueSize > 0) {
2093
- const valueType = this.valueFormat === safe_1.ConfigValueFormat.SignedInteger ||
2094
- this.valueFormat === safe_1.ConfigValueFormat.UnsignedInteger
2095
- ? "number"
2096
- : "number[]";
2097
- const paramInfo = (0, safe_1.stripUndefined)({
2098
- type: valueType,
2130
+ const baseInfo = {
2131
+ type: "number",
2099
2132
  format: this.valueFormat,
2100
2133
  valueSize: this.valueSize,
2101
- min: this.minValue,
2102
- max: this.maxValue,
2103
- default: this.defaultValue,
2104
2134
  requiresReInclusion: this.altersCapabilities,
2105
2135
  readable: true,
2106
2136
  writeable: !this.isReadonly,
@@ -2108,8 +2138,31 @@ let ConfigurationCCPropertiesReport = class ConfigurationCCPropertiesReport exte
2108
2138
  isAdvanced: this.isAdvanced,
2109
2139
  noBulkSupport: this.noBulkSupport,
2110
2140
  isFromConfig: false,
2111
- });
2112
- this.extendParamInformation(applHost, this.parameter, undefined, paramInfo);
2141
+ };
2142
+ if (this.valueFormat !== safe_1.ConfigValueFormat.BitField) {
2143
+ const paramInfo = (0, safe_1.stripUndefined)({
2144
+ ...baseInfo,
2145
+ min: this.minValue,
2146
+ max: this.maxValue,
2147
+ default: this.defaultValue,
2148
+ });
2149
+ this.extendParamInformation(applHost, this.parameter, undefined, paramInfo);
2150
+ }
2151
+ else {
2152
+ // Bit fields are split into multiple single-bit partial parameters
2153
+ const bits = this.maxValue;
2154
+ let mask = 1;
2155
+ while (mask <= bits) {
2156
+ const paramInfo = (0, safe_1.stripUndefined)({
2157
+ ...baseInfo,
2158
+ min: 0,
2159
+ max: 1,
2160
+ default: this.defaultValue & mask ? 1 : 0,
2161
+ });
2162
+ this.extendParamInformation(applHost, this.parameter, mask, paramInfo);
2163
+ mask <<= 1;
2164
+ }
2165
+ }
2113
2166
  }
2114
2167
  return true;
2115
2168
  }
@@ -2224,10 +2277,10 @@ function isSafeValue(value, size, format) {
2224
2277
  break;
2225
2278
  case safe_1.ConfigValueFormat.UnsignedInteger:
2226
2279
  case safe_1.ConfigValueFormat.Enumerated:
2280
+ case safe_1.ConfigValueFormat.BitField:
2227
2281
  minValue = 0;
2228
2282
  maxValue = Math.pow(2, 8 * size);
2229
2283
  break;
2230
- case safe_1.ConfigValueFormat.BitField:
2231
2284
  default:
2232
2285
  throw new Error("not implemented");
2233
2286
  }
@@ -2240,9 +2293,8 @@ function parseValue(raw, size, format) {
2240
2293
  return raw.readIntBE(0, size);
2241
2294
  case safe_1.ConfigValueFormat.UnsignedInteger:
2242
2295
  case safe_1.ConfigValueFormat.Enumerated:
2243
- return raw.readUIntBE(0, size);
2244
2296
  case safe_1.ConfigValueFormat.BitField:
2245
- return new Set((0, safe_1.parseBitMask)(raw.slice(0, size)));
2297
+ return raw.readUIntBE(0, size);
2246
2298
  }
2247
2299
  }
2248
2300
  function throwInvalidValueError(value, parameter, valueSize, valueFormat) {
@@ -2264,13 +2316,9 @@ function serializeValue(payload, offset, size, format, value) {
2264
2316
  return;
2265
2317
  case safe_1.ConfigValueFormat.UnsignedInteger:
2266
2318
  case safe_1.ConfigValueFormat.Enumerated:
2319
+ case safe_1.ConfigValueFormat.BitField:
2267
2320
  payload.writeUIntBE(value, offset, size);
2268
2321
  return;
2269
- case safe_1.ConfigValueFormat.BitField: {
2270
- const mask = (0, safe_1.encodeBitMask)([...value.values()], size * 8);
2271
- mask.copy(payload, offset);
2272
- return;
2273
- }
2274
2322
  }
2275
2323
  }
2276
2324
  //# sourceMappingURL=ConfigurationCC.js.map