@mp-consulting/homebridge-daikin-cloud 1.3.6 → 1.3.8

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 (291) hide show
  1. package/LICENSE +39 -1
  2. package/README.md +3 -1
  3. package/dist/src/accessories/air-conditioning-accessory.d.ts +2 -2
  4. package/dist/src/accessories/air-conditioning-accessory.d.ts.map +1 -1
  5. package/dist/src/accessories/air-conditioning-accessory.js.map +1 -1
  6. package/dist/src/accessories/altherma-accessory.d.ts +2 -2
  7. package/dist/src/accessories/altherma-accessory.d.ts.map +1 -1
  8. package/dist/src/accessories/altherma-accessory.js.map +1 -1
  9. package/dist/src/accessories/base-accessory.d.ts +5 -5
  10. package/dist/src/accessories/base-accessory.d.ts.map +1 -1
  11. package/dist/src/accessories/base-accessory.js +7 -4
  12. package/dist/src/accessories/base-accessory.js.map +1 -1
  13. package/dist/src/api/daikin-api.d.ts +25 -25
  14. package/dist/src/api/daikin-api.d.ts.map +1 -1
  15. package/dist/src/api/daikin-api.js +41 -31
  16. package/dist/src/api/daikin-api.js.map +1 -1
  17. package/dist/src/api/daikin-cloud.repository.d.ts.map +1 -1
  18. package/dist/src/api/daikin-cloud.repository.js.map +1 -1
  19. package/dist/src/api/daikin-controller.d.ts +41 -42
  20. package/dist/src/api/daikin-controller.d.ts.map +1 -1
  21. package/dist/src/api/daikin-controller.js +39 -39
  22. package/dist/src/api/daikin-controller.js.map +1 -1
  23. package/dist/src/api/daikin-device.d.ts +33 -31
  24. package/dist/src/api/daikin-device.d.ts.map +1 -1
  25. package/dist/src/api/daikin-device.js +40 -29
  26. package/dist/src/api/daikin-device.js.map +1 -1
  27. package/dist/src/api/daikin-mobile-oauth.d.ts +16 -16
  28. package/dist/src/api/daikin-mobile-oauth.d.ts.map +1 -1
  29. package/dist/src/api/daikin-mobile-oauth.js +32 -22
  30. package/dist/src/api/daikin-mobile-oauth.js.map +1 -1
  31. package/dist/src/api/daikin-oauth.d.ts +29 -29
  32. package/dist/src/api/daikin-oauth.d.ts.map +1 -1
  33. package/dist/src/api/daikin-oauth.js +45 -35
  34. package/dist/src/api/daikin-oauth.js.map +1 -1
  35. package/dist/src/api/daikin-schemas.d.ts +4 -4
  36. package/dist/src/api/daikin-schemas.js +3 -3
  37. package/dist/src/api/daikin-schemas.js.map +1 -1
  38. package/dist/src/api/daikin-types.js.map +1 -1
  39. package/dist/src/api/daikin-websocket.d.ts +31 -32
  40. package/dist/src/api/daikin-websocket.d.ts.map +1 -1
  41. package/dist/src/api/daikin-websocket.js +30 -30
  42. package/dist/src/api/daikin-websocket.js.map +1 -1
  43. package/dist/src/api/index.d.ts +1 -1
  44. package/dist/src/api/index.d.ts.map +1 -1
  45. package/dist/src/api/index.js +2 -1
  46. package/dist/src/api/index.js.map +1 -1
  47. package/dist/src/api/token-storage.d.ts +1 -1
  48. package/dist/src/api/token-storage.d.ts.map +1 -1
  49. package/dist/src/api/token-storage.js +20 -11
  50. package/dist/src/api/token-storage.js.map +1 -1
  51. package/dist/src/config/config-manager.d.ts +33 -33
  52. package/dist/src/config/config-manager.d.ts.map +1 -1
  53. package/dist/src/config/config-manager.js +33 -33
  54. package/dist/src/config/config-manager.js.map +1 -1
  55. package/dist/src/constants/api.constants.js.map +1 -1
  56. package/dist/src/device/accessory-factory.d.ts +10 -10
  57. package/dist/src/device/accessory-factory.d.ts.map +1 -1
  58. package/dist/src/device/accessory-factory.js +6 -6
  59. package/dist/src/device/accessory-factory.js.map +1 -1
  60. package/dist/src/device/capability-detector.d.ts +8 -8
  61. package/dist/src/device/capability-detector.d.ts.map +1 -1
  62. package/dist/src/device/capability-detector.js +6 -6
  63. package/dist/src/device/capability-detector.js.map +1 -1
  64. package/dist/src/device/capability-docs.d.ts +1 -1
  65. package/dist/src/device/capability-docs.d.ts.map +1 -1
  66. package/dist/src/device/capability-docs.js +1 -2
  67. package/dist/src/device/capability-docs.js.map +1 -1
  68. package/dist/src/device/profiles/device-profile.d.ts +1 -1
  69. package/dist/src/device/profiles/device-profile.d.ts.map +1 -1
  70. package/dist/src/device/profiles/device-profile.js +4 -4
  71. package/dist/src/device/profiles/device-profile.js.map +1 -1
  72. package/dist/src/features/base-feature.d.ts +2 -2
  73. package/dist/src/features/base-feature.d.ts.map +1 -1
  74. package/dist/src/features/base-feature.js +2 -3
  75. package/dist/src/features/base-feature.js.map +1 -1
  76. package/dist/src/features/feature-manager.d.ts +8 -8
  77. package/dist/src/features/feature-manager.d.ts.map +1 -1
  78. package/dist/src/features/feature-manager.js +5 -5
  79. package/dist/src/features/feature-manager.js.map +1 -1
  80. package/dist/src/features/modes/dry-operation-mode.feature.d.ts +1 -1
  81. package/dist/src/features/modes/dry-operation-mode.feature.d.ts.map +1 -1
  82. package/dist/src/features/modes/dry-operation-mode.feature.js.map +1 -1
  83. package/dist/src/features/modes/econo-mode.feature.d.ts +1 -1
  84. package/dist/src/features/modes/econo-mode.feature.d.ts.map +1 -1
  85. package/dist/src/features/modes/econo-mode.feature.js.map +1 -1
  86. package/dist/src/features/modes/fan-only-operation-mode.feature.d.ts +1 -1
  87. package/dist/src/features/modes/fan-only-operation-mode.feature.d.ts.map +1 -1
  88. package/dist/src/features/modes/fan-only-operation-mode.feature.js.map +1 -1
  89. package/dist/src/features/modes/indoor-silent-mode.feature.d.ts +1 -1
  90. package/dist/src/features/modes/indoor-silent-mode.feature.d.ts.map +1 -1
  91. package/dist/src/features/modes/indoor-silent-mode.feature.js.map +1 -1
  92. package/dist/src/features/modes/outdoor-silent-mode.feature.d.ts +1 -1
  93. package/dist/src/features/modes/outdoor-silent-mode.feature.d.ts.map +1 -1
  94. package/dist/src/features/modes/outdoor-silent-mode.feature.js.map +1 -1
  95. package/dist/src/features/modes/powerful-mode.feature.d.ts +1 -1
  96. package/dist/src/features/modes/powerful-mode.feature.d.ts.map +1 -1
  97. package/dist/src/features/modes/powerful-mode.feature.js.map +1 -1
  98. package/dist/src/features/modes/streamer-mode.feature.d.ts +1 -1
  99. package/dist/src/features/modes/streamer-mode.feature.d.ts.map +1 -1
  100. package/dist/src/features/modes/streamer-mode.feature.js.map +1 -1
  101. package/dist/src/index.d.ts +1 -1
  102. package/dist/src/index.d.ts.map +1 -1
  103. package/dist/src/index.js.map +1 -1
  104. package/dist/src/platform.d.ts +6 -5
  105. package/dist/src/platform.d.ts.map +1 -1
  106. package/dist/src/platform.js +2 -2
  107. package/dist/src/platform.js.map +1 -1
  108. package/dist/src/services/climate-control.service.d.ts +8 -2
  109. package/dist/src/services/climate-control.service.d.ts.map +1 -1
  110. package/dist/src/services/climate-control.service.js +53 -59
  111. package/dist/src/services/climate-control.service.js.map +1 -1
  112. package/dist/src/services/hot-water-tank.service.d.ts +6 -2
  113. package/dist/src/services/hot-water-tank.service.d.ts.map +1 -1
  114. package/dist/src/services/hot-water-tank.service.js +31 -34
  115. package/dist/src/services/hot-water-tank.service.js.map +1 -1
  116. package/dist/src/types/daikin-enums.js +12 -12
  117. package/dist/src/types/daikin-enums.js.map +1 -1
  118. package/dist/src/types/device-capabilities.d.ts +1 -1
  119. package/dist/src/types/device-capabilities.d.ts.map +1 -1
  120. package/dist/src/utils/log-context.d.ts +23 -23
  121. package/dist/src/utils/log-context.d.ts.map +1 -1
  122. package/dist/src/utils/log-context.js +28 -28
  123. package/dist/src/utils/log-context.js.map +1 -1
  124. package/dist/src/utils/strings.d.ts.map +1 -1
  125. package/dist/src/utils/strings.js.map +1 -1
  126. package/dist/src/utils/update-mapper.d.ts +16 -16
  127. package/dist/src/utils/update-mapper.d.ts.map +1 -1
  128. package/dist/src/utils/update-mapper.js +14 -14
  129. package/dist/src/utils/update-mapper.js.map +1 -1
  130. package/homebridge-ui/public/index.html +24 -24
  131. package/homebridge-ui/public/lib/kit.css +253 -0
  132. package/homebridge-ui/public/lib/kit.js +133 -0
  133. package/homebridge-ui/public/script.js +957 -898
  134. package/homebridge-ui/public/styles.css +0 -1
  135. package/homebridge-ui/server.js +739 -695
  136. package/package.json +30 -25
  137. package/.claude/settings.json +0 -3
  138. package/.claude/settings.local.json +0 -24
  139. package/CHANGELOG.md +0 -114
  140. package/CLAUDE.md +0 -269
  141. package/config.md +0 -2
  142. package/docs/ARCHITECTURE.md +0 -645
  143. package/docs/IMPLEMENTATION_GUIDE.md +0 -899
  144. package/docs/IMPROVEMENTS_SUMMARY.md +0 -415
  145. package/docs/NEXT_STEPS.md +0 -368
  146. package/docs/Screenshot 2024-07-04 at 18.41.28.png +0 -0
  147. package/docs/TROUBLESHOOTING.md +0 -475
  148. package/docs/api-response-for-BRP069A8x.json +0 -520
  149. package/docs/api-response-for-BRP069C4x-2.json +0 -881
  150. package/docs/api-response-for-BRP069C4x.json +0 -916
  151. package/docs/api-response-for-altherma.json +0 -759
  152. package/docs/api-response-for-altherma2.json +0 -2735
  153. package/docs/api-response-with-multiple-devices-incl-heatpump.json +0 -2544
  154. package/docs/cr-insance-altherma-id-0.json +0 -834
  155. package/docs/mock-air-to-air-dx23.json +0 -759
  156. package/docs/mock-air-to-air-dx4.json +0 -1134
  157. package/docs/mock-airpurifier-with-humidifier.json +0 -732
  158. package/docs/mock-airpurifier.json +0 -450
  159. package/docs/mock-altherma-air-to-water-lan.json +0 -845
  160. package/docs/mock-altherma-air-to-water-wlan.json +0 -845
  161. package/docs/mock-d2cnd-gas-boiler.json +0 -649
  162. package/docs/setpointmode-vs-controlmode-vs-setpoints-vs-sensorydata.txt +0 -6
  163. package/images/fan-speed.jpeg +0 -0
  164. package/images/homekit-controls.jpeg +0 -0
  165. package/images/homekit-settings.jpeg +0 -0
  166. package/images/swing-mode.png +0 -0
  167. package/jest.config.ts +0 -21
  168. package/test/fixtures/altherma-crSense-2.ts +0 -834
  169. package/test/fixtures/altherma-fraction.ts +0 -718
  170. package/test/fixtures/altherma-heat-pump-2.ts +0 -479
  171. package/test/fixtures/altherma-heat-pump.ts +0 -757
  172. package/test/fixtures/altherma-miladcerkic-off.ts +0 -524
  173. package/test/fixtures/altherma-miladcerkic.ts +0 -524
  174. package/test/fixtures/altherma-v1ckoeln.ts +0 -644
  175. package/test/fixtures/altherma-with-embedded-id-zero.ts +0 -834
  176. package/test/fixtures/dx23-airco-2.ts +0 -343
  177. package/test/fixtures/dx23-airco.ts +0 -518
  178. package/test/fixtures/dx4-airco.ts +0 -914
  179. package/test/fixtures/unknown-jan.ts +0 -488
  180. package/test/fixtures/unknown-kitchen-guests.ts +0 -488
  181. package/test/hbConfig/.daikin-mobile-tokenset +0 -8
  182. package/test/hbConfig/.uix-dashboard.json +0 -1
  183. package/test/hbConfig/.uix-secrets +0 -1
  184. package/test/hbConfig/accessories/.cachedAccessories.bak +0 -1
  185. package/test/hbConfig/accessories/cachedAccessories +0 -1
  186. package/test/hbConfig/accessories/uiAccessoriesLayout.json +0 -1
  187. package/test/hbConfig/auth.json +0 -10
  188. package/test/hbConfig/backups/config-backups/config.json.1767953686461 +0 -25
  189. package/test/hbConfig/backups/config-backups/config.json.1767953695236 +0 -29
  190. package/test/hbConfig/backups/config-backups/config.json.1767953814763 +0 -29
  191. package/test/hbConfig/backups/config-backups/config.json.1767953823101 +0 -29
  192. package/test/hbConfig/backups/config-backups/config.json.1767954822835 +0 -29
  193. package/test/hbConfig/backups/config-backups/config.json.1767954859218 +0 -29
  194. package/test/hbConfig/backups/config-backups/config.json.1767960145503 +0 -33
  195. package/test/hbConfig/backups/config-backups/config.json.1767960168068 +0 -44
  196. package/test/hbConfig/backups/config-backups/config.json.1767960170333 +0 -46
  197. package/test/hbConfig/backups/config-backups/config.json.1767960172731 +0 -44
  198. package/test/hbConfig/backups/config-backups/config.json.1767960179323 +0 -44
  199. package/test/hbConfig/backups/config-backups/config.json.1767960182114 +0 -44
  200. package/test/hbConfig/backups/config-backups/config.json.1767960189302 +0 -44
  201. package/test/hbConfig/backups/config-backups/config.json.1767960195194 +0 -44
  202. package/test/hbConfig/backups/config-backups/config.json.1767960197301 +0 -44
  203. package/test/hbConfig/backups/config-backups/config.json.1767960199151 +0 -44
  204. package/test/hbConfig/backups/config-backups/config.json.1767960199667 +0 -44
  205. package/test/hbConfig/backups/config-backups/config.json.1767960329839 +0 -44
  206. package/test/hbConfig/backups/config-backups/config.json.1767960334503 +0 -44
  207. package/test/hbConfig/backups/config-backups/config.json.1767960336208 +0 -44
  208. package/test/hbConfig/backups/config-backups/config.json.1767960338537 +0 -44
  209. package/test/hbConfig/backups/config-backups/config.json.1767963223953 +0 -44
  210. package/test/hbConfig/backups/config-backups/config.json.1767963241753 +0 -44
  211. package/test/hbConfig/backups/config-backups/config.json.1767963252785 +0 -44
  212. package/test/hbConfig/backups/config-backups/config.json.1767963463944 +0 -44
  213. package/test/hbConfig/backups/config-backups/config.json.1767963834475 +0 -44
  214. package/test/hbConfig/backups/config-backups/config.json.1767963838474 +0 -44
  215. package/test/hbConfig/backups/config-backups/config.json.1767963843066 +0 -44
  216. package/test/hbConfig/backups/config-backups/config.json.1767965217715 +0 -44
  217. package/test/hbConfig/backups/config-backups/config.json.1767965419624 +0 -25
  218. package/test/hbConfig/backups/config-backups/config.json.1767965870934 +0 -32
  219. package/test/hbConfig/backups/config-backups/config.json.1767977675045 +0 -32
  220. package/test/hbConfig/backups/config-backups/config.json.1767977677222 +0 -33
  221. package/test/hbConfig/backups/config-backups/config.json.1767977710226 +0 -33
  222. package/test/hbConfig/backups/config-backups/config.json.1767977741397 +0 -33
  223. package/test/hbConfig/backups/config-backups/config.json.1767977977093 +0 -35
  224. package/test/hbConfig/backups/config-backups/config.json.1767977981773 +0 -35
  225. package/test/hbConfig/backups/config-backups/config.json.1767977986514 +0 -35
  226. package/test/hbConfig/backups/config-backups/config.json.1767977991174 +0 -35
  227. package/test/hbConfig/backups/config-backups/config.json.1767979424487 +0 -35
  228. package/test/hbConfig/backups/config-backups/config.json.1767979424987 +0 -35
  229. package/test/hbConfig/backups/config-backups/config.json.1767979432646 +0 -47
  230. package/test/hbConfig/backups/config-backups/config.json.1767979433150 +0 -47
  231. package/test/hbConfig/backups/config-backups/config.json.1767979436933 +0 -47
  232. package/test/hbConfig/backups/config-backups/config.json.1767979437438 +0 -47
  233. package/test/hbConfig/backups/config-backups/config.json.1767979441676 +0 -47
  234. package/test/hbConfig/backups/config-backups/config.json.1767979442180 +0 -47
  235. package/test/hbConfig/backups/config-backups/config.json.1767979466735 +0 -47
  236. package/test/hbConfig/backups/config-backups/config.json.1767979903636 +0 -47
  237. package/test/hbConfig/backups/config-backups/config.json.1767979904135 +0 -47
  238. package/test/hbConfig/backups/config-backups/config.json.1767979906606 +0 -47
  239. package/test/hbConfig/backups/config-backups/config.json.1767979907108 +0 -47
  240. package/test/hbConfig/backups/config-backups/config.json.1767988702341 +0 -47
  241. package/test/hbConfig/backups/config-backups/config.json.1767988702837 +0 -47
  242. package/test/hbConfig/backups/config-backups/config.json.1767988713159 +0 -47
  243. package/test/hbConfig/backups/config-backups/config.json.1767988713664 +0 -47
  244. package/test/hbConfig/backups/config-backups/config.json.1767988918139 +0 -47
  245. package/test/hbConfig/backups/config-backups/config.json.1767988918639 +0 -47
  246. package/test/hbConfig/backups/config-backups/config.json.1767988921120 +0 -47
  247. package/test/hbConfig/backups/config-backups/config.json.1767988921624 +0 -47
  248. package/test/hbConfig/backups/config-backups/config.json.1767988930307 +0 -47
  249. package/test/hbConfig/backups/config-backups/config.json.1767988935070 +0 -47
  250. package/test/hbConfig/backups/config-backups/config.json.1767988935574 +0 -47
  251. package/test/hbConfig/backups/config-backups/config.json.1767989710262 +0 -47
  252. package/test/hbConfig/backups/config-backups/config.json.1767989710760 +0 -47
  253. package/test/hbConfig/backups/config-backups/config.json.1767989729668 +0 -47
  254. package/test/hbConfig/backups/config-backups/config.json.1767990295225 +0 -47
  255. package/test/hbConfig/backups/config-backups/config.json.1767990479921 +0 -47
  256. package/test/hbConfig/backups/config-backups/config.json.1767990481702 +0 -49
  257. package/test/hbConfig/backups/instance-backups/homebridge-backup-1E4A432551BA.1768010187391.tar.gz +0 -0
  258. package/test/hbConfig/backups/instance-backups/homebridge-backup-1E4A432551BA.1768096587387.tar.gz +0 -0
  259. package/test/hbConfig/backups/instance-backups/homebridge-backup-1E4A432551BA.1768182987404.tar.gz +0 -0
  260. package/test/hbConfig/config.json +0 -47
  261. package/test/hbConfig/daikin-cloud-certs/server.crt +0 -22
  262. package/test/hbConfig/daikin-cloud-certs/server.key +0 -28
  263. package/test/hbConfig/persist/AccessoryInfo.1E4A432551BA.json +0 -1
  264. package/test/hbConfig/persist/IdentifierCache.1E4A432551BA.json +0 -1
  265. package/test/hbConfig/tmp/daikin_request/api.onecta.daikineurope.com_01-09-2026-23-29-52/request_14758 +0 -1
  266. package/test/hbConfig/tmp/daikin_request/api.onecta.daikineurope.com_01-09-2026-23-29-52/request_14759 +0 -1
  267. package/test/hbConfig/tmp/daikin_request/api.onecta.daikineurope.com_01-09-2026-23-29-52/request_14760 +0 -1
  268. package/test/hbConfig/tmp/daikin_request/api.onecta.daikineurope.com_01-09-2026-23-29-52/request_14761 +0 -1
  269. package/test/hbConfig/tmp/daikin_request/api.onecta.daikineurope.com_01-09-2026-23-29-52/request_14762 +0 -1
  270. package/test/hbConfig/tmp/daikin_request/api.onecta.daikineurope.com_01-09-2026-23-29-52/request_14764 +0 -1
  271. package/test/helpers/test-isolation.ts +0 -228
  272. package/test/integration/air-conditioning.test.ts +0 -396
  273. package/test/integration/altherma.test.ts +0 -279
  274. package/test/integration/platform.test.ts +0 -118
  275. package/test/mobile-tokens.json +0 -8
  276. package/test/mocks/index.ts +0 -27
  277. package/test/test-gigya-auth.js +0 -443
  278. package/test/test-mobile-oauth.js +0 -175
  279. package/test/test-websocket-mobile.js +0 -123
  280. package/test/test-websocket.js +0 -116
  281. package/test/unit/api/__snapshots__/daikinCloud.test.ts.snap +0 -1320
  282. package/test/unit/api/daikin-api.test.ts +0 -442
  283. package/test/unit/api/daikin-cloud-repository.test.ts +0 -107
  284. package/test/unit/api/daikin-oauth.test.ts +0 -214
  285. package/test/unit/api/daikinCloud.test.ts +0 -12
  286. package/test/unit/api/token-storage.test.ts +0 -90
  287. package/test/unit/config/config-manager.test.ts +0 -271
  288. package/test/unit/device/daikin-device.test.ts +0 -73
  289. package/test/unit/services/hot-water-tank.service.test.ts +0 -123
  290. package/test/unit/utils/log-context.test.ts +0 -271
  291. package/test/unit/utils/update-mapper.test.ts +0 -404
