@zwave-js/cc 14.3.10 → 15.0.0-beta.1

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 (523) hide show
  1. package/build/cjs/cc/AlarmSensorCC.d.ts +68 -68
  2. package/build/cjs/cc/AlarmSensorCC.js +12 -50
  3. package/build/cjs/cc/AlarmSensorCC.js.map +2 -2
  4. package/build/cjs/cc/AssociationCC.d.ts +72 -73
  5. package/build/cjs/cc/AssociationCC.js +9 -26
  6. package/build/cjs/cc/AssociationCC.js.map +2 -2
  7. package/build/cjs/cc/AssociationGroupInfoCC.d.ts +71 -71
  8. package/build/cjs/cc/AssociationGroupInfoCC.js +11 -22
  9. package/build/cjs/cc/AssociationGroupInfoCC.js.map +2 -2
  10. package/build/cjs/cc/BarrierOperatorCC.d.ts +66 -72
  11. package/build/cjs/cc/BarrierOperatorCC.js +12 -44
  12. package/build/cjs/cc/BarrierOperatorCC.js.map +2 -2
  13. package/build/cjs/cc/BasicCC.d.ts +64 -65
  14. package/build/cjs/cc/BasicCC.js +15 -46
  15. package/build/cjs/cc/BasicCC.js.map +2 -2
  16. package/build/cjs/cc/BatteryCC.d.ts +162 -165
  17. package/build/cjs/cc/BatteryCC.js +7 -84
  18. package/build/cjs/cc/BatteryCC.js.map +2 -2
  19. package/build/cjs/cc/BinarySensorCC.d.ts +36 -36
  20. package/build/cjs/cc/BinarySensorCC.js +9 -29
  21. package/build/cjs/cc/BinarySensorCC.js.map +2 -2
  22. package/build/cjs/cc/BinarySwitchCC.d.ts +34 -34
  23. package/build/cjs/cc/BinarySwitchCC.js +6 -22
  24. package/build/cjs/cc/BinarySwitchCC.js.map +2 -2
  25. package/build/cjs/cc/CRC16CC.d.ts +4 -8
  26. package/build/cjs/cc/CRC16CC.js +4 -27
  27. package/build/cjs/cc/CRC16CC.js.map +2 -2
  28. package/build/cjs/cc/CentralSceneCC.d.ts +74 -74
  29. package/build/cjs/cc/CentralSceneCC.js +7 -30
  30. package/build/cjs/cc/CentralSceneCC.js.map +2 -2
  31. package/build/cjs/cc/ClimateControlScheduleCC.d.ts +38 -40
  32. package/build/cjs/cc/ClimateControlScheduleCC.js +5 -24
  33. package/build/cjs/cc/ClimateControlScheduleCC.js.map +2 -2
  34. package/build/cjs/cc/ClockCC.d.ts +3 -3
  35. package/build/cjs/cc/ClockCC.js.map +2 -2
  36. package/build/cjs/cc/ColorSwitchCC.d.ts +117 -117
  37. package/build/cjs/cc/ColorSwitchCC.js +23 -75
  38. package/build/cjs/cc/ColorSwitchCC.js.map +2 -2
  39. package/build/cjs/cc/ConfigurationCC._validateArgs.js +1 -1
  40. package/build/cjs/cc/ConfigurationCC._validateArgs.js.map +1 -1
  41. package/build/cjs/cc/ConfigurationCC.d.ts +48 -52
  42. package/build/cjs/cc/ConfigurationCC.js +11 -39
  43. package/build/cjs/cc/ConfigurationCC.js.map +2 -2
  44. package/build/cjs/cc/DeviceResetLocallyCC.d.ts +1 -1
  45. package/build/cjs/cc/DeviceResetLocallyCC.js.map +2 -2
  46. package/build/cjs/cc/DoorLockCC._validateArgs.js +1 -1
  47. package/build/cjs/cc/DoorLockCC._validateArgs.js.map +1 -1
  48. package/build/cjs/cc/DoorLockCC.d.ts +362 -361
  49. package/build/cjs/cc/DoorLockCC.js +51 -156
  50. package/build/cjs/cc/DoorLockCC.js.map +2 -2
  51. package/build/cjs/cc/DoorLockLoggingCC.d.ts +14 -14
  52. package/build/cjs/cc/DoorLockLoggingCC.js +4 -8
  53. package/build/cjs/cc/DoorLockLoggingCC.js.map +2 -2
  54. package/build/cjs/cc/EnergyProductionCC.d.ts +16 -16
  55. package/build/cjs/cc/EnergyProductionCC.js +5 -17
  56. package/build/cjs/cc/EnergyProductionCC.js.map +2 -2
  57. package/build/cjs/cc/EntryControlCC.d.ts +71 -71
  58. package/build/cjs/cc/EntryControlCC.js +9 -36
  59. package/build/cjs/cc/EntryControlCC.js.map +2 -2
  60. package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts +2 -0
  61. package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.js +26 -0
  62. package/build/cjs/cc/FirmwareUpdateMetaDataCC._validateArgs.js.map +1 -1
  63. package/build/cjs/cc/FirmwareUpdateMetaDataCC.d.ts +101 -88
  64. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js +159 -34
  65. package/build/cjs/cc/FirmwareUpdateMetaDataCC.js.map +2 -2
  66. package/build/cjs/cc/HumidityControlModeCC.d.ts +31 -33
  67. package/build/cjs/cc/HumidityControlModeCC.js +6 -15
  68. package/build/cjs/cc/HumidityControlModeCC.js.map +2 -2
  69. package/build/cjs/cc/HumidityControlOperatingStateCC.d.ts +9 -11
  70. package/build/cjs/cc/HumidityControlOperatingStateCC.js +4 -12
  71. package/build/cjs/cc/HumidityControlOperatingStateCC.js.map +2 -2
  72. package/build/cjs/cc/HumidityControlSetpointCC.d.ts +50 -50
  73. package/build/cjs/cc/HumidityControlSetpointCC.js +10 -28
  74. package/build/cjs/cc/HumidityControlSetpointCC.js.map +2 -2
  75. package/build/cjs/cc/InclusionControllerCC.d.ts +4 -4
  76. package/build/cjs/cc/InclusionControllerCC.js.map +2 -2
  77. package/build/cjs/cc/IndicatorCC.d.ts +119 -119
  78. package/build/cjs/cc/IndicatorCC.js +15 -61
  79. package/build/cjs/cc/IndicatorCC.js.map +2 -2
  80. package/build/cjs/cc/IrrigationCC.d.ts +581 -585
  81. package/build/cjs/cc/IrrigationCC.js +29 -233
  82. package/build/cjs/cc/IrrigationCC.js.map +2 -2
  83. package/build/cjs/cc/LanguageCC.d.ts +21 -21
  84. package/build/cjs/cc/LanguageCC.js +4 -15
  85. package/build/cjs/cc/LanguageCC.js.map +2 -2
  86. package/build/cjs/cc/LockCC.d.ts +9 -9
  87. package/build/cjs/cc/LockCC.js +4 -12
  88. package/build/cjs/cc/LockCC.js.map +2 -2
  89. package/build/cjs/cc/ManufacturerProprietaryCC.d.ts +2 -2
  90. package/build/cjs/cc/ManufacturerProprietaryCC.js.map +2 -2
  91. package/build/cjs/cc/ManufacturerSpecificCC.d.ts +67 -67
  92. package/build/cjs/cc/ManufacturerSpecificCC.js +5 -26
  93. package/build/cjs/cc/ManufacturerSpecificCC.js.map +2 -2
  94. package/build/cjs/cc/MeterCC.d.ts +120 -119
  95. package/build/cjs/cc/MeterCC.js +25 -69
  96. package/build/cjs/cc/MeterCC.js.map +2 -2
  97. package/build/cjs/cc/MultiChannelAssociationCC.d.ts +71 -73
  98. package/build/cjs/cc/MultiChannelAssociationCC.js +10 -28
  99. package/build/cjs/cc/MultiChannelAssociationCC.js.map +2 -2
  100. package/build/cjs/cc/MultiChannelCC.d.ts +136 -146
  101. package/build/cjs/cc/MultiChannelCC.js +26 -118
  102. package/build/cjs/cc/MultiChannelCC.js.map +2 -2
  103. package/build/cjs/cc/MultiCommandCC.d.ts +4 -8
  104. package/build/cjs/cc/MultiCommandCC.js +4 -37
  105. package/build/cjs/cc/MultiCommandCC.js.map +2 -2
  106. package/build/cjs/cc/MultilevelSensorCC.d.ts +50 -49
  107. package/build/cjs/cc/MultilevelSensorCC.js +12 -33
  108. package/build/cjs/cc/MultilevelSensorCC.js.map +2 -2
  109. package/build/cjs/cc/MultilevelSwitchCC.d.ts +146 -146
  110. package/build/cjs/cc/MultilevelSwitchCC.js +13 -107
  111. package/build/cjs/cc/MultilevelSwitchCC.js.map +2 -2
  112. package/build/cjs/cc/NodeNamingCC.d.ts +30 -30
  113. package/build/cjs/cc/NodeNamingCC.js +5 -16
  114. package/build/cjs/cc/NodeNamingCC.js.map +2 -2
  115. package/build/cjs/cc/NotificationCC.d.ts +210 -208
  116. package/build/cjs/cc/NotificationCC.js +41 -113
  117. package/build/cjs/cc/NotificationCC.js.map +2 -2
  118. package/build/cjs/cc/PowerlevelCC.d.ts +6 -6
  119. package/build/cjs/cc/PowerlevelCC.js.map +2 -2
  120. package/build/cjs/cc/ProtectionCC.d.ts +117 -121
  121. package/build/cjs/cc/ProtectionCC.js +15 -50
  122. package/build/cjs/cc/ProtectionCC.js.map +2 -2
  123. package/build/cjs/cc/SceneActivationCC.d.ts +29 -29
  124. package/build/cjs/cc/SceneActivationCC.js +4 -17
  125. package/build/cjs/cc/SceneActivationCC.js.map +2 -2
  126. package/build/cjs/cc/SceneActuatorConfigurationCC.d.ts +35 -35
  127. package/build/cjs/cc/SceneActuatorConfigurationCC.js +9 -21
  128. package/build/cjs/cc/SceneActuatorConfigurationCC.js.map +2 -2
  129. package/build/cjs/cc/SceneControllerConfigurationCC.d.ts +36 -35
  130. package/build/cjs/cc/SceneControllerConfigurationCC.js +10 -22
  131. package/build/cjs/cc/SceneControllerConfigurationCC.js.map +2 -2
  132. package/build/cjs/cc/ScheduleEntryLockCC.d.ts +109 -109
  133. package/build/cjs/cc/ScheduleEntryLockCC.js +13 -30
  134. package/build/cjs/cc/ScheduleEntryLockCC.js.map +2 -2
  135. package/build/cjs/cc/Security2CC.d.ts +15 -21
  136. package/build/cjs/cc/Security2CC.js +32 -347
  137. package/build/cjs/cc/Security2CC.js.map +3 -3
  138. package/build/cjs/cc/SecurityCC.d.ts +12 -19
  139. package/build/cjs/cc/SecurityCC.js +12 -106
  140. package/build/cjs/cc/SecurityCC.js.map +2 -2
  141. package/build/cjs/cc/SoundSwitchCC.d.ts +58 -58
  142. package/build/cjs/cc/SoundSwitchCC.js +11 -43
  143. package/build/cjs/cc/SoundSwitchCC.js.map +2 -2
  144. package/build/cjs/cc/SupervisionCC.d.ts +21 -25
  145. package/build/cjs/cc/SupervisionCC.js +8 -38
  146. package/build/cjs/cc/SupervisionCC.js.map +2 -2
  147. package/build/cjs/cc/ThermostatFanModeCC.d.ts +37 -39
  148. package/build/cjs/cc/ThermostatFanModeCC.js +8 -21
  149. package/build/cjs/cc/ThermostatFanModeCC.js.map +2 -2
  150. package/build/cjs/cc/ThermostatFanStateCC.d.ts +9 -11
  151. package/build/cjs/cc/ThermostatFanStateCC.js +4 -12
  152. package/build/cjs/cc/ThermostatFanStateCC.js.map +2 -2
  153. package/build/cjs/cc/ThermostatModeCC.d.ts +39 -41
  154. package/build/cjs/cc/ThermostatModeCC.js +8 -21
  155. package/build/cjs/cc/ThermostatModeCC.js.map +2 -2
  156. package/build/cjs/cc/ThermostatOperatingStateCC.d.ts +9 -11
  157. package/build/cjs/cc/ThermostatOperatingStateCC.js +4 -12
  158. package/build/cjs/cc/ThermostatOperatingStateCC.js.map +2 -2
  159. package/build/cjs/cc/ThermostatSetbackCC.d.ts +4 -4
  160. package/build/cjs/cc/ThermostatSetbackCC.js.map +2 -2
  161. package/build/cjs/cc/ThermostatSetpointCC.d.ts +51 -51
  162. package/build/cjs/cc/ThermostatSetpointCC.js +10 -25
  163. package/build/cjs/cc/ThermostatSetpointCC.js.map +2 -2
  164. package/build/cjs/cc/TimeCC.d.ts +6 -6
  165. package/build/cjs/cc/TimeCC.js.map +2 -2
  166. package/build/cjs/cc/TimeParametersCC.d.ts +9 -9
  167. package/build/cjs/cc/TimeParametersCC.js +4 -11
  168. package/build/cjs/cc/TimeParametersCC.js.map +2 -2
  169. package/build/cjs/cc/TransportServiceCC.d.ts +7 -12
  170. package/build/cjs/cc/TransportServiceCC.js +3 -20
  171. package/build/cjs/cc/TransportServiceCC.js.map +2 -2
  172. package/build/cjs/cc/UserCodeCC._validateArgs.js +1 -1
  173. package/build/cjs/cc/UserCodeCC._validateArgs.js.map +1 -1
  174. package/build/cjs/cc/UserCodeCC.d.ts +236 -236
  175. package/build/cjs/cc/UserCodeCC.js +33 -98
  176. package/build/cjs/cc/UserCodeCC.js.map +2 -2
  177. package/build/cjs/cc/VersionCC.d.ts +210 -212
  178. package/build/cjs/cc/VersionCC.js +7 -98
  179. package/build/cjs/cc/VersionCC.js.map +2 -2
  180. package/build/cjs/cc/WakeUpCC.d.ts +44 -44
  181. package/build/cjs/cc/WakeUpCC.js +6 -26
  182. package/build/cjs/cc/WakeUpCC.js.map +2 -2
  183. package/build/cjs/cc/WindowCoveringCC.d.ts +118 -122
  184. package/build/cjs/cc/WindowCoveringCC.js +16 -128
  185. package/build/cjs/cc/WindowCoveringCC.js.map +2 -2
  186. package/build/cjs/cc/ZWavePlusCC.d.ts +74 -74
  187. package/build/cjs/cc/ZWavePlusCC.js +4 -25
  188. package/build/cjs/cc/ZWavePlusCC.js.map +2 -2
  189. package/build/cjs/cc/ZWaveProtocolCC.d.ts +28 -28
  190. package/build/cjs/cc/ZWaveProtocolCC.js.map +2 -2
  191. package/build/cjs/cc/_CCValues.generated.d.ts +15814 -0
  192. package/build/cjs/cc/_CCValues.generated.js +8723 -0
  193. package/build/cjs/cc/_CCValues.generated.js.map +7 -0
  194. package/build/cjs/cc/manufacturerProprietary/FibaroCC.d.ts +4 -4
  195. package/build/cjs/cc/manufacturerProprietary/FibaroCC.js.map +2 -2
  196. package/build/cjs/index.d.ts +1 -0
  197. package/build/cjs/index.js.map +1 -1
  198. package/build/cjs/index_browser.d.ts +9 -0
  199. package/build/cjs/index_browser.js +41 -1
  200. package/build/cjs/index_browser.js.map +2 -2
  201. package/build/cjs/lib/API.d.ts +7 -5
  202. package/build/cjs/lib/API.js +1 -1
  203. package/build/cjs/lib/API.js.map +2 -2
  204. package/build/cjs/lib/CCValueUtils.d.ts +14 -0
  205. package/build/cjs/lib/CCValueUtils.js +93 -0
  206. package/build/cjs/lib/CCValueUtils.js.map +7 -0
  207. package/build/cjs/lib/CommandClass.d.ts +10 -21
  208. package/build/cjs/lib/CommandClass.js +51 -106
  209. package/build/cjs/lib/CommandClass.js.map +3 -3
  210. package/build/cjs/lib/CommandClassDecorators.d.ts +1 -1
  211. package/build/cjs/lib/CommandClassDecorators.js +3 -3
  212. package/build/cjs/lib/CommandClassDecorators.js.map +2 -2
  213. package/build/cjs/lib/Values.d.ts +7 -106
  214. package/build/cjs/lib/Values.js +13 -107
  215. package/build/cjs/lib/Values.js.map +3 -3
  216. package/build/cjs/lib/traits.d.ts +94 -0
  217. package/build/cjs/lib/traits.js +17 -0
  218. package/build/cjs/lib/traits.js.map +7 -0
  219. package/build/cjs/lib/utils.d.ts +2 -2
  220. package/build/cjs/lib/utils.js.map +2 -2
  221. package/build/esm/cc/AlarmSensorCC.d.ts +68 -68
  222. package/build/esm/cc/AlarmSensorCC.d.ts.map +1 -1
  223. package/build/esm/cc/AlarmSensorCC.js +2 -40
  224. package/build/esm/cc/AlarmSensorCC.js.map +1 -1
  225. package/build/esm/cc/AssociationCC.d.ts +72 -73
  226. package/build/esm/cc/AssociationCC.d.ts.map +1 -1
  227. package/build/esm/cc/AssociationCC.js +2 -27
  228. package/build/esm/cc/AssociationCC.js.map +1 -1
  229. package/build/esm/cc/AssociationGroupInfoCC.d.ts +71 -71
  230. package/build/esm/cc/AssociationGroupInfoCC.d.ts.map +1 -1
  231. package/build/esm/cc/AssociationGroupInfoCC.js +2 -19
  232. package/build/esm/cc/AssociationGroupInfoCC.js.map +1 -1
  233. package/build/esm/cc/BarrierOperatorCC.d.ts +66 -72
  234. package/build/esm/cc/BarrierOperatorCC.d.ts.map +1 -1
  235. package/build/esm/cc/BarrierOperatorCC.js +2 -37
  236. package/build/esm/cc/BarrierOperatorCC.js.map +1 -1
  237. package/build/esm/cc/BasicCC.d.ts +64 -65
  238. package/build/esm/cc/BasicCC.d.ts.map +1 -1
  239. package/build/esm/cc/BasicCC.js +2 -34
  240. package/build/esm/cc/BasicCC.js.map +1 -1
  241. package/build/esm/cc/BatteryCC.d.ts +162 -165
  242. package/build/esm/cc/BatteryCC.d.ts.map +1 -1
  243. package/build/esm/cc/BatteryCC.js +3 -80
  244. package/build/esm/cc/BatteryCC.js.map +1 -1
  245. package/build/esm/cc/BinarySensorCC.d.ts +36 -36
  246. package/build/esm/cc/BinarySensorCC.d.ts.map +1 -1
  247. package/build/esm/cc/BinarySensorCC.js +2 -19
  248. package/build/esm/cc/BinarySensorCC.js.map +1 -1
  249. package/build/esm/cc/BinarySwitchCC.d.ts +34 -34
  250. package/build/esm/cc/BinarySwitchCC.d.ts.map +1 -1
  251. package/build/esm/cc/BinarySwitchCC.js +2 -19
  252. package/build/esm/cc/BinarySwitchCC.js.map +1 -1
  253. package/build/esm/cc/CRC16CC.d.ts +4 -8
  254. package/build/esm/cc/CRC16CC.d.ts.map +1 -1
  255. package/build/esm/cc/CRC16CC.js +4 -34
  256. package/build/esm/cc/CRC16CC.js.map +1 -1
  257. package/build/esm/cc/CentralSceneCC.d.ts +74 -74
  258. package/build/esm/cc/CentralSceneCC.d.ts.map +1 -1
  259. package/build/esm/cc/CentralSceneCC.js +2 -27
  260. package/build/esm/cc/CentralSceneCC.js.map +1 -1
  261. package/build/esm/cc/ClimateControlScheduleCC.d.ts +38 -40
  262. package/build/esm/cc/ClimateControlScheduleCC.d.ts.map +1 -1
  263. package/build/esm/cc/ClimateControlScheduleCC.js +2 -26
  264. package/build/esm/cc/ClimateControlScheduleCC.js.map +1 -1
  265. package/build/esm/cc/ClockCC.d.ts +3 -3
  266. package/build/esm/cc/ClockCC.d.ts.map +1 -1
  267. package/build/esm/cc/ClockCC.js +0 -1
  268. package/build/esm/cc/ClockCC.js.map +1 -1
  269. package/build/esm/cc/ColorSwitchCC.d.ts +117 -117
  270. package/build/esm/cc/ColorSwitchCC.d.ts.map +1 -1
  271. package/build/esm/cc/ColorSwitchCC.js +2 -58
  272. package/build/esm/cc/ColorSwitchCC.js.map +1 -1
  273. package/build/esm/cc/ConfigurationCC._validateArgs.js +1 -1
  274. package/build/esm/cc/ConfigurationCC._validateArgs.js.map +1 -1
  275. package/build/esm/cc/ConfigurationCC.d.ts +48 -52
  276. package/build/esm/cc/ConfigurationCC.d.ts.map +1 -1
  277. package/build/esm/cc/ConfigurationCC.js +2 -40
  278. package/build/esm/cc/ConfigurationCC.js.map +1 -1
  279. package/build/esm/cc/DeviceResetLocallyCC.d.ts +1 -1
  280. package/build/esm/cc/DeviceResetLocallyCC.d.ts.map +1 -1
  281. package/build/esm/cc/DeviceResetLocallyCC.js.map +1 -1
  282. package/build/esm/cc/DoorLockCC._validateArgs.js +1 -1
  283. package/build/esm/cc/DoorLockCC._validateArgs.js.map +1 -1
  284. package/build/esm/cc/DoorLockCC.d.ts +362 -361
  285. package/build/esm/cc/DoorLockCC.d.ts.map +1 -1
  286. package/build/esm/cc/DoorLockCC.js +9 -129
  287. package/build/esm/cc/DoorLockCC.js.map +1 -1
  288. package/build/esm/cc/DoorLockLoggingCC.d.ts +14 -14
  289. package/build/esm/cc/DoorLockLoggingCC.d.ts.map +1 -1
  290. package/build/esm/cc/DoorLockLoggingCC.js +2 -6
  291. package/build/esm/cc/DoorLockLoggingCC.js.map +1 -1
  292. package/build/esm/cc/EnergyProductionCC.d.ts +16 -16
  293. package/build/esm/cc/EnergyProductionCC.d.ts.map +1 -1
  294. package/build/esm/cc/EnergyProductionCC.js +2 -15
  295. package/build/esm/cc/EnergyProductionCC.js.map +1 -1
  296. package/build/esm/cc/EntryControlCC.d.ts +71 -71
  297. package/build/esm/cc/EntryControlCC.d.ts.map +1 -1
  298. package/build/esm/cc/EntryControlCC.js +2 -29
  299. package/build/esm/cc/EntryControlCC.js.map +1 -1
  300. package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts +2 -0
  301. package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.d.ts.map +1 -1
  302. package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.js +20 -0
  303. package/build/esm/cc/FirmwareUpdateMetaDataCC._validateArgs.js.map +1 -1
  304. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts +101 -88
  305. package/build/esm/cc/FirmwareUpdateMetaDataCC.d.ts.map +1 -1
  306. package/build/esm/cc/FirmwareUpdateMetaDataCC.js +160 -53
  307. package/build/esm/cc/FirmwareUpdateMetaDataCC.js.map +1 -1
  308. package/build/esm/cc/HumidityControlModeCC.d.ts +31 -33
  309. package/build/esm/cc/HumidityControlModeCC.d.ts.map +1 -1
  310. package/build/esm/cc/HumidityControlModeCC.js +2 -11
  311. package/build/esm/cc/HumidityControlModeCC.js.map +1 -1
  312. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts +9 -11
  313. package/build/esm/cc/HumidityControlOperatingStateCC.d.ts.map +1 -1
  314. package/build/esm/cc/HumidityControlOperatingStateCC.js +2 -9
  315. package/build/esm/cc/HumidityControlOperatingStateCC.js.map +1 -1
  316. package/build/esm/cc/HumidityControlSetpointCC.d.ts +50 -50
  317. package/build/esm/cc/HumidityControlSetpointCC.d.ts.map +1 -1
  318. package/build/esm/cc/HumidityControlSetpointCC.js +2 -23
  319. package/build/esm/cc/HumidityControlSetpointCC.js.map +1 -1
  320. package/build/esm/cc/InclusionControllerCC.d.ts +4 -4
  321. package/build/esm/cc/InclusionControllerCC.d.ts.map +1 -1
  322. package/build/esm/cc/InclusionControllerCC.js +0 -2
  323. package/build/esm/cc/InclusionControllerCC.js.map +1 -1
  324. package/build/esm/cc/IndicatorCC.d.ts +119 -119
  325. package/build/esm/cc/IndicatorCC.d.ts.map +1 -1
  326. package/build/esm/cc/IndicatorCC.js +2 -50
  327. package/build/esm/cc/IndicatorCC.js.map +1 -1
  328. package/build/esm/cc/IrrigationCC.d.ts +581 -585
  329. package/build/esm/cc/IrrigationCC.d.ts.map +1 -1
  330. package/build/esm/cc/IrrigationCC.js +3 -231
  331. package/build/esm/cc/IrrigationCC.js.map +1 -1
  332. package/build/esm/cc/LanguageCC.d.ts +21 -21
  333. package/build/esm/cc/LanguageCC.d.ts.map +1 -1
  334. package/build/esm/cc/LanguageCC.js +2 -13
  335. package/build/esm/cc/LanguageCC.js.map +1 -1
  336. package/build/esm/cc/LockCC.d.ts +9 -9
  337. package/build/esm/cc/LockCC.d.ts.map +1 -1
  338. package/build/esm/cc/LockCC.js +2 -10
  339. package/build/esm/cc/LockCC.js.map +1 -1
  340. package/build/esm/cc/ManufacturerProprietaryCC.d.ts +2 -2
  341. package/build/esm/cc/ManufacturerProprietaryCC.d.ts.map +1 -1
  342. package/build/esm/cc/ManufacturerProprietaryCC.js +0 -2
  343. package/build/esm/cc/ManufacturerProprietaryCC.js.map +1 -1
  344. package/build/esm/cc/ManufacturerSpecificCC.d.ts +67 -67
  345. package/build/esm/cc/ManufacturerSpecificCC.d.ts.map +1 -1
  346. package/build/esm/cc/ManufacturerSpecificCC.js +2 -26
  347. package/build/esm/cc/ManufacturerSpecificCC.js.map +1 -1
  348. package/build/esm/cc/MeterCC.d.ts +120 -119
  349. package/build/esm/cc/MeterCC.d.ts.map +1 -1
  350. package/build/esm/cc/MeterCC.js +3 -53
  351. package/build/esm/cc/MeterCC.js.map +1 -1
  352. package/build/esm/cc/MultiChannelAssociationCC.d.ts +71 -73
  353. package/build/esm/cc/MultiChannelAssociationCC.d.ts.map +1 -1
  354. package/build/esm/cc/MultiChannelAssociationCC.js +2 -30
  355. package/build/esm/cc/MultiChannelAssociationCC.js.map +1 -1
  356. package/build/esm/cc/MultiChannelCC.d.ts +136 -146
  357. package/build/esm/cc/MultiChannelCC.d.ts.map +1 -1
  358. package/build/esm/cc/MultiChannelCC.js +10 -131
  359. package/build/esm/cc/MultiChannelCC.js.map +1 -1
  360. package/build/esm/cc/MultiCommandCC.d.ts +4 -8
  361. package/build/esm/cc/MultiCommandCC.d.ts.map +1 -1
  362. package/build/esm/cc/MultiCommandCC.js +4 -38
  363. package/build/esm/cc/MultiCommandCC.js.map +1 -1
  364. package/build/esm/cc/MultilevelSensorCC.d.ts +50 -49
  365. package/build/esm/cc/MultilevelSensorCC.d.ts.map +1 -1
  366. package/build/esm/cc/MultilevelSensorCC.js +2 -27
  367. package/build/esm/cc/MultilevelSensorCC.js.map +1 -1
  368. package/build/esm/cc/MultilevelSwitchCC.d.ts +146 -146
  369. package/build/esm/cc/MultilevelSwitchCC.d.ts.map +1 -1
  370. package/build/esm/cc/MultilevelSwitchCC.js +5 -105
  371. package/build/esm/cc/MultilevelSwitchCC.js.map +1 -1
  372. package/build/esm/cc/NodeNamingCC.d.ts +30 -30
  373. package/build/esm/cc/NodeNamingCC.d.ts.map +1 -1
  374. package/build/esm/cc/NodeNamingCC.js +2 -14
  375. package/build/esm/cc/NodeNamingCC.js.map +1 -1
  376. package/build/esm/cc/NotificationCC.d.ts +210 -208
  377. package/build/esm/cc/NotificationCC.d.ts.map +1 -1
  378. package/build/esm/cc/NotificationCC.js +21 -97
  379. package/build/esm/cc/NotificationCC.js.map +1 -1
  380. package/build/esm/cc/PowerlevelCC.d.ts +6 -6
  381. package/build/esm/cc/PowerlevelCC.d.ts.map +1 -1
  382. package/build/esm/cc/PowerlevelCC.js +0 -4
  383. package/build/esm/cc/PowerlevelCC.js.map +1 -1
  384. package/build/esm/cc/ProtectionCC.d.ts +117 -121
  385. package/build/esm/cc/ProtectionCC.d.ts.map +1 -1
  386. package/build/esm/cc/ProtectionCC.js +2 -39
  387. package/build/esm/cc/ProtectionCC.js.map +1 -1
  388. package/build/esm/cc/SceneActivationCC.d.ts +29 -29
  389. package/build/esm/cc/SceneActivationCC.d.ts.map +1 -1
  390. package/build/esm/cc/SceneActivationCC.js +2 -15
  391. package/build/esm/cc/SceneActivationCC.js.map +1 -1
  392. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts +35 -35
  393. package/build/esm/cc/SceneActuatorConfigurationCC.d.ts.map +1 -1
  394. package/build/esm/cc/SceneActuatorConfigurationCC.js +2 -16
  395. package/build/esm/cc/SceneActuatorConfigurationCC.js.map +1 -1
  396. package/build/esm/cc/SceneControllerConfigurationCC.d.ts +36 -35
  397. package/build/esm/cc/SceneControllerConfigurationCC.d.ts.map +1 -1
  398. package/build/esm/cc/SceneControllerConfigurationCC.js +2 -16
  399. package/build/esm/cc/SceneControllerConfigurationCC.js.map +1 -1
  400. package/build/esm/cc/ScheduleEntryLockCC.d.ts +109 -109
  401. package/build/esm/cc/ScheduleEntryLockCC.d.ts.map +1 -1
  402. package/build/esm/cc/ScheduleEntryLockCC.js +2 -31
  403. package/build/esm/cc/ScheduleEntryLockCC.js.map +1 -1
  404. package/build/esm/cc/Security2CC.d.ts +15 -21
  405. package/build/esm/cc/Security2CC.d.ts.map +1 -1
  406. package/build/esm/cc/Security2CC.js +27 -475
  407. package/build/esm/cc/Security2CC.js.map +1 -1
  408. package/build/esm/cc/SecurityCC.d.ts +12 -19
  409. package/build/esm/cc/SecurityCC.d.ts.map +1 -1
  410. package/build/esm/cc/SecurityCC.js +13 -138
  411. package/build/esm/cc/SecurityCC.js.map +1 -1
  412. package/build/esm/cc/SoundSwitchCC.d.ts +58 -58
  413. package/build/esm/cc/SoundSwitchCC.d.ts.map +1 -1
  414. package/build/esm/cc/SoundSwitchCC.js +2 -40
  415. package/build/esm/cc/SoundSwitchCC.js.map +1 -1
  416. package/build/esm/cc/SupervisionCC.d.ts +21 -25
  417. package/build/esm/cc/SupervisionCC.d.ts.map +1 -1
  418. package/build/esm/cc/SupervisionCC.js +6 -41
  419. package/build/esm/cc/SupervisionCC.js.map +1 -1
  420. package/build/esm/cc/ThermostatFanModeCC.d.ts +37 -39
  421. package/build/esm/cc/ThermostatFanModeCC.d.ts.map +1 -1
  422. package/build/esm/cc/ThermostatFanModeCC.js +2 -15
  423. package/build/esm/cc/ThermostatFanModeCC.js.map +1 -1
  424. package/build/esm/cc/ThermostatFanStateCC.d.ts +9 -11
  425. package/build/esm/cc/ThermostatFanStateCC.d.ts.map +1 -1
  426. package/build/esm/cc/ThermostatFanStateCC.js +2 -9
  427. package/build/esm/cc/ThermostatFanStateCC.js.map +1 -1
  428. package/build/esm/cc/ThermostatModeCC.d.ts +39 -41
  429. package/build/esm/cc/ThermostatModeCC.d.ts.map +1 -1
  430. package/build/esm/cc/ThermostatModeCC.js +2 -17
  431. package/build/esm/cc/ThermostatModeCC.js.map +1 -1
  432. package/build/esm/cc/ThermostatOperatingStateCC.d.ts +9 -11
  433. package/build/esm/cc/ThermostatOperatingStateCC.d.ts.map +1 -1
  434. package/build/esm/cc/ThermostatOperatingStateCC.js +2 -9
  435. package/build/esm/cc/ThermostatOperatingStateCC.js.map +1 -1
  436. package/build/esm/cc/ThermostatSetbackCC.d.ts +4 -4
  437. package/build/esm/cc/ThermostatSetbackCC.d.ts.map +1 -1
  438. package/build/esm/cc/ThermostatSetbackCC.js +0 -2
  439. package/build/esm/cc/ThermostatSetbackCC.js.map +1 -1
  440. package/build/esm/cc/ThermostatSetpointCC.d.ts +51 -51
  441. package/build/esm/cc/ThermostatSetpointCC.d.ts.map +1 -1
  442. package/build/esm/cc/ThermostatSetpointCC.js +2 -22
  443. package/build/esm/cc/ThermostatSetpointCC.js.map +1 -1
  444. package/build/esm/cc/TimeCC.d.ts +6 -6
  445. package/build/esm/cc/TimeCC.d.ts.map +1 -1
  446. package/build/esm/cc/TimeCC.js +0 -4
  447. package/build/esm/cc/TimeCC.js.map +1 -1
  448. package/build/esm/cc/TimeParametersCC.d.ts +9 -9
  449. package/build/esm/cc/TimeParametersCC.d.ts.map +1 -1
  450. package/build/esm/cc/TimeParametersCC.js +2 -9
  451. package/build/esm/cc/TimeParametersCC.js.map +1 -1
  452. package/build/esm/cc/TransportServiceCC.d.ts +7 -12
  453. package/build/esm/cc/TransportServiceCC.d.ts.map +1 -1
  454. package/build/esm/cc/TransportServiceCC.js +5 -38
  455. package/build/esm/cc/TransportServiceCC.js.map +1 -1
  456. package/build/esm/cc/UserCodeCC._validateArgs.js +1 -1
  457. package/build/esm/cc/UserCodeCC._validateArgs.js.map +1 -1
  458. package/build/esm/cc/UserCodeCC.d.ts +236 -236
  459. package/build/esm/cc/UserCodeCC.d.ts.map +1 -1
  460. package/build/esm/cc/UserCodeCC.js +2 -72
  461. package/build/esm/cc/UserCodeCC.js.map +1 -1
  462. package/build/esm/cc/VersionCC.d.ts +210 -212
  463. package/build/esm/cc/VersionCC.d.ts.map +1 -1
  464. package/build/esm/cc/VersionCC.js +2 -96
  465. package/build/esm/cc/VersionCC.js.map +1 -1
  466. package/build/esm/cc/WakeUpCC.d.ts +44 -44
  467. package/build/esm/cc/WakeUpCC.d.ts.map +1 -1
  468. package/build/esm/cc/WakeUpCC.js +2 -22
  469. package/build/esm/cc/WakeUpCC.js.map +1 -1
  470. package/build/esm/cc/WindowCoveringCC.d.ts +118 -122
  471. package/build/esm/cc/WindowCoveringCC.d.ts.map +1 -1
  472. package/build/esm/cc/WindowCoveringCC.js +3 -108
  473. package/build/esm/cc/WindowCoveringCC.js.map +1 -1
  474. package/build/esm/cc/ZWavePlusCC.d.ts +74 -74
  475. package/build/esm/cc/ZWavePlusCC.d.ts.map +1 -1
  476. package/build/esm/cc/ZWavePlusCC.js +2 -26
  477. package/build/esm/cc/ZWavePlusCC.js.map +1 -1
  478. package/build/esm/cc/ZWaveProtocolCC.d.ts +28 -28
  479. package/build/esm/cc/ZWaveProtocolCC.d.ts.map +1 -1
  480. package/build/esm/cc/ZWaveProtocolCC.js +0 -27
  481. package/build/esm/cc/ZWaveProtocolCC.js.map +1 -1
  482. package/build/esm/cc/_CCValues.generated.d.ts +15814 -0
  483. package/build/esm/cc/_CCValues.generated.d.ts.map +1 -0
  484. package/build/esm/cc/_CCValues.generated.js +9187 -0
  485. package/build/esm/cc/_CCValues.generated.js.map +1 -0
  486. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts +4 -4
  487. package/build/esm/cc/manufacturerProprietary/FibaroCC.d.ts.map +1 -1
  488. package/build/esm/cc/manufacturerProprietary/FibaroCC.js +0 -3
  489. package/build/esm/cc/manufacturerProprietary/FibaroCC.js.map +1 -1
  490. package/build/esm/index.d.ts +1 -0
  491. package/build/esm/index.d.ts.map +1 -1
  492. package/build/esm/index_browser.d.ts +9 -0
  493. package/build/esm/index_browser.d.ts.map +1 -1
  494. package/build/esm/index_browser.js +8 -1
  495. package/build/esm/index_browser.js.map +1 -1
  496. package/build/esm/lib/API.d.ts +7 -5
  497. package/build/esm/lib/API.d.ts.map +1 -1
  498. package/build/esm/lib/API.js +1 -1
  499. package/build/esm/lib/API.js.map +1 -1
  500. package/build/esm/lib/CCValueUtils.d.ts +14 -0
  501. package/build/esm/lib/CCValueUtils.d.ts.map +1 -0
  502. package/build/esm/lib/CCValueUtils.js +62 -0
  503. package/build/esm/lib/CCValueUtils.js.map +1 -0
  504. package/build/esm/lib/CommandClass.d.ts +10 -21
  505. package/build/esm/lib/CommandClass.d.ts.map +1 -1
  506. package/build/esm/lib/CommandClass.js +8 -101
  507. package/build/esm/lib/CommandClass.js.map +1 -1
  508. package/build/esm/lib/CommandClassDecorators.d.ts +1 -1
  509. package/build/esm/lib/CommandClassDecorators.d.ts.map +1 -1
  510. package/build/esm/lib/CommandClassDecorators.js +1 -1
  511. package/build/esm/lib/CommandClassDecorators.js.map +1 -1
  512. package/build/esm/lib/Values.d.ts +7 -106
  513. package/build/esm/lib/Values.d.ts.map +1 -1
  514. package/build/esm/lib/Values.js +7 -104
  515. package/build/esm/lib/Values.js.map +1 -1
  516. package/build/esm/lib/traits.d.ts +94 -0
  517. package/build/esm/lib/traits.d.ts.map +1 -0
  518. package/build/esm/lib/traits.js +2 -0
  519. package/build/esm/lib/traits.js.map +1 -0
  520. package/build/esm/lib/utils.d.ts +2 -2
  521. package/build/esm/lib/utils.d.ts.map +1 -1
  522. package/build/esm/lib/utils.js.map +1 -1
  523. package/package.json +16 -14
