@zwave-js/cc 15.25.2 → 15.25.3

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 (159) hide show
  1. package/build/cjs/cc/AlarmSensorCC.js +10 -14
  2. package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
  3. package/build/cjs/cc/AssociationCC.d.ts +1 -1
  4. package/build/cjs/cc/AssociationCC.js.map +1 -1
  5. package/build/cjs/cc/AssociationGroupInfoCC.js +16 -16
  6. package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
  7. package/build/cjs/cc/BarrierOperatorCC.js +4 -4
  8. package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
  9. package/build/cjs/cc/BinarySensorCC.js +3 -3
  10. package/build/cjs/cc/BinarySensorCC.js.map +2 -2
  11. package/build/cjs/cc/CentralSceneCC.js +7 -6
  12. package/build/cjs/cc/CentralSceneCC.js.map +2 -2
  13. package/build/cjs/cc/ColorSwitchCC.js +4 -4
  14. package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
  15. package/build/cjs/cc/ConfigurationCC.js +22 -25
  16. package/build/cjs/cc/ConfigurationCC.js.map +2 -2
  17. package/build/cjs/cc/DoorLockCC.js +44 -60
  18. package/build/cjs/cc/DoorLockCC.js.map +2 -2
  19. package/build/cjs/cc/HumidityControlModeCC.js +4 -5
  20. package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
  21. package/build/cjs/cc/HumidityControlSetpointCC.js +14 -14
  22. package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
  23. package/build/cjs/cc/IrrigationCC.js +21 -25
  24. package/build/cjs/cc/IrrigationCC.js.map +2 -2
  25. package/build/cjs/cc/MeterCC.js +9 -10
  26. package/build/cjs/cc/MeterCC.js.map +2 -2
  27. package/build/cjs/cc/MultiChannelCC.d.ts +1 -1
  28. package/build/cjs/cc/MultiChannelCC.js +17 -21
  29. package/build/cjs/cc/MultiChannelCC.js.map +2 -2
  30. package/build/cjs/cc/MultilevelSensorCC.js +8 -6
  31. package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
  32. package/build/cjs/cc/NotificationCC.js +4 -8
  33. package/build/cjs/cc/NotificationCC.js.map +2 -2
  34. package/build/cjs/cc/ProtectionCC.js +11 -12
  35. package/build/cjs/cc/ProtectionCC.js.map +2 -2
  36. package/build/cjs/cc/Security2CC.js +12 -22
  37. package/build/cjs/cc/Security2CC.js.map +2 -2
  38. package/build/cjs/cc/SecurityCC.js +8 -16
  39. package/build/cjs/cc/SecurityCC.js.map +2 -2
  40. package/build/cjs/cc/ThermostatFanModeCC.js +4 -4
  41. package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
  42. package/build/cjs/cc/ThermostatModeCC.js +4 -4
  43. package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
  44. package/build/cjs/cc/ThermostatOperatingStateCC.js +1 -2
  45. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
  46. package/build/cjs/cc/ThermostatSetpointCC.js +4 -3
  47. package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
  48. package/build/cjs/cc/UserCodeCC.js +2 -4
  49. package/build/cjs/cc/UserCodeCC.js.map +2 -2
  50. package/build/cjs/cc/WindowCoveringCC.js +5 -5
  51. package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
  52. package/build/cjs/cc/_CCValues.generated.d.ts +4 -4
  53. package/build/cjs/cc/_CCValues.generated.js +2 -2
  54. package/build/cjs/cc/_CCValues.generated.js.map +1 -1
  55. package/build/cjs/cc/index.d.ts +3 -3
  56. package/build/cjs/cc/index.js.map +2 -2
  57. package/build/cjs/lib/CommandClass.d.ts +3 -1
  58. package/build/cjs/lib/CommandClass.js +25 -3
  59. package/build/cjs/lib/CommandClass.js.map +2 -2
  60. package/build/cjs/lib/Security2/Extension.d.ts +6 -4
  61. package/build/cjs/lib/Security2/Extension.js +22 -20
  62. package/build/cjs/lib/Security2/Extension.js.map +2 -2
  63. package/build/cjs/lib/_Types.js.map +1 -1
  64. package/build/cjs/lib/utils.js +14 -8
  65. package/build/cjs/lib/utils.js.map +2 -2
  66. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  67. package/build/esm/cc/AlarmSensorCC.js +11 -17
  68. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  69. package/build/esm/cc/AssociationCC.d.ts +1 -1
  70. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  71. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  72. package/build/esm/cc/AssociationGroupInfoCC.js +18 -21
  73. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  74. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  75. package/build/esm/cc/BarrierOperatorCC.js +5 -7
  76. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  77. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  78. package/build/esm/cc/BinarySensorCC.js +4 -6
  79. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  80. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  81. package/build/esm/cc/CentralSceneCC.js +8 -8
  82. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  83. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  84. package/build/esm/cc/ColorSwitchCC.js +5 -7
  85. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  86. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
  87. package/build/esm/cc/ConfigurationCC.js +29 -29
  88. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  89. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  90. package/build/esm/cc/DoorLockCC.js +70 -73
  91. package/build/esm/cc/DoorLockCC.js.map +1 -1
  92. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  93. package/build/esm/cc/HumidityControlModeCC.js +5 -8
  94. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  95. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  96. package/build/esm/cc/HumidityControlSetpointCC.js +15 -22
  97. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  98. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  99. package/build/esm/cc/IrrigationCC.js +26 -24
  100. package/build/esm/cc/IrrigationCC.js.map +1 -1
  101. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  102. package/build/esm/cc/MeterCC.js +12 -18
  103. package/build/esm/cc/MeterCC.js.map +1 -1
  104. package/build/esm/cc/MultiChannelCC.d.ts +1 -1
  105. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  106. package/build/esm/cc/MultiChannelCC.js +18 -23
  107. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  108. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  109. package/build/esm/cc/MultilevelSensorCC.js +11 -19
  110. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  111. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  112. package/build/esm/cc/NotificationCC.js +6 -13
  113. package/build/esm/cc/NotificationCC.js.map +1 -1
  114. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  115. package/build/esm/cc/ProtectionCC.js +12 -21
  116. package/build/esm/cc/ProtectionCC.js.map +1 -1
  117. package/build/esm/cc/Security2CC.d.ts.map +1 -1
  118. package/build/esm/cc/Security2CC.js +13 -31
  119. package/build/esm/cc/Security2CC.js.map +1 -1
  120. package/build/esm/cc/SecurityCC.d.ts.map +1 -1
  121. package/build/esm/cc/SecurityCC.js +9 -21
  122. package/build/esm/cc/SecurityCC.js.map +1 -1
  123. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  124. package/build/esm/cc/ThermostatFanModeCC.js +5 -7
  125. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  126. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  127. package/build/esm/cc/ThermostatModeCC.js +5 -7
  128. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  129. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  130. package/build/esm/cc/ThermostatOperatingStateCC.js +2 -4
  131. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  132. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  133. package/build/esm/cc/ThermostatSetpointCC.js +5 -9
  134. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  135. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  136. package/build/esm/cc/UserCodeCC.js +3 -7
  137. package/build/esm/cc/UserCodeCC.js.map +1 -1
  138. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  139. package/build/esm/cc/WindowCoveringCC.js +6 -9
  140. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  141. package/build/esm/cc/_CCValues.generated.d.ts +4 -4
  142. package/build/esm/cc/_CCValues.generated.js +2 -2
  143. package/build/esm/cc/_CCValues.generated.js.map +1 -1
  144. package/build/esm/cc/index.d.ts +3 -3
  145. package/build/esm/cc/index.d.ts.map +1 -1
  146. package/build/esm/cc/index.js.map +1 -1
  147. package/build/esm/lib/CommandClass.d.ts +3 -1
  148. package/build/esm/lib/CommandClass.d.ts.map +1 -1
  149. package/build/esm/lib/CommandClass.js +30 -4
  150. package/build/esm/lib/CommandClass.js.map +1 -1
  151. package/build/esm/lib/Security2/Extension.d.ts +6 -4
  152. package/build/esm/lib/Security2/Extension.d.ts.map +1 -1
  153. package/build/esm/lib/Security2/Extension.js +23 -21
  154. package/build/esm/lib/Security2/Extension.js.map +1 -1
  155. package/build/esm/lib/_Types.js +1 -1
  156. package/build/esm/lib/utils.d.ts.map +1 -1
  157. package/build/esm/lib/utils.js +15 -9
  158. package/build/esm/lib/utils.js.map +1 -1
  159. package/package.json +4 -4
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/cc/HumidityControlModeCC.ts"],
4
- "sourcesContent": ["import * as __validateArgs from \"./HumidityControlModeCC._validateArgs.js\";\nconst { validateArgs_HumidityControlModeCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, enumValuesToMetadataStates, parseBitMask, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { HumidityControlMode, HumidityControlModeCommand, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { HumidityControlModeCCValues } from \"./_CCValues.generated.js\";\nexport { HumidityControlModeCCValues };\n@API(CommandClasses[\"Humidity Control Mode\"])\nexport class HumidityControlModeCCAPI extends CCAPI {\n public supportsCommand(cmd: HumidityControlModeCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case HumidityControlModeCommand.Get:\n case HumidityControlModeCommand.SupportedGet:\n return this.isSinglecast();\n case HumidityControlModeCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: HumidityControlModeCCAPI, { property }, value) {\n if (property === \"mode\") {\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n }\n else {\n throwUnsupportedProperty(this.ccId, property);\n }\n const result = await this.set(value);\n // Verify the change after a delay, unless the command was supervised and successful\n if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n this.schedulePoll({ property }, value);\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: HumidityControlModeCCAPI, { property }) {\n switch (property) {\n case \"mode\":\n return this.get();\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n public async get(): Promise<MaybeNotKnown<HumidityControlMode>> {\n this.assertSupportsCommand(HumidityControlModeCommand, HumidityControlModeCommand.Get);\n const cc = new HumidityControlModeCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<HumidityControlModeCCReport>(cc, this.commandOptions);\n if (response) {\n return response?.mode;\n }\n }\n @validateArgs_HumidityControlModeCCAPI_set()\n public async set(mode: HumidityControlMode): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(HumidityControlModeCommand, HumidityControlModeCommand.Set);\n const cc = new HumidityControlModeCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n mode,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n public async getSupportedModes(): Promise<MaybeNotKnown<readonly HumidityControlMode[]>> {\n this.assertSupportsCommand(HumidityControlModeCommand, HumidityControlModeCommand.SupportedGet);\n const cc = new HumidityControlModeCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<HumidityControlModeCCSupportedReport>(cc, this.commandOptions);\n return response?.supportedModes;\n }\n}\n@commandClass(CommandClasses[\"Humidity Control Mode\"])\n@implementedVersion(1)\n@ccValues(HumidityControlModeCCValues)\nexport class HumidityControlModeCC extends CommandClass {\n declare ccCommand: HumidityControlModeCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Mode\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n tag: \"interview\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // First query the possible modes to set the metadata\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying supported humidity control modes...\",\n direction: \"outbound\",\n });\n const supportedModes = await api.getSupportedModes();\n if (supportedModes) {\n const logMessage = `received supported humidity control modes:${supportedModes\n .map((mode) => `\\n\u00B7 ${getEnumMemberName(HumidityControlMode, mode)}`)\n .join(\"\")}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported humidity control modes timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n await this.refreshValues(ctx, { tag: \"interview\" });\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Mode\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n tag: options?.tag,\n });\n // Query the current status\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying current humidity control mode...\",\n direction: \"outbound\",\n });\n const currentMode = await api.get();\n if (currentMode) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"received current humidity control mode: \"\n + getEnumMemberName(HumidityControlMode, currentMode),\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface HumidityControlModeCCSetOptions {\n mode: HumidityControlMode;\n}\n@CCCommand(HumidityControlModeCommand.Set)\n@useSupervision()\nexport class HumidityControlModeCCSet extends HumidityControlModeCC {\n public constructor(options: WithAddress<HumidityControlModeCCSetOptions>) {\n super(options);\n this.mode = options.mode;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlModeCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlModeCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public mode: HumidityControlMode;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.mode & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n mode: getEnumMemberName(HumidityControlMode, this.mode),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlModeCCReportOptions {\n mode: HumidityControlMode;\n}\n@CCCommand(HumidityControlModeCommand.Report)\n@ccValueProperty(\"mode\", HumidityControlModeCCValues.mode)\nexport class HumidityControlModeCCReport extends HumidityControlModeCC {\n public constructor(options: WithAddress<HumidityControlModeCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.mode = options.mode;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlModeCCReport {\n validatePayload(raw.payload.length >= 1);\n const mode: HumidityControlMode = raw.payload[0] & 0b1111;\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n });\n }\n public readonly mode: HumidityControlMode;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n mode: getEnumMemberName(HumidityControlMode, this.mode),\n },\n };\n }\n}\n@CCCommand(HumidityControlModeCommand.Get)\n@expectedCCResponse(HumidityControlModeCCReport)\nexport class HumidityControlModeCCGet extends HumidityControlModeCC {\n}\n// @publicAPI\nexport interface HumidityControlModeCCSupportedReportOptions {\n supportedModes: HumidityControlMode[];\n}\n@CCCommand(HumidityControlModeCommand.SupportedReport)\n@ccValueProperty(\"supportedModes\", HumidityControlModeCCValues.supportedModes)\nexport class HumidityControlModeCCSupportedReport extends HumidityControlModeCC {\n public constructor(options: WithAddress<HumidityControlModeCCSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedModes = options.supportedModes;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlModeCCSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const supportedModes: HumidityControlMode[] = parseBitMask(raw.payload, HumidityControlMode.Off);\n if (!supportedModes.includes(HumidityControlMode.Off)) {\n supportedModes.unshift(HumidityControlMode.Off);\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedModes,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Use this information to create the metadata for the mode property\n const modeValue = HumidityControlModeCCValues.mode;\n this.setMetadata(ctx, modeValue, {\n ...modeValue.meta,\n states: enumValuesToMetadataStates(HumidityControlMode, this.supportedModes),\n });\n return true;\n }\n public supportedModes: HumidityControlMode[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported modes\": this.supportedModes\n .map((mode) => `\\n\u00B7 ${getEnumMemberName(HumidityControlMode, mode)}`)\n .join(\"\"),\n },\n };\n }\n}\n@CCCommand(HumidityControlModeCommand.SupportedGet)\n@expectedCCResponse(HumidityControlModeCCSupportedReport)\nexport class HumidityControlModeCCSupportedGet extends HumidityControlModeCC {\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAA6R;AAC7R,oBAAyC;AACzC,iBAAwJ;AACxJ,0BAAkJ;AAClJ,oCAAiI;AAEjI,mBAAiE;AAEjE,gCAA4C;AAT5C,MAAM,EAAE,0CAAyC,IAAK;IAYzC,4BAAwB,MAAA;8BADpC,mCAAI,2BAAe,uBAAuB,CAAC,CAAC;;;;oBACC;;;gDAAA,YAAK;WAAA;;;;;;;;yBAkD9C,0CAAyC,CAAE;AAC5C,qCAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAA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;;;;oBACF;yDAAA,YAAqB;WAAA;;;;;;;;AAA5E,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;",
4
+ "sourcesContent": ["import * as __validateArgs from \"./HumidityControlModeCC._validateArgs.js\";\nconst { validateArgs_HumidityControlModeCCAPI_set } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type SupervisionResult, ValueMetadata, type WithAddress, ZWaveError, ZWaveErrorCodes, enumValuesToMetadataStates, logList, logText, parseBitMask, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { HumidityControlMode, HumidityControlModeCommand, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { HumidityControlModeCCValues } from \"./_CCValues.generated.js\";\nexport { HumidityControlModeCCValues };\n@API(CommandClasses[\"Humidity Control Mode\"])\nexport class HumidityControlModeCCAPI extends CCAPI {\n public supportsCommand(cmd: HumidityControlModeCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case HumidityControlModeCommand.Get:\n case HumidityControlModeCommand.SupportedGet:\n return this.isSinglecast();\n case HumidityControlModeCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: HumidityControlModeCCAPI, { property }, value) {\n if (property === \"mode\") {\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n }\n else {\n throwUnsupportedProperty(this.ccId, property);\n }\n const result = await this.set(value);\n // Verify the change after a delay, unless the command was supervised and successful\n if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n this.schedulePoll({ property }, value);\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: HumidityControlModeCCAPI, { property }) {\n switch (property) {\n case \"mode\":\n return this.get();\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n public async get(): Promise<MaybeNotKnown<HumidityControlMode>> {\n this.assertSupportsCommand(HumidityControlModeCommand, HumidityControlModeCommand.Get);\n const cc = new HumidityControlModeCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<HumidityControlModeCCReport>(cc, this.commandOptions);\n if (response) {\n return response?.mode;\n }\n }\n @validateArgs_HumidityControlModeCCAPI_set()\n public async set(mode: HumidityControlMode): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(HumidityControlModeCommand, HumidityControlModeCommand.Set);\n const cc = new HumidityControlModeCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n mode,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n public async getSupportedModes(): Promise<MaybeNotKnown<readonly HumidityControlMode[]>> {\n this.assertSupportsCommand(HumidityControlModeCommand, HumidityControlModeCommand.SupportedGet);\n const cc = new HumidityControlModeCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<HumidityControlModeCCSupportedReport>(cc, this.commandOptions);\n return response?.supportedModes;\n }\n}\n@commandClass(CommandClasses[\"Humidity Control Mode\"])\n@implementedVersion(1)\n@ccValues(HumidityControlModeCCValues)\nexport class HumidityControlModeCC extends CommandClass {\n declare ccCommand: HumidityControlModeCommand;\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Mode\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n tag: \"interview\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // First query the possible modes to set the metadata\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying supported humidity control modes...\",\n direction: \"outbound\",\n });\n const supportedModes = await api.getSupportedModes();\n if (supportedModes) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logText(\"received supported humidity control modes:\", {\n nested: logList(supportedModes.map((mode) => getEnumMemberName(HumidityControlMode, mode))),\n }),\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported humidity control modes timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n await this.refreshValues(ctx, { tag: \"interview\" });\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Mode\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n tag: options?.tag,\n });\n // Query the current status\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"querying current humidity control mode...\",\n direction: \"outbound\",\n });\n const currentMode = await api.get();\n if (currentMode) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"received current humidity control mode: \"\n + getEnumMemberName(HumidityControlMode, currentMode),\n direction: \"inbound\",\n });\n }\n }\n}\n// @publicAPI\nexport interface HumidityControlModeCCSetOptions {\n mode: HumidityControlMode;\n}\n@CCCommand(HumidityControlModeCommand.Set)\n@useSupervision()\nexport class HumidityControlModeCCSet extends HumidityControlModeCC {\n public constructor(options: WithAddress<HumidityControlModeCCSetOptions>) {\n super(options);\n this.mode = options.mode;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlModeCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlModeCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public mode: HumidityControlMode;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.mode & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n mode: getEnumMemberName(HumidityControlMode, this.mode),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlModeCCReportOptions {\n mode: HumidityControlMode;\n}\n@CCCommand(HumidityControlModeCommand.Report)\n@ccValueProperty(\"mode\", HumidityControlModeCCValues.mode)\nexport class HumidityControlModeCCReport extends HumidityControlModeCC {\n public constructor(options: WithAddress<HumidityControlModeCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.mode = options.mode;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlModeCCReport {\n validatePayload(raw.payload.length >= 1);\n const mode: HumidityControlMode = raw.payload[0] & 0b1111;\n return new this({\n nodeId: ctx.sourceNodeId,\n mode,\n });\n }\n public readonly mode: HumidityControlMode;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n mode: getEnumMemberName(HumidityControlMode, this.mode),\n },\n };\n }\n}\n@CCCommand(HumidityControlModeCommand.Get)\n@expectedCCResponse(HumidityControlModeCCReport)\nexport class HumidityControlModeCCGet extends HumidityControlModeCC {\n}\n// @publicAPI\nexport interface HumidityControlModeCCSupportedReportOptions {\n supportedModes: HumidityControlMode[];\n}\n@CCCommand(HumidityControlModeCommand.SupportedReport)\n@ccValueProperty(\"supportedModes\", HumidityControlModeCCValues.supportedModes)\nexport class HumidityControlModeCCSupportedReport extends HumidityControlModeCC {\n public constructor(options: WithAddress<HumidityControlModeCCSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedModes = options.supportedModes;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlModeCCSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const supportedModes: HumidityControlMode[] = parseBitMask(raw.payload, HumidityControlMode.Off);\n if (!supportedModes.includes(HumidityControlMode.Off)) {\n supportedModes.unshift(HumidityControlMode.Off);\n }\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedModes,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Use this information to create the metadata for the mode property\n const modeValue = HumidityControlModeCCValues.mode;\n this.setMetadata(ctx, modeValue, {\n ...modeValue.meta,\n states: enumValuesToMetadataStates(HumidityControlMode, this.supportedModes),\n });\n return true;\n }\n public supportedModes: HumidityControlMode[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported modes\": logList(this.supportedModes.map((mode) => getEnumMemberName(HumidityControlMode, mode))),\n },\n };\n }\n}\n@CCCommand(HumidityControlModeCommand.SupportedGet)\n@expectedCCResponse(HumidityControlModeCCSupportedReport)\nexport class HumidityControlModeCCSupportedGet extends HumidityControlModeCC {\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAA+S;AAC/S,oBAAyC;AACzC,iBAAwJ;AACxJ,0BAAkJ;AAClJ,oCAAiI;AAEjI,mBAAiE;AAEjE,gCAA4C;AAT5C,MAAM,EAAE,0CAAyC,IAAK;IAYzC,4BAA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,eAAe,IAAI,CAAC,aAAS,iCAAkB,kCAAqB,IAAI,CAAC,CAAC;;;IAGtH;;;;IAIS,qCAAiC,MAAA;8BAF7C,yCAAU,wCAA2B,YAAY,OACjD,kDAAmB,oCAAoC,CAAC;;;;oBACF;yDAAA,YAAqB;WAAA;;;;;;;;AAA5E,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;;;;",
6
6
  "names": []
7
7
  }
@@ -257,10 +257,11 @@ let HumidityControlSetpointCC = (() => {
257
257
  const resp = await api.getSupportedSetpointTypes();
258
258
  if (resp) {
259
259
  setpointTypes = [...resp];
260
- const logMessage = "received supported setpoint types:\n" + setpointTypes.map((type) => (0, import_shared.getEnumMemberName)(import_Types.HumidityControlSetpointType, type)).map((name) => `\xB7 ${name}`).join("\n");
261
260
  ctx.logNode(node.id, {
262
261
  endpoint: this.endpointIndex,
263
- message: logMessage,
262
+ message: (0, import_core.logText)("received supported setpoint types:", {
263
+ nested: (0, import_core.logList)(setpointTypes.map((type) => (0, import_shared.getEnumMemberName)(import_Types.HumidityControlSetpointType, type)))
264
+ }),
264
265
  direction: "inbound"
265
266
  });
266
267
  } else {
@@ -280,12 +281,11 @@ let HumidityControlSetpointCC = (() => {
280
281
  });
281
282
  const setpointScaleSupported = await api.getSupportedScales(type);
282
283
  if (setpointScaleSupported) {
283
- const logMessage = `received supported scales for setpoint ${setpointName}:
284
- ${setpointScaleSupported.map((t) => `
285
- \xB7 ${t.key} ${t.unit} - ${t.label}`).join("")}`;
286
284
  ctx.logNode(node.id, {
287
285
  endpoint: this.endpointIndex,
288
- message: logMessage,
286
+ message: (0, import_core.logText)(`received supported scales for setpoint ${setpointName}:`, {
287
+ nested: (0, import_core.logList)(setpointScaleSupported.map((t) => `${t.key} ${t.unit} - ${t.label}`))
288
+ }),
289
289
  direction: "inbound"
290
290
  });
291
291
  const scaleValue = import_CCValues_generated.HumidityControlSetpointCCValues.setpointScale(type);
@@ -303,12 +303,14 @@ ${setpointScaleSupported.map((t) => `
303
303
  if (setpointCaps) {
304
304
  const minValueUnit = getSetpointUnit(setpointCaps.minValueScale);
305
305
  const maxValueUnit = getSetpointUnit(setpointCaps.maxValueScale);
306
- const logMessage = `received capabilities for setpoint ${setpointName}:
307
- minimum value: ${setpointCaps.minValue} ${minValueUnit}
308
- maximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;
309
306
  ctx.logNode(node.id, {
310
307
  endpoint: this.endpointIndex,
311
- message: logMessage,
308
+ message: (0, import_core.logText)(`received capabilities for setpoint ${setpointName}:`, {
309
+ nested: (0, import_core.logDict)({
310
+ "minimum value": `${setpointCaps.minValue} ${minValueUnit}`,
311
+ "maximum value": `${setpointCaps.maxValue} ${maxValueUnit}`
312
+ })
313
+ }),
312
314
  direction: "inbound"
313
315
  });
314
316
  }
@@ -558,8 +560,7 @@ let HumidityControlSetpointCCSupportedReport = (() => {
558
560
  return {
559
561
  ...super.toLogEntry(ctx),
560
562
  message: {
561
- "supported setpoint types": this.supportedSetpointTypes.map((t) => `
562
- \xB7 ${(0, import_shared.getEnumMemberName)(import_Types.HumidityControlSetpointType, t)}`).join("")
563
+ "supported setpoint types": (0, import_core.logList)(this.supportedSetpointTypes.map((t) => (0, import_shared.getEnumMemberName)(import_Types.HumidityControlSetpointType, t)))
563
564
  }
564
565
  };
565
566
  }
@@ -627,8 +628,7 @@ let HumidityControlSetpointCCScaleSupportedReport = (() => {
627
628
  return {
628
629
  ...super.toLogEntry(ctx),
629
630
  message: {
630
- "scale supported": supportedScales.map((t) => `
631
- \xB7 ${t.key} ${t.unit} - ${t.label}`).join("")
631
+ "scale supported": (0, import_core.logList)(supportedScales.map((t) => `${t.key} ${t.unit} - ${t.label}`))
632
632
  }
633
633
  };
634
634
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src_gen/cc/HumidityControlSetpointCC.ts"],
4
- "sourcesContent": ["import * as __validateArgs from \"./HumidityControlSetpointCC._validateArgs.js\";\nconst { validateArgs_HumidityControlSetpointCCAPI_get, validateArgs_HumidityControlSetpointCCAPI_set, validateArgs_HumidityControlSetpointCCAPI_getCapabilities, validateArgs_HumidityControlSetpointCCAPI_getSupportedScales } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type Scale, type SupervisionResult, ValueMetadata, type ValueMetadataNumeric, type WithAddress, ZWaveError, ZWaveErrorCodes, encodeFloatWithScale, getNamedScale, getUnknownScale, parseBitMask, parseFloatWithScale, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { type HumidityControlSetpointCapabilities, HumidityControlSetpointCommand, HumidityControlSetpointType, type HumidityControlSetpointValue, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { HumidityControlSetpointCCValues } from \"./_CCValues.generated.js\";\nexport { HumidityControlSetpointCCValues };\nfunction getScale(scale: number): Scale {\n return getNamedScale(\"humidity\", scale as any) ?? getUnknownScale(scale);\n}\nfunction getSetpointUnit(scale: number): string {\n return getScale(scale).unit ?? \"\";\n}\n@API(CommandClasses[\"Humidity Control Setpoint\"])\nexport class HumidityControlSetpointCCAPI extends CCAPI {\n public supportsCommand(cmd: HumidityControlSetpointCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case HumidityControlSetpointCommand.Get:\n case HumidityControlSetpointCommand.SupportedGet:\n case HumidityControlSetpointCommand.CapabilitiesGet:\n return this.isSinglecast();\n case HumidityControlSetpointCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: HumidityControlSetpointCCAPI, { property, propertyKey }, value) {\n if (property !== \"setpoint\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof propertyKey !== \"number\") {\n throw new ZWaveError(`${CommandClasses[this.ccId]}: \"${property}\" must be further specified by a numeric property key`, ZWaveErrorCodes.Argument_Invalid);\n }\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n const scaleValueId = HumidityControlSetpointCCValues.setpointScale(propertyKey).endpoint(this.endpoint.index);\n const preferredScale = this.tryGetValueDB()?.getValue<number>(scaleValueId);\n const result = await this.set(propertyKey, value, preferredScale ?? 0);\n // Verify the change after a delay, unless the command was supervised and successful\n if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n this.schedulePoll({ property, propertyKey }, value);\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: HumidityControlSetpointCCAPI, { property, propertyKey }) {\n switch (property) {\n case \"setpoint\":\n if (typeof propertyKey !== \"number\") {\n throw new ZWaveError(`${CommandClasses[this.ccId]}: \"${property}\" must be further specified by a numeric property key`, ZWaveErrorCodes.Argument_Invalid);\n }\n return (await this.get(propertyKey))?.value;\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n @validateArgs_HumidityControlSetpointCCAPI_get()\n public async get(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<HumidityControlSetpointValue>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.Get);\n const cc = new HumidityControlSetpointCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCReport>(cc, this.commandOptions);\n if (!response)\n return;\n return response.type === HumidityControlSetpointType[\"N/A\"]\n // not supported\n ? undefined\n // supported\n : {\n value: response.value,\n scale: response.scale,\n };\n }\n @validateArgs_HumidityControlSetpointCCAPI_set()\n public async set(setpointType: HumidityControlSetpointType, value: number, scale: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.Set);\n const cc = new HumidityControlSetpointCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n value,\n scale,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_HumidityControlSetpointCCAPI_getCapabilities()\n public async getCapabilities(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<HumidityControlSetpointCapabilities>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.CapabilitiesGet);\n const cc = new HumidityControlSetpointCCCapabilitiesGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCCapabilitiesReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"minValue\",\n \"maxValue\",\n \"minValueScale\",\n \"maxValueScale\",\n ]);\n }\n }\n public async getSupportedSetpointTypes(): Promise<MaybeNotKnown<readonly HumidityControlSetpointType[]>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.SupportedGet);\n const cc = new HumidityControlSetpointCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCSupportedReport>(cc, this.commandOptions);\n return response?.supportedSetpointTypes;\n }\n @validateArgs_HumidityControlSetpointCCAPI_getSupportedScales()\n public async getSupportedScales(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<readonly Scale[]>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.SupportedGet);\n const cc = new HumidityControlSetpointCCScaleSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCScaleSupportedReport>(cc, this.commandOptions);\n if (response) {\n return response.supportedScales.map((scale) => getScale(scale));\n }\n }\n}\n@commandClass(CommandClasses[\"Humidity Control Setpoint\"])\n@implementedVersion(2)\n@ccValues(HumidityControlSetpointCCValues)\nexport class HumidityControlSetpointCC extends CommandClass {\n declare ccCommand: HumidityControlSetpointCommand;\n public translatePropertyKey(ctx: GetValueDB, property: string | number, propertyKey: string | number): string | undefined {\n if (property === \"setpoint\") {\n return getEnumMemberName(HumidityControlSetpointType, propertyKey as any);\n }\n else {\n return super.translatePropertyKey(ctx, property, propertyKey);\n }\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Setpoint\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n tag: \"interview\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Query the supported setpoint types\n let setpointTypes: HumidityControlSetpointType[] = [];\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"retrieving supported setpoint types...\",\n direction: \"outbound\",\n });\n const resp = await api.getSupportedSetpointTypes();\n if (resp) {\n setpointTypes = [...resp];\n const logMessage = \"received supported setpoint types:\\n\"\n + setpointTypes\n .map((type) => getEnumMemberName(HumidityControlSetpointType, type))\n .map((name) => `\u00B7 ${name}`)\n .join(\"\\n\");\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported setpoint types timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n for (const type of setpointTypes) {\n const setpointName = getEnumMemberName(HumidityControlSetpointType, type);\n // Find out the capabilities of this setpoint\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `retrieving capabilities for setpoint ${setpointName}...`,\n direction: \"outbound\",\n });\n const setpointScaleSupported = await api.getSupportedScales(type);\n if (setpointScaleSupported) {\n const logMessage = `received supported scales for setpoint ${setpointName}: \n${setpointScaleSupported\n .map((t) => `\\n\u00B7 ${t.key} ${t.unit} - ${t.label}`)\n .join(\"\")}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n const scaleValue = HumidityControlSetpointCCValues\n .setpointScale(type);\n const states: Record<number, string> = {};\n for (const scale of setpointScaleSupported) {\n if (scale.unit)\n states[scale.key] = scale.unit;\n }\n this.setMetadata(ctx, scaleValue, {\n ...scaleValue.meta,\n states,\n });\n }\n const setpointCaps = await api.getCapabilities(type);\n if (setpointCaps) {\n const minValueUnit = getSetpointUnit(setpointCaps.minValueScale);\n const maxValueUnit = getSetpointUnit(setpointCaps.maxValueScale);\n const logMessage = `received capabilities for setpoint ${setpointName}:\nminimum value: ${setpointCaps.minValue} ${minValueUnit}\nmaximum value: ${setpointCaps.maxValue} ${maxValueUnit}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n // Query the current value for all setpoint types\n await this.refreshValues(ctx, { tag: \"interview\" });\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Setpoint\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n tag: options?.tag,\n });\n const setpointTypes: HumidityControlSetpointType[] = this.getValue(ctx, HumidityControlSetpointCCValues.supportedSetpointTypes) ?? [];\n // Query each setpoint's current value\n for (const type of setpointTypes) {\n const setpointName = getEnumMemberName(HumidityControlSetpointType, type);\n // Every time, query the current value\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `querying current value of setpoint ${setpointName}...`,\n direction: \"outbound\",\n });\n const setpoint = await api.get(type);\n if (setpoint) {\n const logMessage = `received current value of setpoint ${setpointName}: ${setpoint.value} ${getScale(setpoint.scale).unit ?? \"\"}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCSetOptions {\n setpointType: HumidityControlSetpointType;\n value: number;\n scale: number;\n}\n@CCCommand(HumidityControlSetpointCommand.Set)\n@useSupervision()\nexport class HumidityControlSetpointCCSet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCSetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n this.value = options.value;\n this.scale = options.scale;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public value: number;\n public scale: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [this.setpointType & 0b1111],\n encodeFloatWithScale(this.value, this.scale),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const scale = getScale(this.scale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n value: `${this.value} ${scale.unit}`,\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCReportOptions {\n type: HumidityControlSetpointType;\n scale: number;\n value: number;\n}\n@CCCommand(HumidityControlSetpointCommand.Report)\nexport class HumidityControlSetpointCCReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.type = options.type;\n this.value = options.value;\n this.scale = options.scale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCReport {\n validatePayload(raw.payload.length >= 1);\n const type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n // Setpoint type 0 is not defined in the spec, prevent devices from using it.\n if (type === 0) {\n // Not supported\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n value: 0,\n scale: 0,\n });\n }\n // parseFloatWithScale does its own validation\n const { value, scale } = parseFloatWithScale(raw.payload.subarray(1));\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n value,\n scale,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n const scale = getScale(this.scale);\n const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);\n const existingMetadata = this.getMetadata<ValueMetadataNumeric>(ctx, setpointValue);\n // Update the metadata when it is missing or the unit has changed\n if (existingMetadata?.unit !== scale.unit) {\n this.setMetadata(ctx, setpointValue, {\n ...(existingMetadata ?? setpointValue.meta),\n unit: scale.unit,\n });\n }\n this.setValue(ctx, setpointValue, this.value);\n // Remember the device-preferred setpoint scale so it can be used in SET commands\n this.setValue(ctx, HumidityControlSetpointCCValues.setpointScale(this.type), this.scale);\n return true;\n }\n public type: HumidityControlSetpointType;\n public scale: number;\n public value: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const scale = getScale(this.scale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.type),\n value: `${this.value} ${scale.unit}`,\n },\n };\n }\n}\nfunction testResponseForHumidityControlSetpointGet(sent: HumidityControlSetpointCCGet, received: HumidityControlSetpointCCReport) {\n // We expect a Humidity Control Setpoint Report that matches the requested setpoint type\n return received.type === sent.setpointType;\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.Get)\n@expectedCCResponse(HumidityControlSetpointCCReport, testResponseForHumidityControlSetpointGet)\nexport class HumidityControlSetpointCCGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCSupportedReportOptions {\n supportedSetpointTypes: HumidityControlSetpointType[];\n}\n@CCCommand(HumidityControlSetpointCommand.SupportedReport)\n@ccValueProperty(\"supportedSetpointTypes\", HumidityControlSetpointCCValues.supportedSetpointTypes)\nexport class HumidityControlSetpointCCSupportedReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedSetpointTypes = options.supportedSetpointTypes;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const supportedSetpointTypes: HumidityControlSetpointType[] = parseBitMask(raw.payload, HumidityControlSetpointType[\"N/A\"]);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedSetpointTypes,\n });\n }\n public readonly supportedSetpointTypes: readonly HumidityControlSetpointType[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported setpoint types\": this.supportedSetpointTypes\n .map((t) => `\\n\u00B7 ${getEnumMemberName(HumidityControlSetpointType, t)}`)\n .join(\"\"),\n },\n };\n }\n}\n@CCCommand(HumidityControlSetpointCommand.SupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCSupportedReport)\nexport class HumidityControlSetpointCCSupportedGet extends HumidityControlSetpointCC {\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedReportOptions {\n supportedScales: number[];\n}\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCScaleSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedScales = options.supportedScales;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCScaleSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const supportedScales = parseBitMask(Bytes.from([raw.payload[0] & 0b1111]), 0);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedScales,\n });\n }\n public readonly supportedScales: readonly number[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const supportedScales = this.supportedScales.map((scale) => getScale(scale));\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"scale supported\": supportedScales\n .map((t) => `\\n\u00B7 ${t.key} ${t.unit} - ${t.label}`)\n .join(\"\"),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCScaleSupportedGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCScaleSupportedGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCScaleSupportedGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesReportOptions {\n type: HumidityControlSetpointType;\n minValue: number;\n maxValue: number;\n minValueScale: number;\n maxValueScale: number;\n}\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCCapabilitiesReportOptions>) {\n super(options);\n this.type = options.type;\n this.minValue = options.minValue;\n this.maxValue = options.maxValue;\n this.minValueScale = options.minValueScale;\n this.maxValueScale = options.maxValueScale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCCapabilitiesReport {\n validatePayload(raw.payload.length >= 1);\n const type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n // parseFloatWithScale does its own validation\n const { value: minValue, scale: minValueScale, bytesRead, } = parseFloatWithScale(raw.payload.subarray(1));\n const { value: maxValue, scale: maxValueScale } = parseFloatWithScale(raw.payload.subarray(1 + bytesRead));\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n minValue,\n minValueScale,\n maxValue,\n maxValueScale,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Predefine the metadata\n const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);\n this.setMetadata(ctx, setpointValue, {\n ...setpointValue.meta,\n min: this.minValue,\n max: this.maxValue,\n unit: getSetpointUnit(this.minValueScale)\n || getSetpointUnit(this.maxValueScale),\n });\n return true;\n }\n public type: HumidityControlSetpointType;\n public minValue: number;\n public maxValue: number;\n public minValueScale: number;\n public maxValueScale: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const minValueScale = getScale(this.minValueScale);\n const maxValueScale = getScale(this.maxValueScale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.type),\n \"min value\": `${this.minValue} ${minValueScale.unit}`,\n \"max value\": `${this.maxValue} ${maxValueScale.unit}`,\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesGet)\n@expectedCCResponse(HumidityControlSetpointCCCapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCCapabilitiesGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCCapabilitiesGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCCapabilitiesGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAAmX;AACnX,oBAA+C;AAC/C,iBAAwJ;AACxJ,0BAAkJ;AAClJ,oCAAiI;AAEjI,mBAA0J;AAE1J,gCAAgD;AAThD,MAAM,EAAE,+CAA+C,+CAA+C,2DAA2D,6DAA4D,IAAK;AAWlO,SAAS,SAAS,OAAa;AAC3B,aAAO,2BAAc,YAAY,KAAY,SAAK,6BAAgB,KAAK;AAC3E;AAFS;AAGT,SAAS,gBAAgB,OAAa;AAClC,SAAO,SAAS,KAAK,EAAE,QAAQ;AACnC;AAFS;IAII,gCAA4B,MAAA;8BADxC,mCAAI,2BAAe,2BAA2B,CAAC,CAAC;;;;oBACC;;;;;;oDAAA,YAAK;WAAA;;;;;;;;yBA8ClD,8CAA6C,CAAE;yBAoB/C,8CAA6C,CAAE;qCAY/C,0DAAyD,CAAE;wCA2B3D,6DAA4D,CAAE;AA1D/D,qCAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,SAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,KAAb,OAAgB,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAoBhB,qCAAA,MAAA,MAAA,iBAAA,EAAA,MAAA,UAAA,MAAA,OAAA,QAAA,OAAA,SAAA,OAAA,QAAA,EAAA,KAAA,gCAAA,SAAA,KAAA,QAAA,KAAA,gCAAA,IAAa,KAAb,OAAgB,GAAA,UAAA,UAAA,GAAA,MAAA,0BAAA;AAYhB,qCAAA,MAAA,MAAA,6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SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAAqE;AACpF,YAAM,OAAO;AACb,WAAK,eAAe,QAAQ;IAChC;IACO,OAAO,KAAK,MAAa,MAAsB;AAElD,YAAM,IAAI,uBAAW,GAAG,KAAK,IAAI,qCAAqC,4BAAgB,8BAA8B;IAIxH;IACO;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,eAAe,EAAM,CAAC;AACtD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,qBAAiB,iCAAkB,0CAA6B,KAAK,YAAY;;;IAG7F;;;;",
4
+ "sourcesContent": ["import * as __validateArgs from \"./HumidityControlSetpointCC._validateArgs.js\";\nconst { validateArgs_HumidityControlSetpointCCAPI_get, validateArgs_HumidityControlSetpointCCAPI_set, validateArgs_HumidityControlSetpointCCAPI_getCapabilities, validateArgs_HumidityControlSetpointCCAPI_getSupportedScales } = __validateArgs;\nimport { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, MessagePriority, type Scale, type SupervisionResult, ValueMetadata, type ValueMetadataNumeric, type WithAddress, ZWaveError, ZWaveErrorCodes, encodeFloatWithScale, getNamedScale, getUnknownScale, logDict, logList, logText, parseBitMask, parseFloatWithScale, supervisedCommandSucceeded, validatePayload, } from \"@zwave-js/core\";\nimport { Bytes, getEnumMemberName, pick } from \"@zwave-js/shared\";\nimport { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation, throwUnsupportedProperty, throwWrongValueType, } from \"../lib/API.js\";\nimport { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext, type RefreshValuesOptions, } from \"../lib/CommandClass.js\";\nimport { API, CCCommand, ccValueProperty, ccValues, commandClass, expectedCCResponse, implementedVersion, useSupervision, } from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { type HumidityControlSetpointCapabilities, HumidityControlSetpointCommand, HumidityControlSetpointType, type HumidityControlSetpointValue, } from \"../lib/_Types.js\";\nimport type { CCEncodingContext, CCParsingContext } from \"../lib/traits.js\";\nimport { HumidityControlSetpointCCValues } from \"./_CCValues.generated.js\";\nexport { HumidityControlSetpointCCValues };\nfunction getScale(scale: number): Scale {\n return getNamedScale(\"humidity\", scale as any) ?? getUnknownScale(scale);\n}\nfunction getSetpointUnit(scale: number): string {\n return getScale(scale).unit ?? \"\";\n}\n@API(CommandClasses[\"Humidity Control Setpoint\"])\nexport class HumidityControlSetpointCCAPI extends CCAPI {\n public supportsCommand(cmd: HumidityControlSetpointCommand): MaybeNotKnown<boolean> {\n switch (cmd) {\n case HumidityControlSetpointCommand.Get:\n case HumidityControlSetpointCommand.SupportedGet:\n case HumidityControlSetpointCommand.CapabilitiesGet:\n return this.isSinglecast();\n case HumidityControlSetpointCommand.Set:\n return true; // This is mandatory\n }\n return super.supportsCommand(cmd);\n }\n protected override get [SET_VALUE](): SetValueImplementation {\n return async function (this: HumidityControlSetpointCCAPI, { property, propertyKey }, value) {\n if (property !== \"setpoint\") {\n throwUnsupportedProperty(this.ccId, property);\n }\n if (typeof propertyKey !== \"number\") {\n throw new ZWaveError(`${CommandClasses[this.ccId]}: \"${property}\" must be further specified by a numeric property key`, ZWaveErrorCodes.Argument_Invalid);\n }\n if (typeof value !== \"number\") {\n throwWrongValueType(this.ccId, property, \"number\", typeof value);\n }\n const scaleValueId = HumidityControlSetpointCCValues.setpointScale(propertyKey).endpoint(this.endpoint.index);\n const preferredScale = this.tryGetValueDB()?.getValue<number>(scaleValueId);\n const result = await this.set(propertyKey, value, preferredScale ?? 0);\n // Verify the change after a delay, unless the command was supervised and successful\n if (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n this.schedulePoll({ property, propertyKey }, value);\n }\n return result;\n };\n }\n protected get [POLL_VALUE](): PollValueImplementation {\n return async function (this: HumidityControlSetpointCCAPI, { property, propertyKey }) {\n switch (property) {\n case \"setpoint\":\n if (typeof propertyKey !== \"number\") {\n throw new ZWaveError(`${CommandClasses[this.ccId]}: \"${property}\" must be further specified by a numeric property key`, ZWaveErrorCodes.Argument_Invalid);\n }\n return (await this.get(propertyKey))?.value;\n default:\n throwUnsupportedProperty(this.ccId, property);\n }\n };\n }\n @validateArgs_HumidityControlSetpointCCAPI_get()\n public async get(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<HumidityControlSetpointValue>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.Get);\n const cc = new HumidityControlSetpointCCGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCReport>(cc, this.commandOptions);\n if (!response)\n return;\n return response.type === HumidityControlSetpointType[\"N/A\"]\n // not supported\n ? undefined\n // supported\n : {\n value: response.value,\n scale: response.scale,\n };\n }\n @validateArgs_HumidityControlSetpointCCAPI_set()\n public async set(setpointType: HumidityControlSetpointType, value: number, scale: number): Promise<SupervisionResult | undefined> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.Set);\n const cc = new HumidityControlSetpointCCSet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n value,\n scale,\n });\n return this.host.sendCommand(cc, this.commandOptions);\n }\n @validateArgs_HumidityControlSetpointCCAPI_getCapabilities()\n public async getCapabilities(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<HumidityControlSetpointCapabilities>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.CapabilitiesGet);\n const cc = new HumidityControlSetpointCCCapabilitiesGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCCapabilitiesReport>(cc, this.commandOptions);\n if (response) {\n return pick(response, [\n \"minValue\",\n \"maxValue\",\n \"minValueScale\",\n \"maxValueScale\",\n ]);\n }\n }\n public async getSupportedSetpointTypes(): Promise<MaybeNotKnown<readonly HumidityControlSetpointType[]>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.SupportedGet);\n const cc = new HumidityControlSetpointCCSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCSupportedReport>(cc, this.commandOptions);\n return response?.supportedSetpointTypes;\n }\n @validateArgs_HumidityControlSetpointCCAPI_getSupportedScales()\n public async getSupportedScales(setpointType: HumidityControlSetpointType): Promise<MaybeNotKnown<readonly Scale[]>> {\n this.assertSupportsCommand(HumidityControlSetpointCommand, HumidityControlSetpointCommand.SupportedGet);\n const cc = new HumidityControlSetpointCCScaleSupportedGet({\n nodeId: this.endpoint.nodeId,\n endpointIndex: this.endpoint.index,\n setpointType,\n });\n const response = await this.host.sendCommand<HumidityControlSetpointCCScaleSupportedReport>(cc, this.commandOptions);\n if (response) {\n return response.supportedScales.map((scale) => getScale(scale));\n }\n }\n}\n@commandClass(CommandClasses[\"Humidity Control Setpoint\"])\n@implementedVersion(2)\n@ccValues(HumidityControlSetpointCCValues)\nexport class HumidityControlSetpointCC extends CommandClass {\n declare ccCommand: HumidityControlSetpointCommand;\n public translatePropertyKey(ctx: GetValueDB, property: string | number, propertyKey: string | number): string | undefined {\n if (property === \"setpoint\") {\n return getEnumMemberName(HumidityControlSetpointType, propertyKey as any);\n }\n else {\n return super.translatePropertyKey(ctx, property, propertyKey);\n }\n }\n public async interview(ctx: InterviewContext): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Setpoint\"], ctx, endpoint).withOptions({\n priority: MessagePriority.NodeQuery,\n tag: \"interview\",\n });\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `Interviewing ${this.ccName}...`,\n direction: \"none\",\n });\n // Query the supported setpoint types\n let setpointTypes: HumidityControlSetpointType[] = [];\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"retrieving supported setpoint types...\",\n direction: \"outbound\",\n });\n const resp = await api.getSupportedSetpointTypes();\n if (resp) {\n setpointTypes = [...resp];\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logText(\"received supported setpoint types:\", {\n nested: logList(setpointTypes.map((type) => getEnumMemberName(HumidityControlSetpointType, type))),\n }),\n direction: \"inbound\",\n });\n }\n else {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: \"Querying supported setpoint types timed out, skipping interview...\",\n level: \"warn\",\n });\n return;\n }\n for (const type of setpointTypes) {\n const setpointName = getEnumMemberName(HumidityControlSetpointType, type);\n // Find out the capabilities of this setpoint\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `retrieving capabilities for setpoint ${setpointName}...`,\n direction: \"outbound\",\n });\n const setpointScaleSupported = await api.getSupportedScales(type);\n if (setpointScaleSupported) {\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logText(`received supported scales for setpoint ${setpointName}:`, {\n nested: logList(setpointScaleSupported.map((t) => `${t.key} ${t.unit} - ${t.label}`)),\n }),\n direction: \"inbound\",\n });\n const scaleValue = HumidityControlSetpointCCValues\n .setpointScale(type);\n const states: Record<number, string> = {};\n for (const scale of setpointScaleSupported) {\n if (scale.unit)\n states[scale.key] = scale.unit;\n }\n this.setMetadata(ctx, scaleValue, {\n ...scaleValue.meta,\n states,\n });\n }\n const setpointCaps = await api.getCapabilities(type);\n if (setpointCaps) {\n const minValueUnit = getSetpointUnit(setpointCaps.minValueScale);\n const maxValueUnit = getSetpointUnit(setpointCaps.maxValueScale);\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logText(`received capabilities for setpoint ${setpointName}:`, {\n nested: logDict({\n \"minimum value\": `${setpointCaps.minValue} ${minValueUnit}`,\n \"maximum value\": `${setpointCaps.maxValue} ${maxValueUnit}`,\n }),\n }),\n direction: \"inbound\",\n });\n }\n }\n // Query the current value for all setpoint types\n await this.refreshValues(ctx, { tag: \"interview\" });\n // Remember that the interview is complete\n this.setInterviewComplete(ctx, true);\n }\n public async refreshValues(ctx: RefreshValuesContext, options?: RefreshValuesOptions): Promise<void> {\n const node = this.getNode(ctx)!;\n const endpoint = this.getEndpoint(ctx)!;\n const api = CCAPI.create(CommandClasses[\"Humidity Control Setpoint\"], ctx, endpoint).withOptions({\n priority: options?.priority ?? MessagePriority.NodeQuery,\n tag: options?.tag,\n });\n const setpointTypes: HumidityControlSetpointType[] = this.getValue(ctx, HumidityControlSetpointCCValues.supportedSetpointTypes) ?? [];\n // Query each setpoint's current value\n for (const type of setpointTypes) {\n const setpointName = getEnumMemberName(HumidityControlSetpointType, type);\n // Every time, query the current value\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: `querying current value of setpoint ${setpointName}...`,\n direction: \"outbound\",\n });\n const setpoint = await api.get(type);\n if (setpoint) {\n const logMessage = `received current value of setpoint ${setpointName}: ${setpoint.value} ${getScale(setpoint.scale).unit ?? \"\"}`;\n ctx.logNode(node.id, {\n endpoint: this.endpointIndex,\n message: logMessage,\n direction: \"inbound\",\n });\n }\n }\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCSetOptions {\n setpointType: HumidityControlSetpointType;\n value: number;\n scale: number;\n}\n@CCCommand(HumidityControlSetpointCommand.Set)\n@useSupervision()\nexport class HumidityControlSetpointCCSet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCSetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n this.value = options.value;\n this.scale = options.scale;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCSet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCSet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public value: number;\n public scale: number;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.concat([\n [this.setpointType & 0b1111],\n encodeFloatWithScale(this.value, this.scale),\n ]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const scale = getScale(this.scale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n value: `${this.value} ${scale.unit}`,\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCReportOptions {\n type: HumidityControlSetpointType;\n scale: number;\n value: number;\n}\n@CCCommand(HumidityControlSetpointCommand.Report)\nexport class HumidityControlSetpointCCReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.type = options.type;\n this.value = options.value;\n this.scale = options.scale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCReport {\n validatePayload(raw.payload.length >= 1);\n const type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n // Setpoint type 0 is not defined in the spec, prevent devices from using it.\n if (type === 0) {\n // Not supported\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n value: 0,\n scale: 0,\n });\n }\n // parseFloatWithScale does its own validation\n const { value, scale } = parseFloatWithScale(raw.payload.subarray(1));\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n value,\n scale,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n const scale = getScale(this.scale);\n const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);\n const existingMetadata = this.getMetadata<ValueMetadataNumeric>(ctx, setpointValue);\n // Update the metadata when it is missing or the unit has changed\n if (existingMetadata?.unit !== scale.unit) {\n this.setMetadata(ctx, setpointValue, {\n ...(existingMetadata ?? setpointValue.meta),\n unit: scale.unit,\n });\n }\n this.setValue(ctx, setpointValue, this.value);\n // Remember the device-preferred setpoint scale so it can be used in SET commands\n this.setValue(ctx, HumidityControlSetpointCCValues.setpointScale(this.type), this.scale);\n return true;\n }\n public type: HumidityControlSetpointType;\n public scale: number;\n public value: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const scale = getScale(this.scale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.type),\n value: `${this.value} ${scale.unit}`,\n },\n };\n }\n}\nfunction testResponseForHumidityControlSetpointGet(sent: HumidityControlSetpointCCGet, received: HumidityControlSetpointCCReport) {\n // We expect a Humidity Control Setpoint Report that matches the requested setpoint type\n return received.type === sent.setpointType;\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.Get)\n@expectedCCResponse(HumidityControlSetpointCCReport, testResponseForHumidityControlSetpointGet)\nexport class HumidityControlSetpointCCGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCSupportedReportOptions {\n supportedSetpointTypes: HumidityControlSetpointType[];\n}\n@CCCommand(HumidityControlSetpointCommand.SupportedReport)\n@ccValueProperty(\"supportedSetpointTypes\", HumidityControlSetpointCCValues.supportedSetpointTypes)\nexport class HumidityControlSetpointCCSupportedReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedSetpointTypes = options.supportedSetpointTypes;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const supportedSetpointTypes: HumidityControlSetpointType[] = parseBitMask(raw.payload, HumidityControlSetpointType[\"N/A\"]);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedSetpointTypes,\n });\n }\n public readonly supportedSetpointTypes: readonly HumidityControlSetpointType[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"supported setpoint types\": logList(this.supportedSetpointTypes.map((t) => getEnumMemberName(HumidityControlSetpointType, t))),\n },\n };\n }\n}\n@CCCommand(HumidityControlSetpointCommand.SupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCSupportedReport)\nexport class HumidityControlSetpointCCSupportedGet extends HumidityControlSetpointCC {\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedReportOptions {\n supportedScales: number[];\n}\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCScaleSupportedReportOptions>) {\n super(options);\n // TODO: Check implementation:\n this.supportedScales = options.supportedScales;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCScaleSupportedReport {\n validatePayload(raw.payload.length >= 1);\n const supportedScales = parseBitMask(Bytes.from([raw.payload[0] & 0b1111]), 0);\n return new this({\n nodeId: ctx.sourceNodeId,\n supportedScales,\n });\n }\n public readonly supportedScales: readonly number[];\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const supportedScales = this.supportedScales.map((scale) => getScale(scale));\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"scale supported\": logList(supportedScales.map((t) => `${t.key} ${t.unit} - ${t.label}`)),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCScaleSupportedGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.ScaleSupportedGet)\n@expectedCCResponse(HumidityControlSetpointCCScaleSupportedReport)\nexport class HumidityControlSetpointCCScaleSupportedGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCScaleSupportedGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCScaleSupportedGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCScaleSupportedGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesReportOptions {\n type: HumidityControlSetpointType;\n minValue: number;\n maxValue: number;\n minValueScale: number;\n maxValueScale: number;\n}\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesReport extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCCapabilitiesReportOptions>) {\n super(options);\n this.type = options.type;\n this.minValue = options.minValue;\n this.maxValue = options.maxValue;\n this.minValueScale = options.minValueScale;\n this.maxValueScale = options.maxValueScale;\n }\n public static from(raw: CCRaw, ctx: CCParsingContext): HumidityControlSetpointCCCapabilitiesReport {\n validatePayload(raw.payload.length >= 1);\n const type: HumidityControlSetpointType = raw.payload[0] & 0b1111;\n // parseFloatWithScale does its own validation\n const { value: minValue, scale: minValueScale, bytesRead, } = parseFloatWithScale(raw.payload.subarray(1));\n const { value: maxValue, scale: maxValueScale } = parseFloatWithScale(raw.payload.subarray(1 + bytesRead));\n return new this({\n nodeId: ctx.sourceNodeId,\n type,\n minValue,\n minValueScale,\n maxValue,\n maxValueScale,\n });\n }\n public persistValues(ctx: PersistValuesContext): boolean {\n if (!super.persistValues(ctx))\n return false;\n // Predefine the metadata\n const setpointValue = HumidityControlSetpointCCValues.setpoint(this.type);\n this.setMetadata(ctx, setpointValue, {\n ...setpointValue.meta,\n min: this.minValue,\n max: this.maxValue,\n unit: getSetpointUnit(this.minValueScale)\n || getSetpointUnit(this.maxValueScale),\n });\n return true;\n }\n public type: HumidityControlSetpointType;\n public minValue: number;\n public maxValue: number;\n public minValueScale: number;\n public maxValueScale: number;\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n const minValueScale = getScale(this.minValueScale);\n const maxValueScale = getScale(this.maxValueScale);\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.type),\n \"min value\": `${this.minValue} ${minValueScale.unit}`,\n \"max value\": `${this.maxValue} ${maxValueScale.unit}`,\n },\n };\n }\n}\n// @publicAPI\nexport interface HumidityControlSetpointCCCapabilitiesGetOptions {\n setpointType: HumidityControlSetpointType;\n}\n@CCCommand(HumidityControlSetpointCommand.CapabilitiesGet)\n@expectedCCResponse(HumidityControlSetpointCCCapabilitiesReport)\nexport class HumidityControlSetpointCCCapabilitiesGet extends HumidityControlSetpointCC {\n public constructor(options: WithAddress<HumidityControlSetpointCCCapabilitiesGetOptions>) {\n super(options);\n this.setpointType = options.setpointType;\n }\n public static from(_raw: CCRaw, _ctx: CCParsingContext): HumidityControlSetpointCCCapabilitiesGet {\n // TODO: Deserialize payload\n throw new ZWaveError(`${this.name}: deserialization not implemented`, ZWaveErrorCodes.Deserialization_NotImplemented);\n // return new HumidityControlSetpointCCCapabilitiesGet({\n // \tnodeId: ctx.sourceNodeId,\n // });\n }\n public setpointType: HumidityControlSetpointType;\n public serialize(ctx: CCEncodingContext): Promise<Bytes> {\n this.payload = Bytes.from([this.setpointType & 0b1111]);\n return super.serialize(ctx);\n }\n public toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n return {\n ...super.toLogEntry(ctx),\n message: {\n \"setpoint type\": getEnumMemberName(HumidityControlSetpointType, this.setpointType),\n },\n };\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qBAAgC;AAEhC,kBAA8Y;AAC9Y,oBAA+C;AAC/C,iBAAwJ;AACxJ,0BAAkJ;AAClJ,oCAAiI;AAEjI,mBAA0J;AAE1J,gCAAgD;AAThD,MAAM,EAAE,+CAA+C,+CAA+C,2DAA2D,6DAA4D,IAAK;AAWlO,SAAS,SAAS,OAAa;AAC3B,aAAO,2BAAc,YAAY,KAAY,SAAK,6BAAgB,KAAK;AAC3E;AAFS;AAGT,SAAS,gBAAgB,OAAa;AAClC,SAAO,SAAS,KAAK,EAAE,QAAQ;AACnC;AAFS;IAII,gCAA4B,MAAA;8BADxC,mCAAI,2BAAe,2BAA2B,CAAC,CAAC;;;;oBACC;;;;;;oDAAA,YAAK;WAAA;;;;;;;;yBA8ClD,8CAA6C,CAAE;yBAoB/C,8CAA6C,CAAE;qCAY/C,0DAAyD,CAAE;wCA2B3D,6DAA4D,CAAE;AA1D/D,qCAAA,MAAA,MAAA,iBAAA,EAAA,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aAAa;AACjD,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,qBAAiB,iCAAkB,0CAA6B,KAAK,IAAI;UACzE,aAAa,GAAG,KAAK,QAAQ,IAAI,cAAc,IAAI;UACnD,aAAa,GAAG,KAAK,QAAQ,IAAI,cAAc,IAAI;;;IAG/D;;;;IAQS,4CAAwC,MAAA;8BAFpD,yCAAU,4CAA+B,eAAe,OACxD,kDAAmB,2CAA2C,CAAC;;;;oBACF;gEAAA,YAAyB;WAAA;;;;;;;;AAAvF,qCAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,0CAAA,YAAA,uBAAA;;IACT,YAAmB,SAAqE;AACpF,YAAM,OAAO;AACb,WAAK,eAAe,QAAQ;IAChC;IACO,OAAO,KAAK,MAAa,MAAsB;AAElD,YAAM,IAAI,uBAAW,GAAG,KAAK,IAAI,qCAAqC,4BAAgB,8BAA8B;IAIxH;IACO;IACA,UAAU,KAAsB;AACnC,WAAK,UAAU,oBAAM,KAAK,CAAC,KAAK,eAAe,EAAM,CAAC;AACtD,aAAO,MAAM,UAAU,GAAG;IAC9B;IACO,WAAW,KAAgB;AAC9B,aAAO;QACH,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACL,qBAAiB,iCAAkB,0CAA6B,KAAK,YAAY;;;IAG7F;;;;",
6
6
  "names": []
7
7
  }
@@ -523,14 +523,16 @@ let IrrigationCC = (() => {
523
523
  });
524
524
  return;
525
525
  }
526
- const logMessage = `received irrigation system info:
527
- supports master valve: ${systemInfo.supportsMasterValve}
528
- no. of valves: ${systemInfo.numValves}
529
- no. of valve tables: ${systemInfo.numValveTables}
530
- max. valve table size: ${systemInfo.maxValveTableSize}`;
531
526
  ctx.logNode(node.id, {
532
527
  endpoint: this.endpointIndex,
533
- message: logMessage,
528
+ message: (0, import_core.logText)("received irrigation system info:", {
529
+ nested: (0, import_core.logDict)({
530
+ "supports master valve": systemInfo.supportsMasterValve,
531
+ "no. of valves": systemInfo.numValves,
532
+ "no. of valve tables": systemInfo.numValveTables,
533
+ "max. valve table size": systemInfo.maxValveTableSize
534
+ })
535
+ }),
534
536
  direction: "inbound"
535
537
  });
536
538
  for (let i = 1; i <= systemInfo.numValves; i++) {
@@ -558,21 +560,17 @@ max. valve table size: ${systemInfo.maxValveTableSize}`;
558
560
  });
559
561
  const systemConfig = await api.getSystemConfig();
560
562
  if (systemConfig) {
561
- let logMessage = `received irrigation system configuration:
562
- master valve delay: ${systemConfig.masterValveDelay} seconds
563
- high pressure threshold: ${systemConfig.highPressureThreshold} kPa
564
- low pressure threshold: ${systemConfig.lowPressureThreshold} kPa`;
565
- if (systemConfig.rainSensorPolarity != void 0) {
566
- logMessage += `
567
- rain sensor polarity: ${(0, import_shared.getEnumMemberName)(import_Types.IrrigationSensorPolarity, systemConfig.rainSensorPolarity)}`;
568
- }
569
- if (systemConfig.moistureSensorPolarity != void 0) {
570
- logMessage += `
571
- moisture sensor polarity: ${(0, import_shared.getEnumMemberName)(import_Types.IrrigationSensorPolarity, systemConfig.moistureSensorPolarity)}`;
572
- }
573
563
  ctx.logNode(node.id, {
574
564
  endpoint: this.endpointIndex,
575
- message: logMessage,
565
+ message: (0, import_core.logText)("received irrigation system configuration:", {
566
+ nested: (0, import_core.logDict)({
567
+ "master valve delay": `${systemConfig.masterValveDelay} seconds`,
568
+ "high pressure threshold": `${systemConfig.highPressureThreshold} kPa`,
569
+ "low pressure threshold": `${systemConfig.lowPressureThreshold} kPa`,
570
+ "rain sensor polarity": systemConfig.rainSensorPolarity != void 0 ? (0, import_shared.getEnumMemberName)(import_Types.IrrigationSensorPolarity, systemConfig.rainSensorPolarity) : void 0,
571
+ "moisture sensor polarity": systemConfig.moistureSensorPolarity != void 0 ? (0, import_shared.getEnumMemberName)(import_Types.IrrigationSensorPolarity, systemConfig.moistureSensorPolarity) : void 0
572
+ })
573
+ }),
576
574
  direction: "inbound"
577
575
  });
578
576
  }
@@ -839,10 +837,9 @@ let IrrigationCCSystemStatusReport = (() => {
839
837
  this.errorHighPressure ? "high pressure threshold triggered" : void 0,
840
838
  this.errorLowPressure ? "low pressure threshold triggered" : void 0,
841
839
  this.errorValve ? "a valve or the master valve has an error" : void 0
842
- ].filter(Boolean);
840
+ ].filter((e) => e != void 0);
843
841
  if (errors.length > 0) {
844
- message.errors = errors.map((e) => `
845
- \xB7 ${e}`).join("");
842
+ message.errors = (0, import_core.logList)(errors);
846
843
  }
847
844
  return {
848
845
  ...super.toLogEntry(ctx),
@@ -1196,10 +1193,9 @@ let IrrigationCCValveInfoReport = (() => {
1196
1193
  this.errorMaximumFlow ? "maximum flow" : void 0,
1197
1194
  this.errorHighFlow ? "flow above high threshold" : void 0,
1198
1195
  this.errorLowFlow ? "flow below low threshold" : void 0
1199
- ].filter(Boolean);
1196
+ ].filter((e) => e != void 0);
1200
1197
  if (errors.length > 0) {
1201
- message.errors = errors.map((e) => `
1202
- \xB7 ${e}`).join("");
1198
+ message.errors = (0, import_core.logList)(errors);
1203
1199
  }
1204
1200
  return {
1205
1201
  ...super.toLogEntry(ctx),