@@ -1,279 +0,0 @@
1
- import {PlatformAccessory} from 'homebridge/lib/platformAccessory';
2
- import {DaikinCloudAccessoryContext, DaikinCloudPlatform} from '../../src/platform';
3
- import {MockPlatformConfig} from '../mocks';
4
- import {AlthermaAccessory} from '../../src/accessories';
5
- import {DaikinCloudDevice, DaikinCloudController, DaikinApi} from '../../src/api';
6
- import {althermaV1ckoeln} from '../fixtures/altherma-v1ckoeln';
7
- import {althermaCrSense2} from '../fixtures/altherma-crSense-2';
8
- import {althermaWithEmbeddedIdZero} from '../fixtures/altherma-with-embedded-id-zero';
9
- import {althermaHeatPump} from '../fixtures/altherma-heat-pump';
10
- import {althermaHeatPump2} from '../fixtures/altherma-heat-pump-2';
11
- import {althermaFraction} from '../fixtures/altherma-fraction';
12
- import {althermaMiladcerkic} from '../fixtures/altherma-miladcerkic';
13
-
14
- import {HomebridgeAPI} from 'homebridge/lib/api.js';
15
- import { Logger } from 'homebridge/lib/logger.js';
16
-
17
- type DeviceState = {
18
- activeState: boolean;
19
- currentTemperature: number;
20
- targetHeaterCoolerState: string;
21
- coolingThresholdTemperature: number;
22
- heatingThresholdTemperature: number;
23
- hotWaterTankCurrentHeatingCoolingState: number;
24
- hotWaterTankCurrentTemperature: number;
25
- hotWaterTankHeatingTargetTemperature: number;
26
- hotWaterTankTargetHeaterCoolerState: number;
27
- powerfulMode: number;
28
- };
29
-
30
- test.each<Array<string | string | any | DeviceState>>([
31
- [
32
- 'altherma',
33
- 'climateControlMainZone',
34
- althermaHeatPump,
35
- {
36
- activeState: true,
37
- currentTemperature: 22.4,
38
- targetHeaterCoolerState: 1,
39
- coolingThresholdTemperature: undefined,
40
- heatingThresholdTemperature: 22,
41
- hotWaterTankCurrentHeatingCoolingState: 1,
42
- hotWaterTankCurrentTemperature: 48,
43
- hotWaterTankHeatingTargetTemperature: 48,
44
- hotWaterTankTargetHeaterCoolerState: 1,
45
- powerfulMode: false,
46
-
47
- },
48
- ],
49
- [
50
- 'altherma',
51
- 'climateControlMainZone',
52
- althermaHeatPump2,
53
- {
54
- activeState: false,
55
- currentTemperature: 33,
56
- targetHeaterCoolerState: 1,
57
- coolingThresholdTemperature: 0,
58
- heatingThresholdTemperature: 0,
59
- hotWaterTankCurrentHeatingCoolingState: 1,
60
- hotWaterTankCurrentTemperature: 50,
61
- hotWaterTankHeatingTargetTemperature: 50,
62
- hotWaterTankTargetHeaterCoolerState: 1,
63
- powerfulMode: false,
64
-
65
- },
66
- ],
67
- [
68
- 'altherma2',
69
- '1',
70
- althermaWithEmbeddedIdZero,
71
- {
72
- activeState: false,
73
- currentTemperature: 27.7,
74
- targetHeaterCoolerState: 1,
75
- coolingThresholdTemperature: 20,
76
- heatingThresholdTemperature: 21,
77
- hotWaterTankCurrentHeatingCoolingState: 1,
78
- hotWaterTankCurrentTemperature: 42,
79
- hotWaterTankHeatingTargetTemperature: 45,
80
- hotWaterTankTargetHeaterCoolerState: 1,
81
- powerfulMode: false,
82
-
83
- },
84
- ],
85
- [
86
- 'altherma3',
87
- '1',
88
- althermaCrSense2,
89
- {
90
- activeState: false,
91
- currentTemperature: 27.8,
92
- targetHeaterCoolerState: 1,
93
- coolingThresholdTemperature: 20,
94
- heatingThresholdTemperature: 21,
95
- hotWaterTankCurrentHeatingCoolingState: 1,
96
- hotWaterTankCurrentTemperature: 45,
97
- hotWaterTankHeatingTargetTemperature: 45,
98
- hotWaterTankTargetHeaterCoolerState: 1,
99
- powerfulMode: false,
100
-
101
- },
102
- ],
103
- [
104
- 'altherma4',
105
- 'climateControlMainZone',
106
- althermaV1ckoeln,
107
- {
108
- activeState: false,
109
- currentTemperature: 34, // or should we always show the roomTemperature here which is 27.5
110
- targetHeaterCoolerState: 1,
111
- coolingThresholdTemperature: 20,
112
- heatingThresholdTemperature: 0,
113
- hotWaterTankCurrentHeatingCoolingState: 1,
114
- hotWaterTankCurrentTemperature: 42,
115
- hotWaterTankHeatingTargetTemperature: 46,
116
- hotWaterTankTargetHeaterCoolerState: 1,
117
- powerfulMode: false,
118
-
119
- },
120
- ],
121
- [
122
- 'althermaFraction',
123
- 'climateControlMainZone',
124
- althermaFraction,
125
- {
126
- activeState: true,
127
- currentTemperature: 35, // has no roomTemperature :(
128
- targetHeaterCoolerState: 1,
129
- coolingThresholdTemperature: 0,
130
- heatingThresholdTemperature: 0,
131
- hotWaterTankCurrentHeatingCoolingState: 1,
132
- hotWaterTankCurrentTemperature: 45,
133
- hotWaterTankHeatingTargetTemperature: 47,
134
- hotWaterTankTargetHeaterCoolerState: 1,
135
- powerfulMode: false,
136
-
137
- },
138
- ],
139
- [
140
- 'althermaMiladcerkic',
141
- 'climateControlMainZone',
142
- althermaMiladcerkic,
143
- {
144
- activeState: true,
145
- currentTemperature: 45,
146
- targetHeaterCoolerState: 1,
147
- coolingThresholdTemperature: 20,
148
- heatingThresholdTemperature: 45,
149
- hotWaterTankCurrentHeatingCoolingState: 1,
150
- hotWaterTankCurrentTemperature: 49,
151
- hotWaterTankHeatingTargetTemperature: 50,
152
- hotWaterTankTargetHeaterCoolerState: 1,
153
- powerfulMode: false,
154
- },
155
- ],
156
- ])('Create DaikinCloudThermostatAccessory with %s device', async (name, climateControlEmbeddedId, deviceJson, state) => {
157
- const mockApi = { updateDevice: jest.fn().mockResolvedValue(undefined) } as unknown as DaikinApi;
158
- const device = new DaikinCloudDevice(deviceJson as any, mockApi);
159
-
160
- jest.spyOn(DaikinCloudController.prototype, 'getCloudDevices').mockImplementation(async () => {
161
- return [device];
162
- });
163
-
164
- const config = new MockPlatformConfig(true);
165
- const api = new HomebridgeAPI();
166
-
167
- const uuid = api.hap.uuid.generate(device.getId());
168
- const accessory = new api.platformAccessory("NAME_FOR_TEST", uuid);
169
- accessory.context['device'] = device;
170
-
171
- expect(() => {
172
- new AlthermaAccessory(new DaikinCloudPlatform(new Logger(), config, api), accessory as unknown as PlatformAccessory<DaikinCloudAccessoryContext>);
173
- }).not.toThrow();
174
-
175
- const homebridgeAccessory = new AlthermaAccessory(new DaikinCloudPlatform(new Logger(), config, api), accessory as unknown as PlatformAccessory<DaikinCloudAccessoryContext>);
176
-
177
-
178
- if (typeof state.activeState !== 'undefined') {
179
- expect(await homebridgeAccessory.service?.handleActiveStateGet()).toBe(state.activeState);
180
- await expect(homebridgeAccessory.service!.handleActiveStateSet(1)).resolves.not.toThrow();
181
- await expect(homebridgeAccessory.service!.handleActiveStateSet(0)).resolves.not.toThrow();
182
- }
183
-
184
- expect(await homebridgeAccessory.service?.handleCurrentTemperatureGet()).toBe(state.currentTemperature);
185
-
186
- if (typeof state.coolingThresholdTemperature !== 'undefined') {
187
- expect(await homebridgeAccessory.service?.handleCoolingThresholdTemperatureGet()).toBe(state.coolingThresholdTemperature);
188
- await expect(homebridgeAccessory.service!.handleCoolingThresholdTemperatureSet(21)).resolves.not.toThrow();
189
- }
190
-
191
- if (typeof state.heatingThresholdTemperature !== 'undefined') {
192
- expect(await homebridgeAccessory.service?.handleHeatingThresholdTemperatureGet()).toBe(state.heatingThresholdTemperature);
193
- await expect(homebridgeAccessory.service!.handleHeatingThresholdTemperatureSet(25)).resolves.not.toThrow();
194
- }
195
-
196
- if (typeof state.targetHeaterCoolerState !== 'undefined') {
197
- expect(await homebridgeAccessory.service?.handleTargetHeaterCoolerStateGet()).toBe(state.targetHeaterCoolerState);
198
- await expect(homebridgeAccessory.service!.handleTargetHeaterCoolerStateSet(1)).resolves.not.toThrow();
199
- }
200
-
201
-
202
- if (typeof state.hotWaterTankCurrentHeatingCoolingState !== 'undefined') {
203
- expect(await homebridgeAccessory.hotWaterTankService?.handleHotWaterTankCurrentHeatingCoolingStateGet()).toBe(state.hotWaterTankCurrentHeatingCoolingState);
204
- }
205
- if (typeof state.hotWaterTankCurrentTemperature !== 'undefined') {
206
- expect(await homebridgeAccessory.hotWaterTankService?.handleHotWaterTankCurrentTemperatureGet()).toBe(state.hotWaterTankCurrentTemperature);
207
- }
208
- if (typeof state.hotWaterTankHeatingTargetTemperature !== 'undefined') {
209
- expect(await homebridgeAccessory.hotWaterTankService?.handleHotWaterTankHeatingTargetTemperatureGet()).toBe(state.hotWaterTankHeatingTargetTemperature);
210
- }
211
- if (typeof state.hotWaterTankTargetHeaterCoolerState !== 'undefined') {
212
- expect(await homebridgeAccessory.hotWaterTankService?.handleHotWaterTankTargetHeatingCoolingStateGet()).toBe(state.hotWaterTankTargetHeaterCoolerState);
213
- }
214
- if (typeof state.powerfulMode !== 'undefined') {
215
- expect(await homebridgeAccessory.hotWaterTankService?.handlePowerfulModeGet()).toBe(state.powerfulMode);
216
- }
217
-
218
- });
219
-
220
- test('DaikinCloudAirConditioningAccessory Getters', async () => {
221
- const mockApi = { updateDevice: jest.fn().mockResolvedValue(undefined) } as unknown as DaikinApi;
222
- const device = new DaikinCloudDevice(althermaHeatPump as any, mockApi);
223
-
224
- jest.spyOn(DaikinCloudController.prototype, 'getCloudDevices').mockImplementation(async () => {
225
- return [device];
226
- });
227
-
228
- const config = new MockPlatformConfig(false);
229
- const api = new HomebridgeAPI();
230
-
231
- const uuid = api.hap.uuid.generate(device.getId());
232
- const accessory = new api.platformAccessory(device.getData('climateControlMainZone', 'name', undefined).value as string, uuid);
233
- accessory.context['device'] = device;
234
-
235
- const homebridgeAccessory = new AlthermaAccessory(new DaikinCloudPlatform(new Logger(), config, api), accessory as unknown as PlatformAccessory<DaikinCloudAccessoryContext>);
236
-
237
- expect(await homebridgeAccessory.service?.handleActiveStateGet()).toEqual(true);
238
- expect(await homebridgeAccessory.service?.handleCurrentTemperatureGet()).toEqual(22.4);
239
- expect(await homebridgeAccessory.service?.handleHeatingThresholdTemperatureGet()).toEqual(22);
240
- expect(await homebridgeAccessory.service?.handleTargetHeaterCoolerStateGet()).toEqual(1);
241
- });
242
-
243
- test('DaikinCloudAirConditioningAccessory Setters', async () => {
244
- const mockApi = { updateDevice: jest.fn().mockResolvedValue(undefined) } as unknown as DaikinApi;
245
- const device = new DaikinCloudDevice(althermaHeatPump as any, mockApi);
246
-
247
- jest.spyOn(DaikinCloudController.prototype, 'getCloudDevices').mockImplementation(async () => {
248
- return [device];
249
- });
250
-
251
- const setDataSpy = jest.spyOn(DaikinCloudDevice.prototype, 'setData').mockImplementation();
252
-
253
- const config = new MockPlatformConfig(false);
254
- const api = new HomebridgeAPI();
255
-
256
- const uuid = api.hap.uuid.generate(device.getId());
257
- const accessory = new api.platformAccessory(device.getData('climateControlMainZone', 'name', undefined).value as string, uuid);
258
- accessory.context['device'] = device;
259
-
260
- const homebridgeAccessory = new AlthermaAccessory(new DaikinCloudPlatform(new Logger(), config, api), accessory as unknown as PlatformAccessory<DaikinCloudAccessoryContext>);
261
-
262
- await homebridgeAccessory.service?.handleActiveStateSet(1);
263
- expect(setDataSpy).toHaveBeenNthCalledWith(1, 'climateControlMainZone', 'onOffMode', 'on', undefined);
264
-
265
- await homebridgeAccessory.service?.handleActiveStateSet(0);
266
- expect(setDataSpy).toHaveBeenNthCalledWith(2, 'climateControlMainZone', 'onOffMode', 'off', undefined);
267
-
268
- await homebridgeAccessory.service?.handleCoolingThresholdTemperatureSet(21);
269
- expect(setDataSpy).toHaveBeenNthCalledWith(3, 'climateControlMainZone', 'temperatureControl', '/operationModes/cooling/setpoints/roomTemperature', 21);
270
-
271
- await homebridgeAccessory.service?.handleHeatingThresholdTemperatureSet(25);
272
- expect(setDataSpy).toHaveBeenNthCalledWith(4, 'climateControlMainZone', 'temperatureControl', '/operationModes/heating/setpoints/roomTemperature', 25);
273
-
274
- await homebridgeAccessory.service?.handleTargetHeaterCoolerStateSet(1);
275
- expect(setDataSpy).toHaveBeenNthCalledWith(5, 'climateControlMainZone', 'operationMode', 'heating', undefined);
276
- expect(setDataSpy).toHaveBeenNthCalledWith(6, 'climateControlMainZone', 'onOffMode', 'on', undefined);
277
-
278
-
279
- });
@@ -1,118 +0,0 @@
1
- import {DaikinCloudPlatform} from '../../src/platform';
2
- import {MockPlatformConfig} from '../mocks';
3
- import {DaikinCloudController, DaikinCloudDevice} from '../../src/api';
4
- import {AirConditioningAccessory, AlthermaAccessory} from '../../src/accessories';
5
- import {HomebridgeAPI} from 'homebridge/lib/api.js';
6
- import {Logger} from 'homebridge/lib/logger.js';
7
-
8
- jest.mock('../../src/api/daikin-controller');
9
- jest.mock('homebridge');
10
- jest.mock('../../src/accessories/air-conditioning-accessory');
11
- jest.mock('../../src/accessories/altherma-accessory');
12
-
13
- // Use fake timers to prevent tests from hanging due to setInterval/setTimeout in platform
14
- beforeEach(() => {
15
- jest.useFakeTimers();
16
- });
17
-
18
- afterEach(() => {
19
- jest.clearAllTimers();
20
- jest.useRealTimers();
21
- jest.resetAllMocks();
22
- });
23
-
24
- test('Initialize platform', async () => {
25
- const api = new HomebridgeAPI();
26
- const platform = new DaikinCloudPlatform(new Logger(), new MockPlatformConfig(), api);
27
-
28
- expect(DaikinCloudController).toHaveBeenCalledWith(expect.objectContaining({
29
- 'authMode': 'developer_portal',
30
- 'clientId': 'CLIENT_ID',
31
- 'clientSecret': 'CLIENT_SECRET',
32
- 'callbackServerExternalAddress': 'SERVER_EXTERNAL_ADDRESS',
33
- 'callbackServerPort': 'SERVER_PORT',
34
- 'oidcCallbackServerBindAddr': 'SERVER_BIND_ADDRESS',
35
- 'tokenFilePath': `${api.user.storagePath()}/.daikin-controller-cloud-tokenset`,
36
- }));
37
- expect(platform.updateIntervalDelay).toBe(900000);
38
- });
39
-
40
- test('DaikinCloudPlatform with new Aircondition accessory', async () => {
41
- const mockDevice = {
42
- getId: () => 'MOCK_ID',
43
- getDescription: () => ({
44
- deviceModel: 'Airco',
45
- }),
46
- getData: () => 'MOCK_DATE',
47
- desc: {
48
- managementPoints: [
49
- {
50
- 'embeddedId': 'climateControl',
51
- 'managementPointType': 'climateControl',
52
- },
53
- ],
54
- },
55
- } as unknown as DaikinCloudDevice;
56
-
57
- // Mock the constructor to set up getCloudDevices on the instance
58
- (DaikinCloudController as unknown as jest.Mock).mockImplementation(() => ({
59
- getCloudDevices: jest.fn().mockResolvedValue([mockDevice]),
60
- isAuthenticated: jest.fn().mockReturnValue(true),
61
- on: jest.fn(),
62
- updateAllDeviceData: jest.fn().mockResolvedValue(undefined),
63
- }));
64
-
65
- const api = new HomebridgeAPI();
66
-
67
- const registerPlatformAccessoriesSpy = jest.spyOn(api, 'registerPlatformAccessories');
68
-
69
- new DaikinCloudPlatform(new Logger(), new MockPlatformConfig(true), api);
70
- api.signalFinished();
71
-
72
- // Wait for async device discovery to complete using fake timers
73
- await jest.advanceTimersByTimeAsync(100);
74
-
75
- expect(AirConditioningAccessory).toHaveBeenCalled();
76
- expect(AlthermaAccessory).not.toHaveBeenCalled();
77
- expect(registerPlatformAccessoriesSpy).toHaveBeenCalledWith('@mp-consulting/homebridge-daikin-cloud', 'DaikinCloud', expect.anything());
78
- });
79
-
80
- test('DaikinCloudPlatform with new Altherma accessory', async () => {
81
- const mockDevice = {
82
- getId: () => 'MOCK_ID',
83
- getDescription: () => ({
84
- deviceModel: 'Altherma',
85
- }),
86
- getData: () => 'MOCK_DATE',
87
- desc: {
88
- managementPoints: [
89
- {
90
- 'embeddedId': 'climateControl',
91
- 'managementPointType': 'climateControl',
92
- },
93
- ],
94
- },
95
- } as unknown as DaikinCloudDevice;
96
-
97
- // Mock the constructor to set up getCloudDevices on the instance
98
- (DaikinCloudController as unknown as jest.Mock).mockImplementation(() => ({
99
- getCloudDevices: jest.fn().mockResolvedValue([mockDevice]),
100
- isAuthenticated: jest.fn().mockReturnValue(true),
101
- on: jest.fn(),
102
- updateAllDeviceData: jest.fn().mockResolvedValue(undefined),
103
- }));
104
-
105
- const api = new HomebridgeAPI();
106
-
107
- const registerPlatformAccessoriesSpy = jest.spyOn(api, 'registerPlatformAccessories');
108
-
109
- new DaikinCloudPlatform(new Logger(), new MockPlatformConfig(true), api);
110
- api.signalFinished();
111
-
112
- // Wait for async device discovery to complete using fake timers
113
- await jest.advanceTimersByTimeAsync(100);
114
-
115
- expect(AlthermaAccessory).toHaveBeenCalled();
116
- expect(AirConditioningAccessory).not.toHaveBeenCalled();
117
- expect(registerPlatformAccessoriesSpy).toHaveBeenCalledWith('@mp-consulting/homebridge-daikin-cloud', 'DaikinCloud', expect.anything());
118
- });
@@ -1,8 +0,0 @@
1
- {
2
- "access_token": "eyJ0eXAiOiJhdCtKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik1FVkdRa0l5TXprNE0wRTRNVFkzTnpJM1FUYzBNek16T0RRd05FRkVRVUpCTTBFd1EwRkZRZyJ9.eyJzY29wZSI6Im9wZW5pZCBvbmVjdGE6b25lY3RhLmFwcGxpY2F0aW9uIG9mZmxpbmVfYWNjZXNzIiwiaWF0IjoxNzY3OTc1Mzc5LCJleHAiOjE3Njc5Nzg5NzksImF1ZCI6WyJodHRwczovL2lkcC5vbmVjdGEuZGFpa2luZXVyb3BlLmNvbSIsImh0dHBzOi8vYXBpLm9uZWN0YS5kYWlraW5ldXJvcGUuY29tIiwid3NzOi8vd3NhcGkub25lY3RhLmRhaWtpbmV1cm9wZS5jb20iLCJGalM2VDVvWkh2enBaRU5JRHliRlJkdEsiXSwiaXNzIjoiaHR0cHM6Ly9jZGMuZGFpa2luLmV1L29pZGMvb3AvdjEuMC8zX3hSQjNqYVE2MmJWanFYVTFvbWFFc1BEVllDMFR3aTF6ZnExekhQdV81SEZUMHpXa0R2WkpTOTdZdzFsb0puVG0vIiwic3ViIjoiZTQzN2YzNTE4YWFkNDMxNGI0N2IzOTlhMzcyNjc4MDciLCJzaWQiOiJSekJOZmpBeU1EUTFNRFV6TlRRMFlqQTRNemN6TWpNNU16Y3pNak00TXpNek5UQXlNRGM1TjM1TlRuRnNUWEZHTlRSNFZXVmtOamRwYURkak9XWTRZMlV4TVRSMk9ITndVbEo0TFRsTVZIRjZMV3BsUzJ0dVJWaDZNVlkxT0ZRMlpXeHFZWEJTWDFwUlRGSkRkME5wYjB3dFpWQmxOalphTW5sbmEyWk9XRkZSZmc9PSIsImp0aSI6InN0Mi5zLkF0THQ4dklsVUEuZFc5X1FTUWg0YTgydG5yNXcxbWZMYnBiQ0NLTkZGQ1RJSEdRQjMtbFRrdk1aZUZRMVF3blc0Tk9qclZXQUNMOVM4b2lzdkNTRjMxWVF1M1kyd0RVWmstbktmZC1mRW8zWldrb1lUYUY0VXVWYmhTdlhFd3pwR0dGOFJGRlFVaDEuYlBCN3l3OWtHVXFZbjd6Y0trQnoyZlgzV2ZDVEM2MDJYaEY2TDVQN1pPc0EwTXhkbmk5ZVk5YmtQM0RGUUowXzlNVm9zX3R2UFZIRXZRdDhxa0tzUmcuc2MzIiwiY2xpZW50X2lkIjoiRmpTNlQ1b1pIdnpwWkVOSUR5YkZSZHRLIiwiYXpwIjoiRmpTNlQ1b1pIdnpwWkVOSUR5YkZSZHRLIn0.hXLrlKMXq-eOzzzJpFsTQ5LxBouc71cXt8zRssnwbW56lJhg0yPhYZBMdvI-hL3lZQNtPiGeiaXKOBSL3SW34CSCmtRQQhsBAxo1GC4v0SFYBxxgn1e-0ILQWE3V-VAETLv9WAzOW6BYWzThqs0f8uwLTQQgV2K-SFJPuv-sL-mp4QsSYlzS0rAeoI2erWPi0cauMIuRnEnr_RaXPnfzH7s27-PlsmMP8ZtGZP1lx2bysbMK2R2K7J_YU77rBDhSaJjj4FM7jEcXfz7ae5V4kD0P0xCy9caMboeYnZgXw-aWu7FfWK6axK-y8ZdUG2ULmZdoq1EJ_ykD_ncPIysP4Q",
3
- "token_type": "Bearer",
4
- "expires_in": 3600,
5
- "id_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImtpZCI6Ik1FVkdRa0l5TXprNE0wRTRNVFkzTnpJM1FUYzBNek16T0RRd05FRkVRVUpCTTBFd1EwRkZRZyJ9.eyJpc3MiOiJodHRwczovL2NkYy5kYWlraW4uZXUvb2lkYy9vcC92MS4wLzNfeFJCM2phUTYyYlZqcVhVMW9tYUVzUERWWUMwVHdpMXpmcTF6SFB1XzVIRlQweldrRHZaSlM5N1l3MWxvSm5UbS8iLCJleHAiOjE3OTk1MTEzNzksImlhdCI6MTc2Nzk3NTM3OSwiYXVkIjpbImh0dHBzOi8vaWRwLm9uZWN0YS5kYWlraW5ldXJvcGUuY29tIiwiaHR0cHM6Ly9hcGkub25lY3RhLmRhaWtpbmV1cm9wZS5jb20iLCJ3c3M6Ly93c2FwaS5vbmVjdGEuZGFpa2luZXVyb3BlLmNvbSIsIkZqUzZUNW9aSHZ6cFpFTklEeWJGUmR0SyJdLCJhdXRoX3RpbWUiOjE3Njc5NzUzNzgsImF6cCI6IkZqUzZUNW9aSHZ6cFpFTklEeWJGUmR0SyIsInN1YiI6ImU0MzdmMzUxOGFhZDQzMTRiNDdiMzk5YTM3MjY3ODA3IiwiYXRfaGFzaCI6IlFMZTV1bUVPdUtqS1BEM3dWT1dVQWciLCJzaWQiOiJSekJOZmpBeU1EUTFNRFV6TlRRMFlqQTRNemN6TWpNNU16Y3pNak00TXpNek5UQXlNRGM1TjM1TlRuRnNUWEZHTlRSNFZXVmtOamRwYURkak9XWTRZMlV4TVRSMk9ITndVbEo0TFRsTVZIRjZMV3BsUzJ0dVJWaDZNVlkxT0ZRMlpXeHFZWEJTWDFwUlRGSkRkME5wYjB3dFpWQmxOalphTW5sbmEyWk9XRkZSZmc9PSJ9.ObU8GEZPCTCL5DnCG5aF3TZbRnrEXwzg_EAd4OQsbL9R0LxLax6LYlydc9Raze9NTjpDwQ-ywRfxwgLvarlPGFmTS1QD6kwZnoPyBgYcgwjLK_D6izXqiFhNsUyryQnGLqgv8OpcLk0eFJm0_G0KrzcNse7oOwFnq1LQEhdOY_XQJ39L7bqBz23KEm4VoBhAJp9SD8Lmuw6_43QStPnHtoa1S3vZH7ZG6tBOyMgtZWOv7Ko1vrIrFJCuC7mYGAn2_pbFkv29ZWARjMVexvXfLCiPY3-60aALXz82HOjuCvoYoBcp-BFQvlP55_XhQ7wtonZfGJKZ6IO9RUQgVluMAQ",
6
- "refresh_token": "st2.s.AtLtr_33sg.nr11XaLz1sp_epn3Z-IjtU5PsJxdKmzh4LbBjLVsl_dwj18ZoSuB0vppfq-0_lLbuCiPqS8oYpmCtgwX_QnPkLLx6mM5873lgvVr6MGowdecJdXkSDc9RaypVqaS_Kfv.AW9Mks1v9kOiX3knTOW-3CullHpXxqPXvWNBAc7bYsTtUYRy-aMllMxrrTQN8EIHxTf6_mFxuAQQ4hDtrwqi1Q.sc3",
7
- "expires_at": 1767978980
8
- }
@@ -1,27 +0,0 @@
1
- // https://github.com/timcharper/homebridge-vivint/blob/5b3bfa4cc886c5680af3b2e31706ef9b1bf2705f/test/device_set_test.js
2
- // https://github.com/break-pointer/homebridge-tion/blob/13f1c410c6ee8ca13b41b8700c4b1de96e04b263/test/mocks.ts#L49
3
-
4
- import {PlatformConfig} from "homebridge";
5
-
6
- export const MockLogger = (...args: any[]) => jest.fn();
7
- MockLogger.debug = MockLogger;
8
- MockLogger.info = MockLogger;
9
- MockLogger.success = MockLogger;
10
- MockLogger.warn = MockLogger;
11
- MockLogger.error = MockLogger;
12
- MockLogger.log = MockLogger;
13
-
14
- export class MockPlatformConfig implements PlatformConfig {
15
- name = 'Home';
16
- platform = 'DaikinCloud';
17
- clientId = 'CLIENT_ID';
18
- clientSecret = 'CLIENT_SECRET';
19
- oidcCallbackServerBindAddr = 'SERVER_BIND_ADDRESS';
20
- callbackServerExternalAddress = 'SERVER_EXTERNAL_ADDRESS';
21
- callbackServerPort = 'SERVER_PORT';
22
- showExtraFeatures: boolean;
23
-
24
- constructor(showExtraFeatures = false) {
25
- this.showExtraFeatures = showExtraFeatures;
26
- }
27
- }