@@ -23,7 +23,7 @@ __export(ThermostatFanStateCC_exports, {
23
23
  ThermostatFanStateCCAPI: () => ThermostatFanStateCCAPI,
24
24
  ThermostatFanStateCCGet: () => ThermostatFanStateCCGet,
25
25
  ThermostatFanStateCCReport: () => ThermostatFanStateCCReport,
26
- ThermostatFanStateCCValues: () => ThermostatFanStateCCValues
26
+ ThermostatFanStateCCValues: () => import_CCValues_generated.ThermostatFanStateCCValues
27
27
  });
28
28
  module.exports = __toCommonJS(ThermostatFanStateCC_exports);
29
29
  var import_safe = require("@zwave-js/core/safe");
@@ -33,6 +33,7 @@ var import_CommandClass = require("../lib/CommandClass.js");
33
33
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
34
34
  var import_Values = require("../lib/Values.js");
35
35
  var import_Types = require("../lib/_Types.js");
36
+ var import_CCValues_generated = require("./_CCValues.generated.js");
36
37
  var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
37
38
  function accept(f) {
38
39
  if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
@@ -73,15 +74,6 @@ var __runInitializers = function(thisArg, initializers, value) {
73
74
  }
74
75
  return useValue ? value : void 0;
75
76
  };
76
- const ThermostatFanStateCCValues = Object.freeze({
77
- ...import_Values.V.defineStaticCCValues(import_safe.CommandClasses["Thermostat Fan State"], {
78
- ...import_Values.V.staticPropertyWithName("fanState", "state", {
79
- ...import_safe.ValueMetadata.ReadOnlyUInt8,
80
- states: (0, import_safe.enumValuesToMetadataStates)(import_Types.ThermostatFanState),
81
- label: "Thermostat fan state"
82
- })
83
- })
84
- });
85
77
  let ThermostatFanStateCCAPI = (() => {
86
78
  let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Thermostat Fan State"])];
87
79
  let _classDescriptor;
@@ -135,7 +127,7 @@ let ThermostatFanStateCCAPI = (() => {
135
127
  return ThermostatFanStateCCAPI2 = _classThis;
136
128
  })();
137
129
  let ThermostatFanStateCC = (() => {
138
- let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Thermostat Fan State"]), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(ThermostatFanStateCCValues)];
130
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Thermostat Fan State"]), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.ThermostatFanStateCCValues)];
139
131
  let _classDescriptor;
140
132
  let _classExtraInitializers = [];
141
133
  let _classThis;
@@ -188,7 +180,7 @@ let ThermostatFanStateCC = (() => {
188
180
  return ThermostatFanStateCC2 = _classThis;
189
181
  })();
190
182
  let ThermostatFanStateCCReport = (() => {
191
- let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatFanStateCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("state", ThermostatFanStateCCValues.fanState)];
183
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatFanStateCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("state", import_CCValues_generated.ThermostatFanStateCCValues.fanState)];
192
184
  let _classDescriptor;
193
185
  let _classExtraInitializers = [];
194
186
  let _classThis;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cc/ThermostatFanStateCC.ts"],
4
- "sourcesContent": ["import {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\tValueMetadata,\n\ttype WithAddress,\n\tenumValuesToMetadataStates,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type { CCParsingContext, GetValueDB } from \"@zwave-js/host/safe\";\nimport { getEnumMemberName } from \"@zwave-js/shared/safe\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tthrowUnsupportedProperty,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tThermostatFanState,\n\tThermostatFanStateCommand,\n} from \"../lib/_Types.js\";\n\nexport const ThermostatFanStateCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Thermostat Fan State\"], {\n\t\t...V.staticPropertyWithName(\n\t\t\t\"fanState\",\n\t\t\t\"state\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tstates: enumValuesToMetadataStates(ThermostatFanState),\n\t\t\t\tlabel: \"Thermostat fan state\",\n\t\t\t} as const,\n\t\t),\n\t}),\n});\n\n@API(CommandClasses[\"Thermostat Fan State\"])\nexport class ThermostatFanStateCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: ThermostatFanStateCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ThermostatFanStateCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ThermostatFanStateCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"state\":\n\t\t\t\t\treturn this.get();\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatFanStateCommand,\n\t\t\tThermostatFanStateCommand.Get,\n\t\t);\n\n\t\tconst cc = new ThermostatFanStateCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatFanStateCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn response?.state;\n\t\t}\n\t}\n}\n\n@commandClass(CommandClasses[\"Thermostat Fan State\"])\n@implementedVersion(2)\n@ccValues(ThermostatFanStateCCValues)\nexport class ThermostatFanStateCC extends CommandClass {\n\tdeclare ccCommand: ThermostatFanStateCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Fan State\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// Query the current status\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying current thermostat fan state...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst currentStatus = await api.get();\n\t\tif (currentStatus) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"received current thermostat fan state: \"\n\t\t\t\t\t+ getEnumMemberName(ThermostatFanState, currentStatus),\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ThermostatFanStateCCReportOptions {\n\tstate: ThermostatFanState;\n}\n\n@CCCommand(ThermostatFanStateCommand.Report)\n@ccValueProperty(\"state\", ThermostatFanStateCCValues.fanState)\nexport class ThermostatFanStateCCReport extends ThermostatFanStateCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatFanStateCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.state = options.state;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatFanStateCCReport {\n\t\tvalidatePayload(raw.payload.length == 1);\n\t\tconst state: ThermostatFanState = raw.payload[0] & 0b1111;\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tstate,\n\t\t});\n\t}\n\n\tpublic readonly state: ThermostatFanState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tstate: getEnumMemberName(ThermostatFanState, this.state),\n\t\t};\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatFanStateCommand.Get)\n@expectedCCResponse(ThermostatFanStateCCReport)\nexport class ThermostatFanStateCCGet extends ThermostatFanStateCC {}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAUO;AAEP,IAAAA,eAAkC;AAClC,iBAKO;AACP,0BAKO;AACP,oCAQO;AACP,oBAAkB;AAClB,mBAGO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,MAAM,6BAA6B,OAAO,OAAO;EACvD,GAAG,gBAAE,qBAAqB,2BAAe,sBAAsB,GAAG;IACjE,GAAG,gBAAE,uBACJ,YACA,SACA;MACC,GAAG,0BAAc;MACjB,YAAQ,wCAA2B,+BAAkB;MACrD,OAAO;KACE;GAEX;CACD;IAGY,2BAAuB,MAAA;8BADnC,mCAAI,2BAAe,sBAAsB,CAAC,CAAC;;;;oBACC;+CAAA,YAAK;WAAA;;;;;;;;AAAlD,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACL,gBACN,KAA8B;AAE9B,cAAQ,KAAK;QACZ,KAAK,uCAA0B;AAC9B,iBAAO,KAAK,aAAY;MAC1B;AACA,aAAO,MAAM,gBAAgB,GAAG;IACjC;IAEA,KAAe,qBAAU,IAAC;AACzB,aAAO,eAA8C,EAAE,SAAQ,GAAE;AAChE,gBAAQ,UAAU;UACjB,KAAK;AACJ,mBAAO,KAAK,IAAG;UAEhB;AACC,qDAAyB,KAAK,MAAM,QAAQ;QAC9C;MACD;IACD;;IAGO,M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IAUY,8BAA0B,MAAA;8BAFtC,yCAAU,uCAA0B,MAAM,OAC1C,+CAAgB,SAAS,2BAA2B,QAAQ,CAAC;;;;oBACd;kDAAA,YAAoB;WAAA;;;;;;;;AAApE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACZ,YACC,SAAuD;AAEvD,YAAM,OAAO;AAGb,WAAK,QAAQ,QAAQ;IACtB;IAEO,OAAO,KACb,KACA,KAAqB;AAErB,uCAAgB,IAAI,QAAQ,UAAU,CAAC;AACvC,YAAM,QAA4B,IAAI,QAAQ,CAAC,IAAI;AAEnD,aAAO,IAAI,KAAK;QACf,QAAQ,IAAI;QACZ;OACA;IACF;IAEgB;IAET,WAAW,KAAgB;AACjC,YAAM,UAAyB;QAC9B,WAAO,gCAAkB,iCAAoB,KAAK,KAAK;;AAExD,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB;;IAEF;;;;IAKY,2BAAuB,MAAA;8BAFnC,yCAAU,uCAA0B,GAAG,OACvC,kDAAmB,0BAA0B,CAAC;;;;oBACF;+CAAA,YAAoB;WAAA;;;;;;;;AAAjE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;",
4
+ "sourcesContent": ["import { type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\tValueMetadata,\n\ttype WithAddress,\n\tenumValuesToMetadataStates,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { getEnumMemberName } from \"@zwave-js/shared/safe\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tthrowUnsupportedProperty,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tThermostatFanState,\n\tThermostatFanStateCommand,\n} from \"../lib/_Types.js\";\n\nexport const ThermostatFanStateCCValues = V.defineCCValues(\n\tCommandClasses[\"Thermostat Fan State\"],\n\t{\n\t\t...V.staticPropertyWithName(\n\t\t\t\"fanState\",\n\t\t\t\"state\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tstates: enumValuesToMetadataStates(ThermostatFanState),\n\t\t\t\tlabel: \"Thermostat fan state\",\n\t\t\t} as const,\n\t\t),\n\t},\n);\n\n@API(CommandClasses[\"Thermostat Fan State\"])\nexport class ThermostatFanStateCCAPI extends CCAPI {\n\tpublic supportsCommand(\n\t\tcmd: ThermostatFanStateCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ThermostatFanStateCommand.Get:\n\t\t\t\treturn this.isSinglecast();\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ThermostatFanStateCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"state\":\n\t\t\t\t\treturn this.get();\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatFanStateCommand,\n\t\t\tThermostatFanStateCommand.Get,\n\t\t);\n\n\t\tconst cc = new ThermostatFanStateCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatFanStateCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn response?.state;\n\t\t}\n\t}\n}\n\n@commandClass(CommandClasses[\"Thermostat Fan State\"])\n@implementedVersion(2)\n@ccValues(ThermostatFanStateCCValues)\nexport class ThermostatFanStateCC extends CommandClass {\n\tdeclare ccCommand: ThermostatFanStateCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Fan State\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// Query the current status\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying current thermostat fan state...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst currentStatus = await api.get();\n\t\tif (currentStatus) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"received current thermostat fan state: \"\n\t\t\t\t\t+ getEnumMemberName(ThermostatFanState, currentStatus),\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ThermostatFanStateCCReportOptions {\n\tstate: ThermostatFanState;\n}\n\n@CCCommand(ThermostatFanStateCommand.Report)\n@ccValueProperty(\"state\", ThermostatFanStateCCValues.fanState)\nexport class ThermostatFanStateCCReport extends ThermostatFanStateCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatFanStateCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.state = options.state;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatFanStateCCReport {\n\t\tvalidatePayload(raw.payload.length == 1);\n\t\tconst state: ThermostatFanState = raw.payload[0] & 0b1111;\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tstate,\n\t\t});\n\t}\n\n\tpublic readonly state: ThermostatFanState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tstate: getEnumMemberName(ThermostatFanState, this.state),\n\t\t};\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatFanStateCommand.Get)\n@expectedCCResponse(ThermostatFanStateCCReport)\nexport class ThermostatFanStateCCGet extends ThermostatFanStateCC {}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAWO;AACP,IAAAA,eAAkC;AAClC,iBAKO;AACP,0BAKO;AACP,oCAQO;AACP,oBAAkB;AAClB,mBAGO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkBM,2BAAuB,MAAA;8BADnC,mCAAI,2BAAe,sBAAsB,CAAC,CAAC;;;;oBACC;+CAAA,YAAK;WAAA;;;;;;;;AAAlD,m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AA,YAAoB;WAAA;;;;;;;;AAAjE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;",
6
6
  "names": ["import_safe"]
7
7
  }
@@ -1,53 +1,57 @@
1
- import { CommandClasses, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core/safe";
2
- import type { CCEncodingContext, CCParsingContext, GetValueDB } from "@zwave-js/host/safe";
1
+ import { type CCEncodingContext, type CCParsingContext } from "@zwave-js/cc";
2
+ import { CommandClasses, type GetValueDB, type MaybeNotKnown, type MessageOrCCLogEntry, type SupervisionResult, type WithAddress } from "@zwave-js/core/safe";
3
3
  import { Bytes } from "@zwave-js/shared/safe";
4
4
  import { CCAPI, POLL_VALUE, type PollValueImplementation, SET_VALUE, type SetValueImplementation } from "../lib/API.js";
5
5
  import { type CCRaw, CommandClass, type InterviewContext, type PersistValuesContext, type RefreshValuesContext } from "../lib/CommandClass.js";
6
6
  import { ThermostatMode, ThermostatModeCommand } from "../lib/_Types.js";
7
7
  export declare const ThermostatModeCCValues: Readonly<{
8
- supportedModes: {
9
- readonly id: {
10
- commandClass: (typeof CommandClasses)["Thermostat Mode"];
11
- property: "supportedModes";
8
+ thermostatMode: {
9
+ id: {
10
+ readonly commandClass: (typeof CommandClasses)["Thermostat Mode"];
11
+ readonly property: "mode";
12
12
  };
13
- readonly endpoint: (endpoint?: number | undefined) => {
13
+ endpoint: (endpoint?: number) => {
14
14
  readonly commandClass: (typeof CommandClasses)["Thermostat Mode"];
15
15
  readonly endpoint: number;
16
- readonly property: "supportedModes";
16
+ readonly property: "mode";
17
17
  };
18
- readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
18
+ is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
19
19
  readonly meta: {
20
- readonly type: "any";
20
+ readonly states: Record<number, string>;
21
+ readonly label: "Thermostat mode";
22
+ readonly min: 0;
23
+ readonly max: 255;
24
+ readonly type: "number";
21
25
  readonly readable: true;
22
26
  readonly writeable: true;
23
27
  };
24
- readonly options: {
25
- readonly stateful: true;
26
- readonly secret: false;
28
+ options: {
29
+ readonly internal: false;
27
30
  readonly minVersion: 1;
31
+ readonly secret: false;
32
+ readonly stateful: true;
28
33
  readonly supportsEndpoints: true;
29
34
  readonly autoCreate: true;
30
- readonly internal: true;
31
35
  };
32
36
  };
33
37
  manufacturerData: {
34
- readonly id: {
35
- commandClass: (typeof CommandClasses)["Thermostat Mode"];
36
- property: "manufacturerData";
38
+ id: {
39
+ readonly commandClass: (typeof CommandClasses)["Thermostat Mode"];
40
+ readonly property: "manufacturerData";
37
41
  };
38
- readonly endpoint: (endpoint?: number | undefined) => {
42
+ endpoint: (endpoint?: number) => {
39
43
  readonly commandClass: (typeof CommandClasses)["Thermostat Mode"];
40
44
  readonly endpoint: number;
41
45
  readonly property: "manufacturerData";
42
46
  };
43
- readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
47
+ is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
44
48
  readonly meta: {
45
49
  readonly label: "Manufacturer data";
46
50
  readonly writeable: false;
47
51
  readonly type: "buffer";
48
52
  readonly readable: true;
49
53
  };
50
- readonly options: {
54
+ options: {
51
55
  readonly internal: false;
52
56
  readonly minVersion: 1;
53
57
  readonly secret: false;
@@ -56,30 +60,24 @@ export declare const ThermostatModeCCValues: Readonly<{
56
60
  readonly autoCreate: true;
57
61
  };
58
62
  };
59
- thermostatMode: {
60
- readonly id: {
61
- commandClass: (typeof CommandClasses)["Thermostat Mode"];
62
- property: "mode";
63
+ supportedModes: {
64
+ id: {
65
+ readonly commandClass: (typeof CommandClasses)["Thermostat Mode"];
66
+ readonly property: "supportedModes";
63
67
  };
64
- readonly endpoint: (endpoint?: number | undefined) => {
68
+ endpoint: (endpoint?: number) => {
65
69
  readonly commandClass: (typeof CommandClasses)["Thermostat Mode"];
66
70
  readonly endpoint: number;
67
- readonly property: "mode";
71
+ readonly property: "supportedModes";
68
72
  };
69
- readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
70
- readonly meta: {
71
- readonly states: {
72
- [x: number]: string;
73
- };
74
- readonly label: "Thermostat mode";
75
- readonly min: 0;
76
- readonly max: 255;
77
- readonly type: "number";
73
+ is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
74
+ readonly meta: Readonly<{
75
+ readonly type: "any";
78
76
  readonly readable: true;
79
77
  readonly writeable: true;
80
- };
81
- readonly options: {
82
- readonly internal: false;
78
+ }>;
79
+ options: {
80
+ readonly internal: true;
83
81
  readonly minVersion: 1;
84
82
  readonly secret: false;
85
83
  readonly stateful: true;
@@ -113,7 +111,7 @@ export declare class ThermostatModeCCSet extends ThermostatModeCC {
113
111
  static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCSet;
114
112
  mode: ThermostatMode;
115
113
  manufacturerData?: Uint8Array;
116
- serialize(ctx: CCEncodingContext): Bytes;
114
+ serialize(ctx: CCEncodingContext): Promise<Bytes>;
117
115
  toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
118
116
  }
119
117
  export type ThermostatModeCCReportOptions = {
@@ -129,7 +127,7 @@ export declare class ThermostatModeCCReport extends ThermostatModeCC {
129
127
  persistValues(ctx: PersistValuesContext): boolean;
130
128
  readonly mode: ThermostatMode;
131
129
  readonly manufacturerData: Uint8Array | undefined;
132
- serialize(ctx: CCEncodingContext): Bytes;
130
+ serialize(ctx: CCEncodingContext): Promise<Bytes>;
133
131
  toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
134
132
  }
135
133
  export declare class ThermostatModeCCGet extends ThermostatModeCC {
@@ -142,7 +140,7 @@ export declare class ThermostatModeCCSupportedReport extends ThermostatModeCC {
142
140
  static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCSupportedReport;
143
141
  persistValues(ctx: PersistValuesContext): boolean;
144
142
  readonly supportedModes: ThermostatMode[];
145
- serialize(ctx: CCEncodingContext): Bytes;
143
+ serialize(ctx: CCEncodingContext): Promise<Bytes>;
146
144
  toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry;
147
145
  }
148
146
  export declare class ThermostatModeCCSupportedGet extends ThermostatModeCC {
@@ -36,7 +36,7 @@ __export(ThermostatModeCC_exports, {
36
36
  ThermostatModeCCSet: () => ThermostatModeCCSet,
37
37
  ThermostatModeCCSupportedGet: () => ThermostatModeCCSupportedGet,
38
38
  ThermostatModeCCSupportedReport: () => ThermostatModeCCSupportedReport,
39
- ThermostatModeCCValues: () => ThermostatModeCCValues
39
+ ThermostatModeCCValues: () => import_CCValues_generated.ThermostatModeCCValues
40
40
  });
41
41
  module.exports = __toCommonJS(ThermostatModeCC_exports);
42
42
  var __validateArgs = __toESM(require("./ThermostatModeCC._validateArgs.js"), 1);
@@ -48,6 +48,7 @@ var import_CommandClass = require("../lib/CommandClass.js");
48
48
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
49
49
  var import_Values = require("../lib/Values.js");
50
50
  var import_Types = require("../lib/_Types.js");
51
+ var import_CCValues_generated = require("./_CCValues.generated.js");
51
52
  var __runInitializers = function(thisArg, initializers, value) {
52
53
  var useValue = arguments.length > 2;
53
54
  for (var i = 0; i < initializers.length; i++) {
@@ -89,20 +90,6 @@ var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializ
89
90
  done = true;
90
91
  };
91
92
  const { validateArgs_ThermostatModeCCAPI_set } = __validateArgs;
92
- const ThermostatModeCCValues = Object.freeze({
93
- ...import_Values.V.defineStaticCCValues(import_safe.CommandClasses["Thermostat Mode"], {
94
- ...import_Values.V.staticPropertyWithName("thermostatMode", "mode", {
95
- ...import_safe.ValueMetadata.UInt8,
96
- states: (0, import_safe.enumValuesToMetadataStates)(import_Types.ThermostatMode),
97
- label: "Thermostat mode"
98
- }),
99
- ...import_Values.V.staticProperty("manufacturerData", {
100
- ...import_safe.ValueMetadata.ReadOnlyBuffer,
101
- label: "Manufacturer data"
102
- }),
103
- ...import_Values.V.staticProperty("supportedModes", void 0, { internal: true })
104
- })
105
- });
106
93
  let ThermostatModeCCAPI = (() => {
107
94
  let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Thermostat Mode"])];
108
95
  let _classDescriptor;
@@ -207,7 +194,7 @@ let ThermostatModeCCAPI = (() => {
207
194
  return ThermostatModeCCAPI2 = _classThis;
208
195
  })();
209
196
  let ThermostatModeCC = (() => {
210
- let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Thermostat Mode"]), (0, import_CommandClassDecorators.implementedVersion)(3), (0, import_CommandClassDecorators.ccValues)(ThermostatModeCCValues)];
197
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Thermostat Mode"]), (0, import_CommandClassDecorators.implementedVersion)(3), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.ThermostatModeCCValues)];
211
198
  let _classDescriptor;
212
199
  let _classExtraInitializers = [];
213
200
  let _classThis;
@@ -359,7 +346,7 @@ let ThermostatModeCCSet = (() => {
359
346
  return ThermostatModeCCSet2 = _classThis;
360
347
  })();
361
348
  let ThermostatModeCCReport = (() => {
362
- let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatModeCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("mode", ThermostatModeCCValues.thermostatMode), (0, import_CommandClassDecorators.ccValueProperty)("manufacturerData", ThermostatModeCCValues.manufacturerData)];
349
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatModeCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("mode", import_CCValues_generated.ThermostatModeCCValues.thermostatMode), (0, import_CommandClassDecorators.ccValueProperty)("manufacturerData", import_CCValues_generated.ThermostatModeCCValues.manufacturerData)];
363
350
  let _classDescriptor;
364
351
  let _classExtraInitializers = [];
365
352
  let _classThis;
@@ -404,8 +391,8 @@ let ThermostatModeCCReport = (() => {
404
391
  persistValues(ctx) {
405
392
  if (!super.persistValues(ctx))
406
393
  return false;
407
- const thermostatModeValue = ThermostatModeCCValues.thermostatMode;
408
- const supportedModesValue = ThermostatModeCCValues.supportedModes;
394
+ const thermostatModeValue = import_CCValues_generated.ThermostatModeCCValues.thermostatMode;
395
+ const supportedModesValue = import_CCValues_generated.ThermostatModeCCValues.supportedModes;
409
396
  const supportedModes = this.getValue(ctx, supportedModesValue);
410
397
  if (supportedModes && this.mode in import_Types.ThermostatMode && !supportedModes.includes(this.mode)) {
411
398
  supportedModes.push(this.mode);
@@ -468,7 +455,7 @@ let ThermostatModeCCGet = (() => {
468
455
  return ThermostatModeCCGet2 = _classThis;
469
456
  })();
470
457
  let ThermostatModeCCSupportedReport = (() => {
471
- let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatModeCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedModes", ThermostatModeCCValues.supportedModes)];
458
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatModeCommand.SupportedReport), (0, import_CommandClassDecorators.ccValueProperty)("supportedModes", import_CCValues_generated.ThermostatModeCCValues.supportedModes)];
472
459
  let _classDescriptor;
473
460
  let _classExtraInitializers = [];
474
461
  let _classThis;
@@ -501,7 +488,7 @@ let ThermostatModeCCSupportedReport = (() => {
501
488
  persistValues(ctx) {
502
489
  if (!super.persistValues(ctx))
503
490
  return false;
504
- const thermostatModeValue = ThermostatModeCCValues.thermostatMode;
491
+ const thermostatModeValue = import_CCValues_generated.ThermostatModeCCValues.thermostatMode;
505
492
  this.setMetadata(ctx, thermostatModeValue, {
506
493
  ...thermostatModeValue.meta,
507
494
  states: (0, import_safe.enumValuesToMetadataStates)(import_Types.ThermostatMode, this.supportedModes)
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cc/ThermostatModeCC.ts"],
4
- "sourcesContent": ["import {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tencodeBitMask,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tsupervisedCommandSucceeded,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type {\n\tCCEncodingContext,\n\tCCParsingContext,\n\tGetValueDB,\n} from \"@zwave-js/host/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { buffer2hex, getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ThermostatMode, ThermostatModeCommand } from \"../lib/_Types.js\";\n\nexport const ThermostatModeCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Thermostat Mode\"], {\n\t\t...V.staticPropertyWithName(\n\t\t\t\"thermostatMode\",\n\t\t\t\"mode\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tstates: enumValuesToMetadataStates(ThermostatMode),\n\t\t\t\tlabel: \"Thermostat mode\",\n\t\t\t} as const,\n\t\t),\n\n\t\t...V.staticProperty(\n\t\t\t\"manufacturerData\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyBuffer,\n\t\t\t\tlabel: \"Manufacturer data\",\n\t\t\t} as const,\n\t\t),\n\n\t\t...V.staticProperty(\"supportedModes\", undefined, { internal: true }),\n\t}),\n});\n\n@API(CommandClasses[\"Thermostat Mode\"])\nexport class ThermostatModeCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: ThermostatModeCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ThermostatModeCommand.Get:\n\t\t\tcase ThermostatModeCommand.SupportedGet:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase ThermostatModeCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: ThermostatModeCCAPI, { property }, value) {\n\t\t\tif (property !== \"mode\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"number\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"number\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst result = await this.set(value);\n\n\t\t\t// Verify the current value after a delay, unless the command was supervised and successful\n\t\t\tif (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n\t\t\t\t// TODO: Ideally this would be a short delay, but some thermostats like Remotec ZXT-600\n\t\t\t\t// aren't able to handle the GET this quickly.\n\t\t\t\tthis.schedulePoll({ property }, value);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ThermostatModeCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"mode\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatModeCommand,\n\t\t\tThermostatModeCommand.Get,\n\t\t);\n\n\t\tconst cc = new ThermostatModeCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatModeCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"mode\", \"manufacturerData\"]);\n\t\t}\n\t}\n\n\tpublic async set(\n\t\tmode: Exclude<\n\t\t\tThermostatMode,\n\t\t\t(typeof ThermostatMode)[\"Manufacturer specific\"]\n\t\t>,\n\t): Promise<SupervisionResult | undefined>;\n\tpublic async set(\n\t\tmode: (typeof ThermostatMode)[\"Manufacturer specific\"],\n\t\tmanufacturerData: Uint8Array | string,\n\t): Promise<SupervisionResult | undefined>;\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tmode: ThermostatMode,\n\t\tmanufacturerData?: Uint8Array | string,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatModeCommand,\n\t\t\tThermostatModeCommand.Set,\n\t\t);\n\n\t\tif (typeof manufacturerData === \"string\") {\n\t\t\t// We accept the manufacturer data as a hex string. Make sure it's valid\n\t\t\tif (\n\t\t\t\tmanufacturerData.length % 2 !== 0\n\t\t\t\t|| !/^[0-9a-f]+$/i.test(manufacturerData)\n\t\t\t) {\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t`Manufacturer data must be represented as hexadecimal when passed as a string!`,\n\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t);\n\t\t\t}\n\t\t\tmanufacturerData = Bytes.from(manufacturerData, \"hex\");\n\t\t}\n\n\t\tconst cc = new ThermostatModeCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tmode,\n\t\t\tmanufacturerData: manufacturerData as any,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tpublic async getSupportedModes(): Promise<\n\t\tMaybeNotKnown<readonly ThermostatMode[]>\n\t> {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatModeCommand,\n\t\t\tThermostatModeCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new ThermostatModeCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatModeCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedModes;\n\t}\n}\n\n@commandClass(CommandClasses[\"Thermostat Mode\"])\n@implementedVersion(3)\n@ccValues(ThermostatModeCCValues)\nexport class ThermostatModeCC extends CommandClass {\n\tdeclare ccCommand: ThermostatModeCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Mode\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// First query the possible modes to set the metadata\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying supported thermostat modes...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst supportedModes = await api.getSupportedModes();\n\t\tif (supportedModes) {\n\t\t\tconst logMessage = `received supported thermostat modes:${\n\t\t\t\tsupportedModes\n\t\t\t\t\t.map((mode) =>\n\t\t\t\t\t\t`\\n\u00B7 ${getEnumMemberName(ThermostatMode, mode)}`\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\")\n\t\t\t}`;\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Querying supported thermostat modes timed out, skipping interview...\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Mode\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// Query the current status\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying current thermostat mode...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst currentStatus = await api.get();\n\t\tif (currentStatus) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"received current thermostat mode: \"\n\t\t\t\t\t+ getEnumMemberName(ThermostatMode, currentStatus.mode),\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport type ThermostatModeCCSetOptions =\n\t| {\n\t\tmode: Exclude<\n\t\t\tThermostatMode,\n\t\t\t(typeof ThermostatMode)[\"Manufacturer specific\"]\n\t\t>;\n\t}\n\t| {\n\t\tmode: (typeof ThermostatMode)[\"Manufacturer specific\"];\n\t\tmanufacturerData: Uint8Array;\n\t};\n\n@CCCommand(ThermostatModeCommand.Set)\n@useSupervision()\nexport class ThermostatModeCCSet extends ThermostatModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatModeCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.mode = options.mode;\n\t\tif (\"manufacturerData\" in options) {\n\t\t\tthis.manufacturerData = options.manufacturerData;\n\t\t}\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst mode: ThermostatMode = raw.payload[0] & 0b11111;\n\t\tif (mode !== ThermostatMode[\"Manufacturer specific\"]) {\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\tmode,\n\t\t\t});\n\t\t}\n\n\t\tconst manufacturerDataLength = (raw.payload[0] >>> 5) & 0b111;\n\t\tvalidatePayload(\n\t\t\traw.payload.length >= 1 + manufacturerDataLength,\n\t\t);\n\t\tconst manufacturerData = raw.payload.subarray(\n\t\t\t1,\n\t\t\t1 + manufacturerDataLength,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tmode,\n\t\t\tmanufacturerData,\n\t\t});\n\t}\n\n\tpublic mode: ThermostatMode;\n\tpublic manufacturerData?: Uint8Array;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tconst manufacturerData =\n\t\t\tthis.mode === ThermostatMode[\"Manufacturer specific\"]\n\t\t\t\t&& this.manufacturerData\n\t\t\t\t? this.manufacturerData\n\t\t\t\t: new Uint8Array();\n\t\tconst manufacturerDataLength = manufacturerData.length;\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([\n\t\t\t\t((manufacturerDataLength & 0b111) << 5) + (this.mode & 0b11111),\n\t\t\t]),\n\t\t\tmanufacturerData,\n\t\t]);\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tmode: getEnumMemberName(ThermostatMode, this.mode),\n\t\t};\n\t\tif (this.manufacturerData != undefined) {\n\t\t\tmessage[\"manufacturer data\"] = buffer2hex(this.manufacturerData);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport type ThermostatModeCCReportOptions =\n\t| {\n\t\tmode: Exclude<\n\t\t\tThermostatMode,\n\t\t\t(typeof ThermostatMode)[\"Manufacturer specific\"]\n\t\t>;\n\t\tmanufacturerData?: undefined;\n\t}\n\t| {\n\t\tmode: (typeof ThermostatMode)[\"Manufacturer specific\"];\n\t\tmanufacturerData?: Uint8Array;\n\t};\n\n@CCCommand(ThermostatModeCommand.Report)\n@ccValueProperty(\"mode\", ThermostatModeCCValues.thermostatMode)\n@ccValueProperty(\"manufacturerData\", ThermostatModeCCValues.manufacturerData)\nexport class ThermostatModeCCReport extends ThermostatModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatModeCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.mode = options.mode;\n\t\tthis.manufacturerData = options.manufacturerData;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatModeCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst mode: ThermostatMode = raw.payload[0] & 0b11111;\n\n\t\tif (mode !== ThermostatMode[\"Manufacturer specific\"]) {\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\tmode,\n\t\t\t});\n\t\t}\n\n\t\t// V3+\n\t\tconst manufacturerDataLength = raw.payload[0] >>> 5;\n\t\tvalidatePayload(\n\t\t\traw.payload.length >= 1 + manufacturerDataLength,\n\t\t);\n\t\tconst manufacturerData = raw.payload.subarray(\n\t\t\t1,\n\t\t\t1 + manufacturerDataLength,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tmode,\n\t\t\tmanufacturerData,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Update the supported modes if a mode is used that wasn't previously\n\t\t// reported to be supported. This shouldn't happen, but well... it does anyways\n\t\tconst thermostatModeValue = ThermostatModeCCValues.thermostatMode;\n\t\tconst supportedModesValue = ThermostatModeCCValues.supportedModes;\n\n\t\tconst supportedModes = this.getValue<ThermostatMode[]>(\n\t\t\tctx,\n\t\t\tsupportedModesValue,\n\t\t);\n\n\t\tif (\n\t\t\tsupportedModes\n\t\t\t&& this.mode in ThermostatMode\n\t\t\t&& !supportedModes.includes(this.mode)\n\t\t) {\n\t\t\tsupportedModes.push(this.mode);\n\t\t\tsupportedModes.sort();\n\n\t\t\tthis.setMetadata(ctx, thermostatModeValue, {\n\t\t\t\t...thermostatModeValue.meta,\n\t\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\t\tThermostatMode,\n\t\t\t\t\tsupportedModes,\n\t\t\t\t),\n\t\t\t});\n\t\t\tthis.setValue(ctx, supportedModesValue, supportedModes);\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic readonly mode: ThermostatMode;\n\n\tpublic readonly manufacturerData: Uint8Array | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tconst manufacturerDataLength =\n\t\t\tthis.mode === ThermostatMode[\"Manufacturer specific\"]\n\t\t\t\t&& this.manufacturerData\n\t\t\t\t? Math.min(0b111, this.manufacturerData.length)\n\t\t\t\t: 0;\n\t\tthis.payload = new Bytes(1 + manufacturerDataLength);\n\t\tthis.payload[0] = (manufacturerDataLength << 5) + (this.mode & 0b11111);\n\t\tif (manufacturerDataLength && this.manufacturerData) {\n\t\t\tthis.payload.set(\n\t\t\t\tthis.manufacturerData.subarray(0, manufacturerDataLength),\n\t\t\t\t1,\n\t\t\t);\n\t\t}\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tmode: getEnumMemberName(ThermostatMode, this.mode),\n\t\t};\n\t\tif (this.manufacturerData != undefined) {\n\t\t\tmessage[\"manufacturer data\"] = buffer2hex(this.manufacturerData);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatModeCommand.Get)\n@expectedCCResponse(ThermostatModeCCReport)\nexport class ThermostatModeCCGet extends ThermostatModeCC {}\n\n// @publicAPI\nexport interface ThermostatModeCCSupportedReportOptions {\n\tsupportedModes: ThermostatMode[];\n}\n\n@CCCommand(ThermostatModeCommand.SupportedReport)\n@ccValueProperty(\"supportedModes\", ThermostatModeCCValues.supportedModes)\nexport class ThermostatModeCCSupportedReport extends ThermostatModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatModeCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.supportedModes = options.supportedModes;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatModeCCSupportedReport {\n\t\tconst supportedModes: ThermostatMode[] = parseBitMask(\n\t\t\traw.payload,\n\t\t\tThermostatMode.Off,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedModes,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Use this information to create the metadata for the mode property\n\t\tconst thermostatModeValue = ThermostatModeCCValues.thermostatMode;\n\t\tthis.setMetadata(ctx, thermostatModeValue, {\n\t\t\t...thermostatModeValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tThermostatMode,\n\t\t\t\tthis.supportedModes,\n\t\t\t),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportedModes: ThermostatMode[];\n\n\tpublic serialize(ctx: CCEncodingContext): Bytes {\n\t\tthis.payload = encodeBitMask(\n\t\t\tthis.supportedModes,\n\t\t\tThermostatMode[\"Manufacturer specific\"],\n\t\t\tThermostatMode.Off,\n\t\t);\n\t\t// eslint-disable-next-line @typescript-eslint/no-deprecated\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supported modes\": this.supportedModes\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(mode) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${getEnumMemberName(ThermostatMode, mode)}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatModeCommand.SupportedGet)\n@expectedCCResponse(ThermostatModeCCSupportedReport)\nexport class ThermostatModeCCSupportedGet extends ThermostatModeCC {}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kBAgBO;AAMP,IAAAA,eAAsB;AACtB,IAAAA,eAAoD;AAEpD,iBAQO;AACP,0BAMO;AACP,oCASO;AACP,oBAAkB;AAClB,mBAAsD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAE/C,MAAM,yBAAyB,OAAO,OAAO;EACnD,GAAG,gBAAE,qBAAqB,2BAAe,iBAAiB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,KAAK,EAAE;;;IAGZ;;;;IAKY,gCAA4B,MAAA;8BAFxC,yCAAU,mCAAsB,YAAY,OAC5C,kDAAmB,+BAA+B,CAAC;;;;oBACF;oDAAA,YAAgB;WAAA;;;;;;;;AAAlE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;",
4
+ "sourcesContent": ["import { type CCEncodingContext, type CCParsingContext } from \"@zwave-js/cc\";\nimport {\n\tCommandClasses,\n\ttype GetValueDB,\n\ttype MaybeNotKnown,\n\ttype MessageOrCCLogEntry,\n\tMessagePriority,\n\ttype MessageRecord,\n\ttype SupervisionResult,\n\tValueMetadata,\n\ttype WithAddress,\n\tZWaveError,\n\tZWaveErrorCodes,\n\tencodeBitMask,\n\tenumValuesToMetadataStates,\n\tparseBitMask,\n\tsupervisedCommandSucceeded,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { Bytes } from \"@zwave-js/shared/safe\";\nimport { buffer2hex, getEnumMemberName, pick } from \"@zwave-js/shared/safe\";\nimport { validateArgs } from \"@zwave-js/transformers\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\ttype PollValueImplementation,\n\tSET_VALUE,\n\ttype SetValueImplementation,\n\tthrowUnsupportedProperty,\n\tthrowWrongValueType,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype PersistValuesContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n\tuseSupervision,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport { ThermostatMode, ThermostatModeCommand } from \"../lib/_Types.js\";\n\nexport const ThermostatModeCCValues = V.defineCCValues(\n\tCommandClasses[\"Thermostat Mode\"],\n\t{\n\t\t...V.staticPropertyWithName(\n\t\t\t\"thermostatMode\",\n\t\t\t\"mode\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.UInt8,\n\t\t\t\tstates: enumValuesToMetadataStates(ThermostatMode),\n\t\t\t\tlabel: \"Thermostat mode\",\n\t\t\t} as const,\n\t\t),\n\t\t...V.staticProperty(\n\t\t\t\"manufacturerData\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyBuffer,\n\t\t\t\tlabel: \"Manufacturer data\",\n\t\t\t} as const,\n\t\t),\n\t\t...V.staticProperty(\"supportedModes\", undefined, { internal: true }),\n\t},\n);\n\n@API(CommandClasses[\"Thermostat Mode\"])\nexport class ThermostatModeCCAPI extends CCAPI {\n\tpublic supportsCommand(cmd: ThermostatModeCommand): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ThermostatModeCommand.Get:\n\t\t\tcase ThermostatModeCommand.SupportedGet:\n\t\t\t\treturn this.isSinglecast();\n\t\t\tcase ThermostatModeCommand.Set:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected override get [SET_VALUE](): SetValueImplementation {\n\t\treturn async function(this: ThermostatModeCCAPI, { property }, value) {\n\t\t\tif (property !== \"mode\") {\n\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t\tif (typeof value !== \"number\") {\n\t\t\t\tthrowWrongValueType(\n\t\t\t\t\tthis.ccId,\n\t\t\t\t\tproperty,\n\t\t\t\t\t\"number\",\n\t\t\t\t\ttypeof value,\n\t\t\t\t);\n\t\t\t}\n\t\t\tconst result = await this.set(value);\n\n\t\t\t// Verify the current value after a delay, unless the command was supervised and successful\n\t\t\tif (this.isSinglecast() && !supervisedCommandSucceeded(result)) {\n\t\t\t\t// TODO: Ideally this would be a short delay, but some thermostats like Remotec ZXT-600\n\t\t\t\t// aren't able to handle the GET this quickly.\n\t\t\t\tthis.schedulePoll({ property }, value);\n\t\t\t}\n\n\t\t\treturn result;\n\t\t};\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(this: ThermostatModeCCAPI, { property }) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"mode\":\n\t\t\t\t\treturn (await this.get())?.[property];\n\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\t// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types\n\tpublic async get() {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatModeCommand,\n\t\t\tThermostatModeCommand.Get,\n\t\t);\n\n\t\tconst cc = new ThermostatModeCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatModeCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\tif (response) {\n\t\t\treturn pick(response, [\"mode\", \"manufacturerData\"]);\n\t\t}\n\t}\n\n\tpublic async set(\n\t\tmode: Exclude<\n\t\t\tThermostatMode,\n\t\t\t(typeof ThermostatMode)[\"Manufacturer specific\"]\n\t\t>,\n\t): Promise<SupervisionResult | undefined>;\n\tpublic async set(\n\t\tmode: (typeof ThermostatMode)[\"Manufacturer specific\"],\n\t\tmanufacturerData: Uint8Array | string,\n\t): Promise<SupervisionResult | undefined>;\n\n\t@validateArgs({ strictEnums: true })\n\tpublic async set(\n\t\tmode: ThermostatMode,\n\t\tmanufacturerData?: Uint8Array | string,\n\t): Promise<SupervisionResult | undefined> {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatModeCommand,\n\t\t\tThermostatModeCommand.Set,\n\t\t);\n\n\t\tif (typeof manufacturerData === \"string\") {\n\t\t\t// We accept the manufacturer data as a hex string. Make sure it's valid\n\t\t\tif (\n\t\t\t\tmanufacturerData.length % 2 !== 0\n\t\t\t\t|| !/^[0-9a-f]+$/i.test(manufacturerData)\n\t\t\t) {\n\t\t\t\tthrow new ZWaveError(\n\t\t\t\t\t`Manufacturer data must be represented as hexadecimal when passed as a string!`,\n\t\t\t\t\tZWaveErrorCodes.Argument_Invalid,\n\t\t\t\t);\n\t\t\t}\n\t\t\tmanufacturerData = Bytes.from(manufacturerData, \"hex\");\n\t\t}\n\n\t\tconst cc = new ThermostatModeCCSet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t\tmode,\n\t\t\tmanufacturerData: manufacturerData as any,\n\t\t});\n\t\treturn this.host.sendCommand(cc, this.commandOptions);\n\t}\n\n\tpublic async getSupportedModes(): Promise<\n\t\tMaybeNotKnown<readonly ThermostatMode[]>\n\t> {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatModeCommand,\n\t\t\tThermostatModeCommand.SupportedGet,\n\t\t);\n\n\t\tconst cc = new ThermostatModeCCSupportedGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatModeCCSupportedReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.supportedModes;\n\t}\n}\n\n@commandClass(CommandClasses[\"Thermostat Mode\"])\n@implementedVersion(3)\n@ccValues(ThermostatModeCCValues)\nexport class ThermostatModeCC extends CommandClass {\n\tdeclare ccCommand: ThermostatModeCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Mode\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\t// First query the possible modes to set the metadata\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying supported thermostat modes...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst supportedModes = await api.getSupportedModes();\n\t\tif (supportedModes) {\n\t\t\tconst logMessage = `received supported thermostat modes:${\n\t\t\t\tsupportedModes\n\t\t\t\t\t.map((mode) =>\n\t\t\t\t\t\t`\\n\u00B7 ${getEnumMemberName(ThermostatMode, mode)}`\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\")\n\t\t\t}`;\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: logMessage,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t} else {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage:\n\t\t\t\t\t\"Querying supported thermostat modes timed out, skipping interview...\",\n\t\t\t\tlevel: \"warn\",\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Mode\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// Query the current status\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying current thermostat mode...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\t\tconst currentStatus = await api.get();\n\t\tif (currentStatus) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: \"received current thermostat mode: \"\n\t\t\t\t\t+ getEnumMemberName(ThermostatMode, currentStatus.mode),\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport type ThermostatModeCCSetOptions =\n\t| {\n\t\tmode: Exclude<\n\t\t\tThermostatMode,\n\t\t\t(typeof ThermostatMode)[\"Manufacturer specific\"]\n\t\t>;\n\t}\n\t| {\n\t\tmode: (typeof ThermostatMode)[\"Manufacturer specific\"];\n\t\tmanufacturerData: Uint8Array;\n\t};\n\n@CCCommand(ThermostatModeCommand.Set)\n@useSupervision()\nexport class ThermostatModeCCSet extends ThermostatModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatModeCCSetOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.mode = options.mode;\n\t\tif (\"manufacturerData\" in options) {\n\t\t\tthis.manufacturerData = options.manufacturerData;\n\t\t}\n\t}\n\n\tpublic static from(raw: CCRaw, ctx: CCParsingContext): ThermostatModeCCSet {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst mode: ThermostatMode = raw.payload[0] & 0b11111;\n\t\tif (mode !== ThermostatMode[\"Manufacturer specific\"]) {\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\tmode,\n\t\t\t});\n\t\t}\n\n\t\tconst manufacturerDataLength = (raw.payload[0] >>> 5) & 0b111;\n\t\tvalidatePayload(\n\t\t\traw.payload.length >= 1 + manufacturerDataLength,\n\t\t);\n\t\tconst manufacturerData = raw.payload.subarray(\n\t\t\t1,\n\t\t\t1 + manufacturerDataLength,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tmode,\n\t\t\tmanufacturerData,\n\t\t});\n\t}\n\n\tpublic mode: ThermostatMode;\n\tpublic manufacturerData?: Uint8Array;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst manufacturerData =\n\t\t\tthis.mode === ThermostatMode[\"Manufacturer specific\"]\n\t\t\t\t&& this.manufacturerData\n\t\t\t\t? this.manufacturerData\n\t\t\t\t: new Uint8Array();\n\t\tconst manufacturerDataLength = manufacturerData.length;\n\t\tthis.payload = Bytes.concat([\n\t\t\tBytes.from([\n\t\t\t\t((manufacturerDataLength & 0b111) << 5) + (this.mode & 0b11111),\n\t\t\t]),\n\t\t\tmanufacturerData,\n\t\t]);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tmode: getEnumMemberName(ThermostatMode, this.mode),\n\t\t};\n\t\tif (this.manufacturerData != undefined) {\n\t\t\tmessage[\"manufacturer data\"] = buffer2hex(this.manufacturerData);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n// @publicAPI\nexport type ThermostatModeCCReportOptions =\n\t| {\n\t\tmode: Exclude<\n\t\t\tThermostatMode,\n\t\t\t(typeof ThermostatMode)[\"Manufacturer specific\"]\n\t\t>;\n\t\tmanufacturerData?: undefined;\n\t}\n\t| {\n\t\tmode: (typeof ThermostatMode)[\"Manufacturer specific\"];\n\t\tmanufacturerData?: Uint8Array;\n\t};\n\n@CCCommand(ThermostatModeCommand.Report)\n@ccValueProperty(\"mode\", ThermostatModeCCValues.thermostatMode)\n@ccValueProperty(\"manufacturerData\", ThermostatModeCCValues.manufacturerData)\nexport class ThermostatModeCCReport extends ThermostatModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatModeCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\tthis.mode = options.mode;\n\t\tthis.manufacturerData = options.manufacturerData;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatModeCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst mode: ThermostatMode = raw.payload[0] & 0b11111;\n\n\t\tif (mode !== ThermostatMode[\"Manufacturer specific\"]) {\n\t\t\treturn new this({\n\t\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\t\tmode,\n\t\t\t});\n\t\t}\n\n\t\t// V3+\n\t\tconst manufacturerDataLength = raw.payload[0] >>> 5;\n\t\tvalidatePayload(\n\t\t\traw.payload.length >= 1 + manufacturerDataLength,\n\t\t);\n\t\tconst manufacturerData = raw.payload.subarray(\n\t\t\t1,\n\t\t\t1 + manufacturerDataLength,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tmode,\n\t\t\tmanufacturerData,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Update the supported modes if a mode is used that wasn't previously\n\t\t// reported to be supported. This shouldn't happen, but well... it does anyways\n\t\tconst thermostatModeValue = ThermostatModeCCValues.thermostatMode;\n\t\tconst supportedModesValue = ThermostatModeCCValues.supportedModes;\n\n\t\tconst supportedModes = this.getValue<ThermostatMode[]>(\n\t\t\tctx,\n\t\t\tsupportedModesValue,\n\t\t);\n\n\t\tif (\n\t\t\tsupportedModes\n\t\t\t&& this.mode in ThermostatMode\n\t\t\t&& !supportedModes.includes(this.mode)\n\t\t) {\n\t\t\tsupportedModes.push(this.mode);\n\t\t\tsupportedModes.sort();\n\n\t\t\tthis.setMetadata(ctx, thermostatModeValue, {\n\t\t\t\t...thermostatModeValue.meta,\n\t\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\t\tThermostatMode,\n\t\t\t\t\tsupportedModes,\n\t\t\t\t),\n\t\t\t});\n\t\t\tthis.setValue(ctx, supportedModesValue, supportedModes);\n\t\t}\n\t\treturn true;\n\t}\n\n\tpublic readonly mode: ThermostatMode;\n\n\tpublic readonly manufacturerData: Uint8Array | undefined;\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tconst manufacturerDataLength =\n\t\t\tthis.mode === ThermostatMode[\"Manufacturer specific\"]\n\t\t\t\t&& this.manufacturerData\n\t\t\t\t? Math.min(0b111, this.manufacturerData.length)\n\t\t\t\t: 0;\n\t\tthis.payload = new Bytes(1 + manufacturerDataLength);\n\t\tthis.payload[0] = (manufacturerDataLength << 5) + (this.mode & 0b11111);\n\t\tif (manufacturerDataLength && this.manufacturerData) {\n\t\t\tthis.payload.set(\n\t\t\t\tthis.manufacturerData.subarray(0, manufacturerDataLength),\n\t\t\t\t1,\n\t\t\t);\n\t\t}\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\tconst message: MessageRecord = {\n\t\t\tmode: getEnumMemberName(ThermostatMode, this.mode),\n\t\t};\n\t\tif (this.manufacturerData != undefined) {\n\t\t\tmessage[\"manufacturer data\"] = buffer2hex(this.manufacturerData);\n\t\t}\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage,\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatModeCommand.Get)\n@expectedCCResponse(ThermostatModeCCReport)\nexport class ThermostatModeCCGet extends ThermostatModeCC {}\n\n// @publicAPI\nexport interface ThermostatModeCCSupportedReportOptions {\n\tsupportedModes: ThermostatMode[];\n}\n\n@CCCommand(ThermostatModeCommand.SupportedReport)\n@ccValueProperty(\"supportedModes\", ThermostatModeCCValues.supportedModes)\nexport class ThermostatModeCCSupportedReport extends ThermostatModeCC {\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatModeCCSupportedReportOptions>,\n\t) {\n\t\tsuper(options);\n\t\tthis.supportedModes = options.supportedModes;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatModeCCSupportedReport {\n\t\tconst supportedModes: ThermostatMode[] = parseBitMask(\n\t\t\traw.payload,\n\t\t\tThermostatMode.Off,\n\t\t);\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tsupportedModes,\n\t\t});\n\t}\n\n\tpublic persistValues(ctx: PersistValuesContext): boolean {\n\t\tif (!super.persistValues(ctx)) return false;\n\n\t\t// Use this information to create the metadata for the mode property\n\t\tconst thermostatModeValue = ThermostatModeCCValues.thermostatMode;\n\t\tthis.setMetadata(ctx, thermostatModeValue, {\n\t\t\t...thermostatModeValue.meta,\n\t\t\tstates: enumValuesToMetadataStates(\n\t\t\t\tThermostatMode,\n\t\t\t\tthis.supportedModes,\n\t\t\t),\n\t\t});\n\n\t\treturn true;\n\t}\n\n\tpublic readonly supportedModes: ThermostatMode[];\n\n\tpublic serialize(ctx: CCEncodingContext): Promise<Bytes> {\n\t\tthis.payload = encodeBitMask(\n\t\t\tthis.supportedModes,\n\t\t\tThermostatMode[\"Manufacturer specific\"],\n\t\t\tThermostatMode.Off,\n\t\t);\n\t\treturn super.serialize(ctx);\n\t}\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\t\"supported modes\": this.supportedModes\n\t\t\t\t\t.map(\n\t\t\t\t\t\t(mode) =>\n\t\t\t\t\t\t\t`\\n\u00B7 ${getEnumMemberName(ThermostatMode, mode)}`,\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"\"),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatModeCommand.SupportedGet)\n@expectedCCResponse(ThermostatModeCCSupportedReport)\nexport class ThermostatModeCCSupportedGet extends ThermostatModeCC {}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAiBO;AACP,IAAAA,eAAsB;AACtB,IAAAA,eAAoD;AAEpD,iBAQO;A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lE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;",
6
6
  "names": ["import_safe"]
7
7
  }
@@ -1,33 +1,31 @@
1
- import type { MessageOrCCLogEntry, WithAddress } from "@zwave-js/core/safe";
1
+ import { type CCParsingContext } from "@zwave-js/cc";
2
+ import type { GetValueDB, MessageOrCCLogEntry, WithAddress } from "@zwave-js/core/safe";
2
3
  import { CommandClasses, type MaybeNotKnown } from "@zwave-js/core/safe";
3
- import type { CCParsingContext, GetValueDB } from "@zwave-js/host/safe";
4
4
  import { POLL_VALUE, PhysicalCCAPI, type PollValueImplementation } from "../lib/API.js";
5
5
  import { type CCRaw, CommandClass, type InterviewContext, type RefreshValuesContext } from "../lib/CommandClass.js";
6
6
  import { ThermostatOperatingState, ThermostatOperatingStateCommand } from "../lib/_Types.js";
7
7
  export declare const ThermostatOperatingStateCCValues: Readonly<{
8
8
  operatingState: {
9
- readonly id: {
10
- commandClass: (typeof CommandClasses)["Thermostat Operating State"];
11
- property: "state";
9
+ id: {
10
+ readonly commandClass: (typeof CommandClasses)["Thermostat Operating State"];
11
+ readonly property: "state";
12
12
  };
13
- readonly endpoint: (endpoint?: number | undefined) => {
13
+ endpoint: (endpoint?: number) => {
14
14
  readonly commandClass: (typeof CommandClasses)["Thermostat Operating State"];
15
15
  readonly endpoint: number;
16
16
  readonly property: "state";
17
17
  };
18
- readonly is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
18
+ is: (valueId: import("@zwave-js/core/safe").ValueID) => boolean;
19
19
  readonly meta: {
20
20
  readonly label: "Operating state";
21
- readonly states: {
22
- [x: number]: string;
23
- };
21
+ readonly states: Record<number, string>;
24
22
  readonly writeable: false;
25
23
  readonly min: 0;
26
24
  readonly max: 255;
27
25
  readonly type: "number";
28
26
  readonly readable: true;
29
27
  };
30
- readonly options: {
28
+ options: {
31
29
  readonly internal: false;
32
30
  readonly minVersion: 1;
33
31
  readonly secret: false;
@@ -23,7 +23,7 @@ __export(ThermostatOperatingStateCC_exports, {
23
23
  ThermostatOperatingStateCCAPI: () => ThermostatOperatingStateCCAPI,
24
24
  ThermostatOperatingStateCCGet: () => ThermostatOperatingStateCCGet,
25
25
  ThermostatOperatingStateCCReport: () => ThermostatOperatingStateCCReport,
26
- ThermostatOperatingStateCCValues: () => ThermostatOperatingStateCCValues
26
+ ThermostatOperatingStateCCValues: () => import_CCValues_generated.ThermostatOperatingStateCCValues
27
27
  });
28
28
  module.exports = __toCommonJS(ThermostatOperatingStateCC_exports);
29
29
  var import_safe = require("@zwave-js/core/safe");
@@ -33,6 +33,7 @@ var import_CommandClass = require("../lib/CommandClass.js");
33
33
  var import_CommandClassDecorators = require("../lib/CommandClassDecorators.js");
34
34
  var import_Values = require("../lib/Values.js");
35
35
  var import_Types = require("../lib/_Types.js");
36
+ var import_CCValues_generated = require("./_CCValues.generated.js");
36
37
  var __esDecorate = function(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
37
38
  function accept(f) {
38
39
  if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected");
@@ -73,15 +74,6 @@ var __runInitializers = function(thisArg, initializers, value) {
73
74
  }
74
75
  return useValue ? value : void 0;
75
76
  };
76
- const ThermostatOperatingStateCCValues = Object.freeze({
77
- ...import_Values.V.defineStaticCCValues(import_safe.CommandClasses["Thermostat Operating State"], {
78
- ...import_Values.V.staticPropertyWithName("operatingState", "state", {
79
- ...import_safe.ValueMetadata.ReadOnlyUInt8,
80
- label: "Operating state",
81
- states: (0, import_safe.enumValuesToMetadataStates)(import_Types.ThermostatOperatingState)
82
- })
83
- })
84
- });
85
77
  let ThermostatOperatingStateCCAPI = (() => {
86
78
  let _classDecorators = [(0, import_CommandClassDecorators.API)(import_safe.CommandClasses["Thermostat Operating State"])];
87
79
  let _classDescriptor;
@@ -132,7 +124,7 @@ let ThermostatOperatingStateCCAPI = (() => {
132
124
  return ThermostatOperatingStateCCAPI2 = _classThis;
133
125
  })();
134
126
  let ThermostatOperatingStateCC = (() => {
135
- let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Thermostat Operating State"]), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(ThermostatOperatingStateCCValues)];
127
+ let _classDecorators = [(0, import_CommandClassDecorators.commandClass)(import_safe.CommandClasses["Thermostat Operating State"]), (0, import_CommandClassDecorators.implementedVersion)(2), (0, import_CommandClassDecorators.ccValues)(import_CCValues_generated.ThermostatOperatingStateCCValues)];
136
128
  let _classDescriptor;
137
129
  let _classExtraInitializers = [];
138
130
  let _classThis;
@@ -185,7 +177,7 @@ let ThermostatOperatingStateCC = (() => {
185
177
  return ThermostatOperatingStateCC2 = _classThis;
186
178
  })();
187
179
  let ThermostatOperatingStateCCReport = (() => {
188
- let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatOperatingStateCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("state", ThermostatOperatingStateCCValues.operatingState)];
180
+ let _classDecorators = [(0, import_CommandClassDecorators.CCCommand)(import_Types.ThermostatOperatingStateCommand.Report), (0, import_CommandClassDecorators.ccValueProperty)("state", import_CCValues_generated.ThermostatOperatingStateCCValues.operatingState)];
189
181
  let _classDescriptor;
190
182
  let _classExtraInitializers = [];
191
183
  let _classThis;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/cc/ThermostatOperatingStateCC.ts"],
4
- "sourcesContent": ["import type { MessageOrCCLogEntry, WithAddress } from \"@zwave-js/core/safe\";\nimport {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\tMessagePriority,\n\tValueMetadata,\n\tenumValuesToMetadataStates,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport type { CCParsingContext, GetValueDB } from \"@zwave-js/host/safe\";\nimport { getEnumMemberName } from \"@zwave-js/shared/safe\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\tPhysicalCCAPI,\n\ttype PollValueImplementation,\n\tthrowUnsupportedProperty,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tThermostatOperatingState,\n\tThermostatOperatingStateCommand,\n} from \"../lib/_Types.js\";\n\nexport const ThermostatOperatingStateCCValues = Object.freeze({\n\t...V.defineStaticCCValues(CommandClasses[\"Thermostat Operating State\"], {\n\t\t...V.staticPropertyWithName(\n\t\t\t\"operatingState\",\n\t\t\t\"state\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tlabel: \"Operating state\",\n\t\t\t\tstates: enumValuesToMetadataStates(ThermostatOperatingState),\n\t\t\t} as const,\n\t\t),\n\t}),\n});\n\n// @noSetValueAPI This CC is read-only\n\n@API(CommandClasses[\"Thermostat Operating State\"])\nexport class ThermostatOperatingStateCCAPI extends PhysicalCCAPI {\n\tpublic supportsCommand(\n\t\tcmd: ThermostatOperatingStateCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ThermostatOperatingStateCommand.Get:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(\n\t\t\tthis: ThermostatOperatingStateCCAPI,\n\t\t\t{ property },\n\t\t) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"state\":\n\t\t\t\t\treturn this.get();\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tpublic async get(): Promise<MaybeNotKnown<ThermostatOperatingState>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatOperatingStateCommand,\n\t\t\tThermostatOperatingStateCommand.Get,\n\t\t);\n\n\t\tconst cc = new ThermostatOperatingStateCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatOperatingStateCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.state;\n\t}\n}\n\n@commandClass(CommandClasses[\"Thermostat Operating State\"])\n@implementedVersion(2)\n@ccValues(ThermostatOperatingStateCCValues)\nexport class ThermostatOperatingStateCC extends CommandClass {\n\tdeclare ccCommand: ThermostatOperatingStateCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Operating State\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// Query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying thermostat operating state...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst state = await api.get();\n\t\tif (state) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: `received current thermostat operating state: ${\n\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\tThermostatOperatingState,\n\t\t\t\t\t\tstate,\n\t\t\t\t\t)\n\t\t\t\t}`,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ThermostatOperatingStateCCReportOptions {\n\tstate: ThermostatOperatingState;\n}\n\n@CCCommand(ThermostatOperatingStateCommand.Report)\n@ccValueProperty(\"state\", ThermostatOperatingStateCCValues.operatingState)\nexport class ThermostatOperatingStateCCReport\n\textends ThermostatOperatingStateCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatOperatingStateCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.state = options.state;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatOperatingStateCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst state: ThermostatOperatingState = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tstate,\n\t\t});\n\t}\n\n\tpublic readonly state: ThermostatOperatingState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tstate: getEnumMemberName(ThermostatOperatingState, this.state),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatOperatingStateCommand.Get)\n@expectedCCResponse(ThermostatOperatingStateCCReport)\nexport class ThermostatOperatingStateCCGet extends ThermostatOperatingStateCC {}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,kBAOO;AAEP,IAAAA,eAAkC;AAClC,iBAMO;AACP,0BAKO;AACP,oCAQO;A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ACvC,YAAM,QAAkC,IAAI,QAAQ,CAAC;AAErD,aAAO,IAAI,KAAK;QACf,QAAQ,IAAI;QACZ;OACA;IACF;IAEgB;IAET,WAAW,KAAgB;AACjC,aAAO;QACN,GAAG,MAAM,WAAW,GAAG;QACvB,SAAS;UACR,WAAO,gCAAkB,uCAA0B,KAAK,KAAK;;;IAGhE;;;;IAKY,iCAA6B,MAAA;8BAFzC,yCAAU,6CAAgC,GAAG,OAC7C,kDAAmB,gCAAgC,CAAC;;;;oBACF;qDAAA,YAA0B;WAAA;;;;;;;;AAA7E,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;;;;",
4
+ "sourcesContent": ["import { type CCParsingContext } from \"@zwave-js/cc\";\nimport type {\n\tGetValueDB,\n\tMessageOrCCLogEntry,\n\tWithAddress,\n} from \"@zwave-js/core/safe\";\nimport {\n\tCommandClasses,\n\ttype MaybeNotKnown,\n\tMessagePriority,\n\tValueMetadata,\n\tenumValuesToMetadataStates,\n\tvalidatePayload,\n} from \"@zwave-js/core/safe\";\nimport { getEnumMemberName } from \"@zwave-js/shared/safe\";\nimport {\n\tCCAPI,\n\tPOLL_VALUE,\n\tPhysicalCCAPI,\n\ttype PollValueImplementation,\n\tthrowUnsupportedProperty,\n} from \"../lib/API.js\";\nimport {\n\ttype CCRaw,\n\tCommandClass,\n\ttype InterviewContext,\n\ttype RefreshValuesContext,\n} from \"../lib/CommandClass.js\";\nimport {\n\tAPI,\n\tCCCommand,\n\tccValueProperty,\n\tccValues,\n\tcommandClass,\n\texpectedCCResponse,\n\timplementedVersion,\n} from \"../lib/CommandClassDecorators.js\";\nimport { V } from \"../lib/Values.js\";\nimport {\n\tThermostatOperatingState,\n\tThermostatOperatingStateCommand,\n} from \"../lib/_Types.js\";\n\nexport const ThermostatOperatingStateCCValues = V.defineCCValues(\n\tCommandClasses[\"Thermostat Operating State\"],\n\t{\n\t\t...V.staticPropertyWithName(\n\t\t\t\"operatingState\",\n\t\t\t\"state\",\n\t\t\t{\n\t\t\t\t...ValueMetadata.ReadOnlyUInt8,\n\t\t\t\tlabel: \"Operating state\",\n\t\t\t\tstates: enumValuesToMetadataStates(ThermostatOperatingState),\n\t\t\t} as const,\n\t\t),\n\t},\n);\n\n// @noSetValueAPI This CC is read-only\n\n@API(CommandClasses[\"Thermostat Operating State\"])\nexport class ThermostatOperatingStateCCAPI extends PhysicalCCAPI {\n\tpublic supportsCommand(\n\t\tcmd: ThermostatOperatingStateCommand,\n\t): MaybeNotKnown<boolean> {\n\t\tswitch (cmd) {\n\t\t\tcase ThermostatOperatingStateCommand.Get:\n\t\t\t\treturn true; // This is mandatory\n\t\t}\n\t\treturn super.supportsCommand(cmd);\n\t}\n\n\tprotected get [POLL_VALUE](): PollValueImplementation {\n\t\treturn async function(\n\t\t\tthis: ThermostatOperatingStateCCAPI,\n\t\t\t{ property },\n\t\t) {\n\t\t\tswitch (property) {\n\t\t\t\tcase \"state\":\n\t\t\t\t\treturn this.get();\n\t\t\t\tdefault:\n\t\t\t\t\tthrowUnsupportedProperty(this.ccId, property);\n\t\t\t}\n\t\t};\n\t}\n\n\tpublic async get(): Promise<MaybeNotKnown<ThermostatOperatingState>> {\n\t\tthis.assertSupportsCommand(\n\t\t\tThermostatOperatingStateCommand,\n\t\t\tThermostatOperatingStateCommand.Get,\n\t\t);\n\n\t\tconst cc = new ThermostatOperatingStateCCGet({\n\t\t\tnodeId: this.endpoint.nodeId,\n\t\t\tendpointIndex: this.endpoint.index,\n\t\t});\n\t\tconst response = await this.host.sendCommand<\n\t\t\tThermostatOperatingStateCCReport\n\t\t>(\n\t\t\tcc,\n\t\t\tthis.commandOptions,\n\t\t);\n\t\treturn response?.state;\n\t}\n}\n\n@commandClass(CommandClasses[\"Thermostat Operating State\"])\n@implementedVersion(2)\n@ccValues(ThermostatOperatingStateCCValues)\nexport class ThermostatOperatingStateCC extends CommandClass {\n\tdeclare ccCommand: ThermostatOperatingStateCommand;\n\n\tpublic async interview(\n\t\tctx: InterviewContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: `Interviewing ${this.ccName}...`,\n\t\t\tdirection: \"none\",\n\t\t});\n\n\t\tawait this.refreshValues(ctx);\n\n\t\t// Remember that the interview is complete\n\t\tthis.setInterviewComplete(ctx, true);\n\t}\n\n\tpublic async refreshValues(\n\t\tctx: RefreshValuesContext,\n\t): Promise<void> {\n\t\tconst node = this.getNode(ctx)!;\n\t\tconst endpoint = this.getEndpoint(ctx)!;\n\t\tconst api = CCAPI.create(\n\t\t\tCommandClasses[\"Thermostat Operating State\"],\n\t\t\tctx,\n\t\t\tendpoint,\n\t\t).withOptions({\n\t\t\tpriority: MessagePriority.NodeQuery,\n\t\t});\n\n\t\t// Query the current state\n\t\tctx.logNode(node.id, {\n\t\t\tendpoint: this.endpointIndex,\n\t\t\tmessage: \"querying thermostat operating state...\",\n\t\t\tdirection: \"outbound\",\n\t\t});\n\n\t\tconst state = await api.get();\n\t\tif (state) {\n\t\t\tctx.logNode(node.id, {\n\t\t\t\tendpoint: this.endpointIndex,\n\t\t\t\tmessage: `received current thermostat operating state: ${\n\t\t\t\t\tgetEnumMemberName(\n\t\t\t\t\t\tThermostatOperatingState,\n\t\t\t\t\t\tstate,\n\t\t\t\t\t)\n\t\t\t\t}`,\n\t\t\t\tdirection: \"inbound\",\n\t\t\t});\n\t\t}\n\t}\n}\n\n// @publicAPI\nexport interface ThermostatOperatingStateCCReportOptions {\n\tstate: ThermostatOperatingState;\n}\n\n@CCCommand(ThermostatOperatingStateCommand.Report)\n@ccValueProperty(\"state\", ThermostatOperatingStateCCValues.operatingState)\nexport class ThermostatOperatingStateCCReport\n\textends ThermostatOperatingStateCC\n{\n\tpublic constructor(\n\t\toptions: WithAddress<ThermostatOperatingStateCCReportOptions>,\n\t) {\n\t\tsuper(options);\n\n\t\t// TODO: Check implementation:\n\t\tthis.state = options.state;\n\t}\n\n\tpublic static from(\n\t\traw: CCRaw,\n\t\tctx: CCParsingContext,\n\t): ThermostatOperatingStateCCReport {\n\t\tvalidatePayload(raw.payload.length >= 1);\n\t\tconst state: ThermostatOperatingState = raw.payload[0];\n\n\t\treturn new this({\n\t\t\tnodeId: ctx.sourceNodeId,\n\t\t\tstate,\n\t\t});\n\t}\n\n\tpublic readonly state: ThermostatOperatingState;\n\n\tpublic toLogEntry(ctx?: GetValueDB): MessageOrCCLogEntry {\n\t\treturn {\n\t\t\t...super.toLogEntry(ctx),\n\t\t\tmessage: {\n\t\t\t\tstate: getEnumMemberName(ThermostatOperatingState, this.state),\n\t\t\t},\n\t\t};\n\t}\n}\n\n@CCCommand(ThermostatOperatingStateCommand.Get)\n@expectedCCResponse(ThermostatOperatingStateCCReport)\nexport class ThermostatOperatingStateCCGet extends ThermostatOperatingStateCC {}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,kBAOO;AACP,IAAAA,eAAkC;AAClC,iBAMO;AACP,0BAKO;AACP,oCAQO;AACP,oBAAkB;AAClB,mBAGO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoBM,iCAA6B,MAAA;8BADzC,mCAAI,2BAAe,4BAA4B,CAAC,CAAC;;;;oBACC;qDAAA,YAAa;WAAA;;;;;;;;AAAhE,mBAAA,MAAA,mBAAA,EAAA,OAAA,WAAA,GAAA,kBAAA,EAAA,MAAA,SAAA,MAAA,WAAA,MAAA,UAAA,UAAA,GAAA,MAAA,uBAAA;;;AAAa,wBAAA,YAAA,uBAAA;;IACL,gBACN,KAAoC;AAEpC,cAAQ,KAAK;QACZ,KAAK,6CAAgC;AACpC,iBAAO;MACT;AACA,aAAO,MAAM,gBAAgB,GAAG;IACjC;IAEA,KAAe,qBAAU,IAAC;AACzB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