iobroker.iot 4.0.3 → 4.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/README.md +5 -517
  2. package/admin/assets/index-6Itc0U48.js +681 -0
  3. package/admin/index_m.html +1 -1
  4. package/admin/rules/assets/{hostInit-hos3Txsy.js → hostInit-Dxp6BaAc.js} +2 -2
  5. package/admin/rules/assets/index-208Qrr3S.js +1152 -0
  6. package/admin/rules/assets/{index-CbxmbJvB.js → index-Bvn52imU.js} +1 -1
  7. package/admin/rules/assets/preload-helper-BDBacUwf.js +1 -0
  8. package/admin/rules/assets/{virtualExposes-BNZJTatg.js → virtualExposes-O8-92o9I.js} +1 -1
  9. package/admin/rules/customRuleBlocks.js +2 -2
  10. package/admin/rules/i18n/de.json +8 -8
  11. package/admin/rules/i18n/es.json +8 -8
  12. package/admin/rules/i18n/fr.json +8 -8
  13. package/admin/rules/i18n/it.json +8 -8
  14. package/admin/rules/i18n/nl.json +8 -8
  15. package/admin/rules/i18n/pl.json +8 -8
  16. package/admin/rules/i18n/pt.json +8 -8
  17. package/admin/rules/i18n/ru.json +8 -8
  18. package/admin/rules/i18n/uk.json +8 -8
  19. package/admin/rules/i18n/zh-cn.json +8 -8
  20. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/AlexaResponse.js +6 -0
  21. package/build/lib/AlexaSmartHomeV3/Alexa/AlexaResponse.js.map +1 -0
  22. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/Base.js +2 -7
  23. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/Base.js.map +1 -0
  24. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/BrightnessController.js +6 -5
  25. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/BrightnessController.js.map +1 -0
  26. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorController.js +3 -2
  27. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorController.js.map +1 -0
  28. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorTemperatureController.js +4 -3
  29. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorTemperatureController.js.map +1 -0
  30. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/ContactSensor.js +3 -2
  31. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/ContactSensor.js.map +1 -0
  32. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/LockController.js +3 -2
  33. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/LockController.js.map +1 -0
  34. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/ModeController.js +4 -3
  35. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/ModeController.js.map +1 -0
  36. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/MotionSensor.js +3 -2
  37. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/MotionSensor.js.map +1 -0
  38. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/PercentageController.js +3 -2
  39. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/PercentageController.js.map +1 -0
  40. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/PowerController.js +6 -5
  41. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/PowerController.js.map +1 -0
  42. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/Speaker.js +5 -4
  43. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/Speaker.js.map +1 -0
  44. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/TemperatureSensor.js +3 -2
  45. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/TemperatureSensor.js.map +1 -0
  46. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/ThermostatController.js +5 -4
  47. package/build/lib/AlexaSmartHomeV3/Alexa/Capabilities/ThermostatController.js.map +1 -0
  48. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/ModeValues/Open.js +1 -1
  49. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/ModeValues/Open.js.map +1 -1
  50. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Base.js +20 -18
  51. package/build/lib/AlexaSmartHomeV3/Alexa/Properties/Base.js.map +1 -0
  52. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Color.js +2 -7
  53. package/build/lib/AlexaSmartHomeV3/Alexa/Properties/Color.js.map +1 -0
  54. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/DetectionState.js +9 -0
  55. package/build/lib/AlexaSmartHomeV3/Alexa/Properties/DetectionState.js.map +1 -0
  56. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/LockState.js +20 -0
  57. package/build/lib/AlexaSmartHomeV3/Alexa/Properties/LockState.js.map +1 -0
  58. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Mode.js +17 -3
  59. package/build/lib/AlexaSmartHomeV3/Alexa/Properties/Mode.js.map +1 -0
  60. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/PowerState.js +6 -0
  61. package/build/lib/AlexaSmartHomeV3/Alexa/Properties/PowerState.js.map +1 -0
  62. package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/ThermostatMode.js +3 -3
  63. package/build/lib/AlexaSmartHomeV3/Alexa/Properties/ThermostatMode.js.map +1 -0
  64. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/AdjustableControl.js +0 -3
  65. package/build/lib/AlexaSmartHomeV3/Controls/AdjustableControl.js.map +1 -0
  66. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/AdjustablePercentageControl.js +5 -7
  67. package/build/lib/AlexaSmartHomeV3/Controls/AdjustablePercentageControl.js.map +1 -0
  68. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/AirCondition.js +65 -71
  69. package/build/lib/AlexaSmartHomeV3/Controls/AirCondition.js.map +1 -0
  70. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/ContactSensor.js +5 -1
  71. package/build/lib/AlexaSmartHomeV3/Controls/ContactSensor.js.map +1 -0
  72. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Control.js +13 -29
  73. package/build/lib/AlexaSmartHomeV3/Controls/Control.js.map +1 -0
  74. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Ct.js +66 -73
  75. package/build/lib/AlexaSmartHomeV3/Controls/Ct.js.map +1 -0
  76. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Dimmer.js +32 -39
  77. package/build/lib/AlexaSmartHomeV3/Controls/Dimmer.js.map +1 -0
  78. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Gate.js +5 -7
  79. package/build/lib/AlexaSmartHomeV3/Controls/Gate.js.map +1 -0
  80. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Hue.js +91 -89
  81. package/build/lib/AlexaSmartHomeV3/Controls/Hue.js.map +1 -0
  82. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Light.js +10 -14
  83. package/build/lib/AlexaSmartHomeV3/Controls/Light.js.map +1 -0
  84. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Lock.js +6 -8
  85. package/build/lib/AlexaSmartHomeV3/Controls/Lock.js.map +1 -0
  86. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Motion.js +5 -1
  87. package/build/lib/AlexaSmartHomeV3/Controls/Motion.js.map +1 -0
  88. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/ReadOnlyDetector.js +0 -10
  89. package/build/lib/AlexaSmartHomeV3/Controls/ReadOnlyDetector.js.map +1 -0
  90. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Socket.js +5 -7
  91. package/build/lib/AlexaSmartHomeV3/Controls/Socket.js.map +1 -0
  92. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Temperature.js +5 -7
  93. package/build/lib/AlexaSmartHomeV3/Controls/Temperature.js.map +1 -0
  94. package/build/lib/AlexaSmartHomeV3/Controls/Thermostat.js +82 -0
  95. package/build/lib/AlexaSmartHomeV3/Controls/Thermostat.js.map +1 -0
  96. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/VacuumCleaner.js +5 -7
  97. package/build/lib/AlexaSmartHomeV3/Controls/VacuumCleaner.js.map +1 -0
  98. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Volume.js +29 -36
  99. package/build/lib/AlexaSmartHomeV3/Controls/Volume.js.map +1 -0
  100. package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/index.js +6 -6
  101. package/build/lib/AlexaSmartHomeV3/Controls/index.js.map +1 -0
  102. package/{build-backend → build}/lib/AlexaSmartHomeV3/DeviceManager.js +16 -10
  103. package/build/lib/AlexaSmartHomeV3/DeviceManager.js.map +1 -0
  104. package/{build-backend → build}/lib/AlexaSmartHomeV3/Helpers/AdapterProvider.js +4 -1
  105. package/build/lib/AlexaSmartHomeV3/Helpers/AdapterProvider.js.map +1 -0
  106. package/{build-backend → build}/lib/AlexaSmartHomeV3/Helpers/FileHelper.js +1 -3
  107. package/build/lib/AlexaSmartHomeV3/Helpers/FileHelper.js.map +1 -0
  108. package/{build-backend → build}/lib/AlexaSmartHomeV3/Helpers/RateLimiter.js +23 -16
  109. package/build/lib/AlexaSmartHomeV3/Helpers/RateLimiter.js.map +1 -0
  110. package/{build-backend → build}/lib/AlexaSmartHomeV3/Helpers/Utils.js +0 -1
  111. package/build/lib/AlexaSmartHomeV3/Helpers/Utils.js.map +1 -0
  112. package/{build-backend → build}/lib/alexaSmartHomeV3.js +3 -3
  113. package/build/lib/alexaSmartHomeV3.js.map +1 -0
  114. package/{build-backend → build}/main.js +29 -9
  115. package/build/main.js.map +1 -0
  116. package/io-package.json +30 -29
  117. package/package.json +13 -13
  118. package/admin/assets/index-BjEWVyqN.js +0 -681
  119. package/admin/rules/assets/index-_Y2FN5EZ.js +0 -1152
  120. package/admin/rules/assets/preload-helper-Dp1pzeXC.js +0 -1
  121. package/build-backend/lib/AlexaSmartHomeV3/Alexa/AlexaResponse.js.map +0 -1
  122. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/Base.js.map +0 -1
  123. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/BrightnessController.js.map +0 -1
  124. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorController.js.map +0 -1
  125. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorTemperatureController.js.map +0 -1
  126. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ContactSensor.js.map +0 -1
  127. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/LockController.js.map +0 -1
  128. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ModeController.js.map +0 -1
  129. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/MotionSensor.js.map +0 -1
  130. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/PercentageController.js.map +0 -1
  131. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/PowerController.js.map +0 -1
  132. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/Speaker.js.map +0 -1
  133. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/TemperatureSensor.js.map +0 -1
  134. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Capabilities/ThermostatController.js.map +0 -1
  135. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Base.js.map +0 -1
  136. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Color.js.map +0 -1
  137. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/DetectionState.js.map +0 -1
  138. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/LockState.js.map +0 -1
  139. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/Mode.js.map +0 -1
  140. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/PowerState.js.map +0 -1
  141. package/build-backend/lib/AlexaSmartHomeV3/Alexa/Properties/ThermostatMode.js.map +0 -1
  142. package/build-backend/lib/AlexaSmartHomeV3/Controls/AdjustableControl.js.map +0 -1
  143. package/build-backend/lib/AlexaSmartHomeV3/Controls/AdjustablePercentageControl.js.map +0 -1
  144. package/build-backend/lib/AlexaSmartHomeV3/Controls/AirCondition.js.map +0 -1
  145. package/build-backend/lib/AlexaSmartHomeV3/Controls/ContactSensor.js.map +0 -1
  146. package/build-backend/lib/AlexaSmartHomeV3/Controls/Control.js.map +0 -1
  147. package/build-backend/lib/AlexaSmartHomeV3/Controls/Ct.js.map +0 -1
  148. package/build-backend/lib/AlexaSmartHomeV3/Controls/Dimmer.js.map +0 -1
  149. package/build-backend/lib/AlexaSmartHomeV3/Controls/Gate.js.map +0 -1
  150. package/build-backend/lib/AlexaSmartHomeV3/Controls/Hue.js.map +0 -1
  151. package/build-backend/lib/AlexaSmartHomeV3/Controls/Light.js.map +0 -1
  152. package/build-backend/lib/AlexaSmartHomeV3/Controls/Lock.js.map +0 -1
  153. package/build-backend/lib/AlexaSmartHomeV3/Controls/Motion.js.map +0 -1
  154. package/build-backend/lib/AlexaSmartHomeV3/Controls/ReadOnlyDetector.js.map +0 -1
  155. package/build-backend/lib/AlexaSmartHomeV3/Controls/Socket.js.map +0 -1
  156. package/build-backend/lib/AlexaSmartHomeV3/Controls/Temperature.js.map +0 -1
  157. package/build-backend/lib/AlexaSmartHomeV3/Controls/Thermostat.js +0 -85
  158. package/build-backend/lib/AlexaSmartHomeV3/Controls/Thermostat.js.map +0 -1
  159. package/build-backend/lib/AlexaSmartHomeV3/Controls/VacuumCleaner.js.map +0 -1
  160. package/build-backend/lib/AlexaSmartHomeV3/Controls/Volume.js.map +0 -1
  161. package/build-backend/lib/AlexaSmartHomeV3/Controls/index.js.map +0 -1
  162. package/build-backend/lib/AlexaSmartHomeV3/DeviceManager.js.map +0 -1
  163. package/build-backend/lib/AlexaSmartHomeV3/Helpers/AdapterProvider.js.map +0 -1
  164. package/build-backend/lib/AlexaSmartHomeV3/Helpers/FileHelper.js.map +0 -1
  165. package/build-backend/lib/AlexaSmartHomeV3/Helpers/RateLimiter.js.map +0 -1
  166. package/build-backend/lib/AlexaSmartHomeV3/Helpers/Utils.js.map +0 -1
  167. package/build-backend/lib/alexaSmartHomeV3.js.map +0 -1
  168. package/build-backend/main.js.map +0 -1
  169. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/index.js +0 -0
  170. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Capabilities/index.js.map +0 -0
  171. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Directives/Base.js +0 -0
  172. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Directives/Base.js.map +0 -0
  173. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Directives/ChangeReport.js +0 -0
  174. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Directives/ChangeReport.js.map +0 -0
  175. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Directives/Discovery.js +0 -0
  176. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Directives/Discovery.js.map +0 -0
  177. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Directives/ReportState.js +0 -0
  178. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Directives/ReportState.js.map +0 -0
  179. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Directives/index.js +0 -0
  180. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Directives/index.js.map +0 -0
  181. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/ModeValues/Base.js +0 -0
  182. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/ModeValues/Base.js.map +0 -0
  183. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/ModeValues/Closed.js +0 -0
  184. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/ModeValues/Closed.js.map +0 -0
  185. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/ModeValues/index.js +0 -0
  186. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/ModeValues/index.js.map +0 -0
  187. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/AdjustableProperty.js +0 -0
  188. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/AdjustableProperty.js.map +0 -0
  189. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Brightness.js +0 -0
  190. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Brightness.js.map +0 -0
  191. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/ColorTemperatureInKelvin.js +0 -0
  192. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/ColorTemperatureInKelvin.js.map +0 -0
  193. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Muted.js +0 -0
  194. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Muted.js.map +0 -0
  195. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Percentage.js +0 -0
  196. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Percentage.js.map +0 -0
  197. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/TargetSetpoint.js +0 -0
  198. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/TargetSetpoint.js.map +0 -0
  199. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Temperature.js +0 -0
  200. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Temperature.js.map +0 -0
  201. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Volume.js +0 -0
  202. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/Volume.js.map +0 -0
  203. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/index.js +0 -0
  204. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Alexa/Properties/index.js.map +0 -0
  205. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Blind.js +0 -0
  206. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Blind.js.map +0 -0
  207. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Door.js +0 -0
  208. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Door.js.map +0 -0
  209. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Slider.js +0 -0
  210. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Slider.js.map +0 -0
  211. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/VolumeGroup.js +0 -0
  212. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/VolumeGroup.js.map +0 -0
  213. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Window.js +0 -0
  214. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Controls/Window.js.map +0 -0
  215. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Device.js +0 -0
  216. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Device.js.map +0 -0
  217. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Exceptions/AlexaV3Exception.js +0 -0
  218. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Exceptions/AlexaV3Exception.js.map +0 -0
  219. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Exceptions/HourlyDeviceRateLimitExceeded.js +0 -0
  220. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Exceptions/HourlyDeviceRateLimitExceeded.js.map +0 -0
  221. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Exceptions/OverallDailyRateLimitExceeded.js +0 -0
  222. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Exceptions/OverallDailyRateLimitExceeded.js.map +0 -0
  223. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Helpers/IotProxy.js +0 -0
  224. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Helpers/IotProxy.js.map +0 -0
  225. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Helpers/Logger.js +0 -0
  226. /package/{build-backend → build}/lib/AlexaSmartHomeV3/Helpers/Logger.js.map +0 -0
  227. /package/{build-backend → build}/lib/Utils.js +0 -0
  228. /package/{build-backend → build}/lib/Utils.js.map +0 -0
  229. /package/{build-backend → build}/lib/adminCommonSocket.js +0 -0
  230. /package/{build-backend → build}/lib/adminCommonSocket.js.map +0 -0
  231. /package/{build-backend → build}/lib/alexaCustom.js +0 -0
  232. /package/{build-backend → build}/lib/alexaCustom.js.map +0 -0
  233. /package/{build-backend → build}/lib/alexaSmartHomeV2.js +0 -0
  234. /package/{build-backend → build}/lib/alisa.js +0 -0
  235. /package/{build-backend → build}/lib/devices.js +0 -0
  236. /package/{build-backend → build}/lib/devices.js.map +0 -0
  237. /package/{build-backend → build}/lib/functions.js +0 -0
  238. /package/{build-backend → build}/lib/functions.js.map +0 -0
  239. /package/{build-backend → build}/lib/googleHome.js +0 -0
  240. /package/{build-backend → build}/lib/notifications.js +0 -0
  241. /package/{build-backend → build}/lib/notifications.js.map +0 -0
  242. /package/{build-backend → build}/lib/remote.js +0 -0
  243. /package/{build-backend → build}/lib/remote.js.map +0 -0
  244. /package/{build-backend → build}/lib/rooms.js +0 -0
  245. /package/{build-backend → build}/lib/rooms.js.map +0 -0
  246. /package/{build-backend → build}/lib/texts.js +0 -0
  247. /package/{build-backend → build}/lib/texts.js.map +0 -0
  248. /package/{build-backend → build}/lib/translate.js +0 -0
  249. /package/{build-backend → build}/lib/translate.js.map +0 -0
  250. /package/{build-backend → build}/lib/visuApp.js +0 -0
  251. /package/{build-backend → build}/lib/visuApp.js.map +0 -0
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./bootstrap-Ba57tu25.js","./ActionVisu__loadShare__react_mf_2_dom__loadShare__-Bs1o8DtQ.js","./ActionVisu__loadShare__react__loadShare__-BKaC-p5K.js","./_commonjsHelpers-Cpj98o6Y.js","./ActionVisu__mf_v__runtimeInit__mf_v__-DtUoI3FU.js"])))=>i.map(i=>d[i]);
2
- import{_ as n}from"./preload-helper-Dp1pzeXC.js";import"./ActionVisu__mf_v__runtimeInit__mf_v__-DtUoI3FU.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=s(e);fetch(e.href,r)}})();n(()=>import("./bootstrap-Ba57tu25.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url);
2
+ import{_ as n}from"./preload-helper-BDBacUwf.js";import"./ActionVisu__mf_v__runtimeInit__mf_v__-DtUoI3FU.js";(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const r of e)if(r.type==="childList")for(const o of r.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function s(e){const r={};return e.integrity&&(r.integrity=e.integrity),e.referrerPolicy&&(r.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?r.credentials="include":e.crossOrigin==="anonymous"?r.credentials="omit":r.credentials="same-origin",r}function i(e){if(e.ep)return;e.ep=!0;const r=s(e);fetch(e.href,r)}})();n(()=>import("./bootstrap-Ba57tu25.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url);
@@ -0,0 +1 @@
1
+ const y="modulepreload",w=function(u,c){return new URL(u,c).href},v={},P=function(c,a,f){let d=Promise.resolve();if(a&&a.length>0){let E=function(t){return Promise.all(t.map(o=>Promise.resolve(o).then(s=>({status:"fulfilled",value:s}),s=>({status:"rejected",reason:s}))))};const r=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),m=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));d=E(a.map(t=>{if(t=w(t,f),t in v)return;v[t]=!0;const o=t.endsWith(".css"),s=o?'[rel="stylesheet"]':"";if(f)for(let l=r.length-1;l>=0;l--){const i=r[l];if(i.href===t&&(!o||i.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${t}"]${s}`))return;const n=document.createElement("link");if(n.rel=o?"stylesheet":y,o||(n.as="script"),n.crossOrigin="",n.href=t,m&&n.setAttribute("nonce",m),document.head.appendChild(n),o)return new Promise((l,i)=>{n.addEventListener("load",l),n.addEventListener("error",()=>i(new Error(`Unable to preload CSS for ${t}`)))})}))}function h(r){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=r,window.dispatchEvent(e),!e.defaultPrevented)throw r}return d.then(r=>{for(const e of r||[])e.status==="rejected"&&h(e.reason);return c().catch(h)})};export{P as _};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ActionVisu-DE8dgNVF.js","./ActionVisu__mf_v__runtimeInit__mf_v__-DtUoI3FU.js"])))=>i.map(i=>d[i]);
2
- import{_ as o}from"./preload-helper-Dp1pzeXC.js";const a={"./ActionVisu":async()=>{const t=await o(()=>import("./ActionVisu-DE8dgNVF.js"),__vite__mapDeps([0,1]),import.meta.url),e={};return Object.assign(e,t),Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),e}};export{a as default};
2
+ import{_ as o}from"./preload-helper-BDBacUwf.js";const a={"./ActionVisu":async()=>{const t=await o(()=>import("./ActionVisu-DE8dgNVF.js"),__vite__mapDeps([0,1]),import.meta.url),e={};return Object.assign(e,t),Object.defineProperty(e,"__esModule",{value:!0,enumerable:!1}),e}};export{a as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-_Y2FN5EZ.js","./assets/ActionVisu__loadShare__react__loadShare__-BKaC-p5K.js","./assets/_commonjsHelpers-Cpj98o6Y.js","./assets/ActionVisu__mf_v__runtimeInit__mf_v__-DtUoI3FU.js","./assets/ActionVisu__loadShare__react_mf_2_dom__loadShare__-Bs1o8DtQ.js","./assets/index-Do-nCdWy.js","./assets/index-DjPMvPni.js"])))=>i.map(i=>d[i]);
2
- import{i as m,A as p}from"./assets/ActionVisu__mf_v__runtimeInit__mf_v__-DtUoI3FU.js";import s from"./assets/virtualExposes-BNZJTatg.js";import{_ as n}from"./assets/preload-helper-Dp1pzeXC.js";const i={"@iobroker/adapter-react-v5":async()=>await n(()=>import("./assets/index-_Y2FN5EZ.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),react:async()=>await n(()=>import("./assets/index-Do-nCdWy.js").then(t=>t.i),__vite__mapDeps([5,2]),import.meta.url),"react-dom":async()=>await n(()=>import("./assets/index-DjPMvPni.js").then(t=>t.i),__vite__mapDeps([6,2,1,3]),import.meta.url)},a={"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"7.7.2",scope:["default"],loaded:!1,from:"ActionVisu",async get(){a["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"ActionVisu",async get(){a.react.loaded=!0;const{react:e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"ActionVisu",async get(){a["react-dom"].loaded=!0;const{"react-dom":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},f=[],u={},c="default",d="ActionVisu";async function k(e={},t=[]){const r=m({name:d,remotes:f,shared:a,plugins:[],shareStrategy:"version-first"});var o=u[c];if(o||(o=u[c]={from:d}),!(t.indexOf(o)>=0)){t.push(o),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(l){console.error(l)}return p.initResolve(r),r}}function y(e){if(!(e in s))throw new Error(`Module ${e} does not exist in container.`);return s[e]().then(t=>()=>t)}export{y as get,k as init};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./assets/index-208Qrr3S.js","./assets/ActionVisu__loadShare__react__loadShare__-BKaC-p5K.js","./assets/_commonjsHelpers-Cpj98o6Y.js","./assets/ActionVisu__mf_v__runtimeInit__mf_v__-DtUoI3FU.js","./assets/ActionVisu__loadShare__react_mf_2_dom__loadShare__-Bs1o8DtQ.js","./assets/index-Do-nCdWy.js","./assets/index-DjPMvPni.js"])))=>i.map(i=>d[i]);
2
+ import{i as m,A as p}from"./assets/ActionVisu__mf_v__runtimeInit__mf_v__-DtUoI3FU.js";import s from"./assets/virtualExposes-O8-92o9I.js";import{_ as n}from"./assets/preload-helper-BDBacUwf.js";const i={"@iobroker/adapter-react-v5":async()=>await n(()=>import("./assets/index-208Qrr3S.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url),react:async()=>await n(()=>import("./assets/index-Do-nCdWy.js").then(t=>t.i),__vite__mapDeps([5,2]),import.meta.url),"react-dom":async()=>await n(()=>import("./assets/index-DjPMvPni.js").then(t=>t.i),__vite__mapDeps([6,2,1,3]),import.meta.url)},a={"@iobroker/adapter-react-v5":{name:"@iobroker/adapter-react-v5",version:"7.7.3",scope:["default"],loaded:!1,from:"ActionVisu",async get(){a["@iobroker/adapter-react-v5"].loaded=!0;const{"@iobroker/adapter-react-v5":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},react:{name:"react",version:"18.3.1",scope:["default"],loaded:!1,from:"ActionVisu",async get(){a.react.loaded=!0;const{react:e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}},"react-dom":{name:"react-dom",version:"18.3.1",scope:["default"],loaded:!1,from:"ActionVisu",async get(){a["react-dom"].loaded=!0;const{"react-dom":e}=i,r={...await e()};return Object.defineProperty(r,"__esModule",{value:!0,enumerable:!1}),function(){return r}},shareConfig:{singleton:!0,requiredVersion:"*"}}},f=[],u={},c="default",d="ActionVisu";async function k(e={},t=[]){const r=m({name:d,remotes:f,shared:a,plugins:[],shareStrategy:"version-first"});var o=u[c];if(o||(o=u[c]={from:d}),!(t.indexOf(o)>=0)){t.push(o),r.initShareScopeMap("default",e);try{await Promise.all(await r.initializeSharing("default",{strategy:"version-first",from:"build",initScope:t}))}catch(l){console.error(l)}return p.initResolve(r),r}}function y(e){if(!(e in s))throw new Error(`Module ${e} does not exist in container.`);return s[e]().then(t=>()=>t)}export{y as get,k as init};
@@ -1,9 +1,9 @@
1
1
  {
2
- "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Sie können %s im Text verwenden, um den aktuellen Triggerwert anzuzeigen, oder %id, um die ID des ausgelösten Objekts anzuzeigen",
3
- "Sends to ioBroker.visu": "Sendet an ioBroker.visu",
4
- "ioBroker.visu": "ioBroker.visu",
5
- "Message:": "Nachricht:",
6
- "Title:": "Titel:",
7
- "Expire(sec):": "Ablauf (Sek.):",
8
- "Priority": "Priorität"
9
- }
2
+ "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "%s kann im Text verwendet werden, um den aktuellen Triggerwert anzuzeigen, oder %id, um die ID des ausgelösten Objekts anzuzeigen",
3
+ "Sends to ioBroker.visu": "Sendet an ioBroker.visu",
4
+ "ioBroker.visu": "ioBroker.visu",
5
+ "Message:": "Nachricht:",
6
+ "Title:": "Titel:",
7
+ "Expire(sec):": "Ablauf (Sek.):",
8
+ "Priority": "Priorität"
9
+ }
@@ -1,9 +1,9 @@
1
1
  {
2
- "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Puede usar %s en el texto para mostrar el valor de activación actual o %id para mostrar el ID del objeto activado",
3
- "Sends to ioBroker.visu": "Envía a ioBroker.visu",
4
- "ioBroker.visu": "ioBroker.visu",
5
- "Message:": "Mensaje:",
6
- "Title:": "Título:",
7
- "Expire(sec):": "Caducar (seg):",
8
- "Priority": "Prioridad"
9
- }
2
+ "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Puede usar %s en el texto para mostrar el valor de activación actual o %id para mostrar el ID del objeto activado",
3
+ "Sends to ioBroker.visu": "Envía a ioBroker.visu",
4
+ "ioBroker.visu": "ioBroker.visu",
5
+ "Message:": "Mensaje:",
6
+ "Title:": "Título:",
7
+ "Expire(sec):": "Caducar (seg):",
8
+ "Priority": "Prioridad"
9
+ }
@@ -1,9 +1,9 @@
1
1
  {
2
- "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Vous pouvez utiliser %s dans le texte pour afficher la valeur de déclenchement actuelle ou %id pour afficher l'ID de l'objet déclenché",
3
- "Sends to ioBroker.visu": "Envoie à ioBroker.visu",
4
- "ioBroker.visu": "ioBroker.visu",
5
- "Message:": "Message:",
6
- "Title:": "Titre:",
7
- "Expire(sec):": "Expire (sec):",
8
- "Priority": "Priorité"
9
- }
2
+ "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Vous pouvez utiliser %s dans le texte pour afficher la valeur de déclenchement actuelle ou %id pour afficher l'ID de l'objet déclenché",
3
+ "Sends to ioBroker.visu": "Envoie à ioBroker.visu",
4
+ "ioBroker.visu": "ioBroker.visu",
5
+ "Message:": "Message:",
6
+ "Title:": "Titre:",
7
+ "Expire(sec):": "Expire (sec):",
8
+ "Priority": "Priorité"
9
+ }
@@ -1,9 +1,9 @@
1
1
  {
2
- "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "È possibile utilizzare %s nel testo per visualizzare il valore di attivazione corrente o %id per visualizzare l'ID oggetto attivato",
3
- "Sends to ioBroker.visu": "Invia a ioBroker.visu",
4
- "ioBroker.visu": "ioBroker.visu",
5
- "Message:": "Messaggio:",
6
- "Title:": "Titolo:",
7
- "Expire(sec):": "Scadenza(sec):",
8
- "Priority": "Priorità"
9
- }
2
+ "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "È possibile utilizzare %s nel testo per visualizzare il valore di attivazione corrente o %id per visualizzare l'ID oggetto attivato",
3
+ "Sends to ioBroker.visu": "Invia a ioBroker.visu",
4
+ "ioBroker.visu": "ioBroker.visu",
5
+ "Message:": "Messaggio:",
6
+ "Title:": "Titolo:",
7
+ "Expire(sec):": "Scadenza(sec):",
8
+ "Priority": "Priorità"
9
+ }
@@ -1,9 +1,9 @@
1
1
  {
2
- "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "U kunt %s in de tekst gebruiken om de huidige triggerwaarde weer te geven of %id om de getriggerde object-ID weer te geven",
3
- "Sends to ioBroker.visu": "Verzendt naar ioBroker.visu",
4
- "ioBroker.visu": "ioBroker.visu",
5
- "Message:": "Bericht:",
6
- "Title:": "Titel:",
7
- "Expire(sec):": "Verlopen (sec):",
8
- "Priority": "Prioriteit"
9
- }
2
+ "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "U kunt %s in de tekst gebruiken om de huidige triggerwaarde weer te geven of %id om de getriggerde object-ID weer te geven",
3
+ "Sends to ioBroker.visu": "Verzendt naar ioBroker.visu",
4
+ "ioBroker.visu": "ioBroker.visu",
5
+ "Message:": "Bericht:",
6
+ "Title:": "Titel:",
7
+ "Expire(sec):": "Verlopen (sec):",
8
+ "Priority": "Prioriteit"
9
+ }
@@ -1,9 +1,9 @@
1
1
  {
2
- "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Możesz użyć %s w tekście, aby wyświetlić bieżącą wartość wyzwalacza lub %id, aby wyświetlić identyfikator wyzwalanego obiektu",
3
- "Sends to ioBroker.visu": "Wysyła do ioBroker.visu",
4
- "ioBroker.visu": "ioBroker.visu",
5
- "Message:": "Wiadomość:",
6
- "Title:": "Tytuł:",
7
- "Expire(sec):": "Wygaśnięcie (s):",
8
- "Priority": "Priorytet"
9
- }
2
+ "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Możesz użyć %s w tekście, aby wyświetlić bieżącą wartość wyzwalacza lub %id, aby wyświetlić identyfikator wyzwalanego obiektu",
3
+ "Sends to ioBroker.visu": "Wysyła do ioBroker.visu",
4
+ "ioBroker.visu": "ioBroker.visu",
5
+ "Message:": "Wiadomość:",
6
+ "Title:": "Tytuł:",
7
+ "Expire(sec):": "Wygaśnięcie (s):",
8
+ "Priority": "Priorytet"
9
+ }
@@ -1,9 +1,9 @@
1
1
  {
2
- "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Você pode usar %s no texto para exibir o valor atual do acionador ou %id para exibir o ID do objeto acionado",
3
- "Sends to ioBroker.visu": "Envia para ioBroker.visu",
4
- "ioBroker.visu": "ioBroker.visu",
5
- "Message:": "Mensagem:",
6
- "Title:": "Título:",
7
- "Expire(sec):": "Expirar (seg):",
8
- "Priority": "Prioridade"
9
- }
2
+ "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Você pode usar %s no texto para exibir o valor atual do acionador ou %id para exibir o ID do objeto acionado",
3
+ "Sends to ioBroker.visu": "Envia para ioBroker.visu",
4
+ "ioBroker.visu": "ioBroker.visu",
5
+ "Message:": "Mensagem:",
6
+ "Title:": "Título:",
7
+ "Expire(sec):": "Expirar (seg):",
8
+ "Priority": "Prioridade"
9
+ }
@@ -1,9 +1,9 @@
1
1
  {
2
- "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Вы можете использовать %s в тексте, чтобы отобразить текущее значение триггера, или %id, чтобы отобразить идентификатор сработавшего объекта.",
3
- "Sends to ioBroker.visu": "Отправляет на ioBroker.visu",
4
- "ioBroker.visu": "ioBroker.visu",
5
- "Message:": "Сообщение:",
6
- "Title:": "Заголовок:",
7
- "Expire(sec):": "Срок действия (сек):",
8
- "Priority": "приоритет"
9
- }
2
+ "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Вы можете использовать %s в тексте, чтобы отобразить текущее значение триггера, или %id, чтобы отобразить идентификатор сработавшего объекта.",
3
+ "Sends to ioBroker.visu": "Отправляет на ioBroker.visu",
4
+ "ioBroker.visu": "ioBroker.visu",
5
+ "Message:": "Сообщение:",
6
+ "Title:": "Заголовок:",
7
+ "Expire(sec):": "Срок действия (сек):",
8
+ "Priority": "приоритет"
9
+ }
@@ -1,9 +1,9 @@
1
1
  {
2
- "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Ви можете використовувати %s в тексті, щоб відобразити поточне значення тригера, або %id, щоб відобразити ідентифікатор об'єкта, що спрацював. ",
3
- "Sends to ioBroker.visu": "Надсилає на ioBroker.visu",
4
- "ioBroker.visu": "ioBroker.visu",
5
- "Message:": "Повідомлення:",
6
- "Title:": "Назва:",
7
- "Expire(sec):": "Термін дії (сек.):",
8
- "Priority": "Пріоритет"
9
- }
2
+ "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "Ви можете використовувати %s в тексті, щоб відобразити поточне значення тригера, або %id, щоб відобразити ідентифікатор об'єкта, що спрацював. ",
3
+ "Sends to ioBroker.visu": "Надсилає на ioBroker.visu",
4
+ "ioBroker.visu": "ioBroker.visu",
5
+ "Message:": "Повідомлення:",
6
+ "Title:": "Назва:",
7
+ "Expire(sec):": "Термін дії (сек.):",
8
+ "Priority": "Пріоритет"
9
+ }
@@ -1,9 +1,9 @@
1
1
  {
2
- "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "您可以在文本中使用 %s 显示当前触发值或使用 %id 显示触发对象 ID",
3
- "Sends to ioBroker.visu": "发送到 ioBroker.visu",
4
- "ioBroker.visu": "ioBroker.visu",
5
- "Message:": "信息:",
6
- "Title:": "标题:",
7
- "Expire(sec):": "过期(秒):",
8
- "Priority": "优先事项"
9
- }
2
+ "You can use %s in the text to display current trigger value or %id to display the triggered object ID": "您可以在文本中使用 %s 显示当前触发值或使用 %id 显示触发对象 ID",
3
+ "Sends to ioBroker.visu": "发送到 ioBroker.visu",
4
+ "ioBroker.visu": "ioBroker.visu",
5
+ "Message:": "信息:",
6
+ "Title:": "标题:",
7
+ "Expire(sec):": "过期(秒):",
8
+ "Priority": "优先事项"
9
+ }
@@ -59,6 +59,12 @@ class AlexaResponse {
59
59
  message: 'Unable to reach endpoint.',
60
60
  });
61
61
  }
62
+ static throttlingException(messageId) {
63
+ return AlexaResponse.errorResponse(messageId, {
64
+ type: 'THROTTLING_EXCEPTION',
65
+ message: 'Unable to reach endpoint.',
66
+ });
67
+ }
62
68
  static directiveNotSupportedByControl(controlName, namespace, messageId, payloadVersion) {
63
69
  return AlexaResponse.errorResponse(messageId, {
64
70
  type: 'INTERNAL_ERROR',
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AlexaResponse.js","sourceRoot":"","sources":["../../../../src/lib/AlexaSmartHomeV3/Alexa/AlexaResponse.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAoC;AACpC,wDAA0C;AAc1C;;GAEG;AACH,MAAqB,aAAa;IACvB,OAAO,CAEZ;IAEK,UAAU,GAAG,GAAG,CAAC;IAER,KAAK,CAAoB;IAEzC,MAAM,CAAC,iBAAiB,GAAyB,eAAe,CAAC;IAEjE,MAAM,CAAC,eAAe,CAAC,QAAuB;QAC1C,OAAO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OAAO,EAAE,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC;YACtD,UAAU,EAAE,KAAK,CAAC,oBAAoB,CAMlC,IAAI,CAAC,UAAU,EACf,EAKC,CACJ;YACD,+CAA+C;YAC/C,QAAQ,EAAE,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,QAAQ,EAAE,SAAS,CAAC;YAC9D,aAAa,EAAE,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,aAAa,EAAE,SAAS,CAAC;YACxE,SAAS,EAAE,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,SAAS,EAAE,SAAS,CAAC;YAChE,mBAAmB,EAAE,KAAK,CAAC,oBAAoB,CAAC,IAAI,CAAC,mBAAmB,EAAE,SAAS,CAAC;SACvF,CAAC;QAEF,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC;YACrB,OAAO,QAAQ,CAAC,QAAQ,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,aAAa,EAAE,CAAC;YAC1B,OAAO,QAAQ,CAAC,aAAa,CAAC;QAClC,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,SAAS,EAAE,CAAC;YACtB,OAAO,QAAQ,CAAC,SAAS,CAAC;QAC9B,CAAC;QACD,IAAI,CAAC,QAAQ,CAAC,mBAAmB,EAAE,CAAC;YAChC,OAAO,QAAQ,CAAC,mBAAmB,CAAC;QACxC,CAAC;QAED,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED;;OAEG;IACH,GAAG;QACC,OAAO,IAAI,CAAC;IAChB,CAAC;;AA9TL,gCA+TC","sourcesContent":["import { v4 as uuidv4 } from 'uuid';\nimport * as Utils from '../Helpers/Utils';\nimport type {\n AlexaV3Capability,\n AlexaV3ContextProperty,\n AlexaV3Directive,\n AlexaV3DirectiveType,\n AlexaV3DiscoverAppliance,\n AlexaV3EndpointID,\n AlexaV3Namespace,\n AlexaV3Payload,\n AlexaV3ReportedState,\n AlexaV3Request,\n} from '../types';\n\n/**\n * Helper class to generate an AlexaResponse.\n */\nexport default class AlexaResponse {\n public context?: {\n properties: AlexaV3ReportedState[];\n };\n\n public iobVersion = '1';\n\n public readonly event?: AlexaV3Directive;\n\n static ErrorResponseName: AlexaV3DirectiveType = 'ErrorResponse';\n\n static isErrorResponse(response: AlexaResponse): boolean {\n return response?.event?.header?.name === AlexaResponse.ErrorResponseName;\n }\n\n static errorResponse(messageId: string, payload: any): AlexaResponse {\n return new AlexaResponse({\n name: AlexaResponse.ErrorResponseName,\n payload,\n messageId,\n });\n }\n\n static endpointUnreachable(messageId: string): AlexaResponse {\n return AlexaResponse.errorResponse(messageId, {\n type: 'ENDPOINT_UNREACHABLE',\n message: 'Unable to reach endpoint.',\n });\n }\n\n static throttlingException(messageId: string): AlexaResponse {\n return AlexaResponse.errorResponse(messageId, {\n type: 'THROTTLING_EXCEPTION',\n message: 'Unable to reach endpoint.',\n });\n }\n\n static directiveNotSupportedByControl(\n controlName: string,\n namespace: AlexaV3Namespace,\n messageId: string,\n payloadVersion: string,\n ): AlexaResponse {\n return AlexaResponse.errorResponse(messageId, {\n type: 'INTERNAL_ERROR',\n message: `Control ${controlName} doesn't support the ${namespace} with payloadVersion ${payloadVersion}`,\n });\n }\n\n static directiveNotSupportedByDevice(\n deviceName: string,\n namespace: AlexaV3Namespace,\n messageId: string,\n payloadVersion: string,\n ): AlexaResponse {\n return AlexaResponse.errorResponse(messageId, {\n type: 'INTERNAL_ERROR',\n message: `Device ${deviceName} doesn't support the ${namespace} with payloadVersion ${payloadVersion}`,\n });\n }\n\n static nonExistingEndpoint(messageId: string, endpointId: AlexaV3EndpointID | undefined): AlexaResponse {\n return AlexaResponse.errorResponse(messageId, {\n type: 'INTERNAL_ERROR',\n message: `No endpoint with id ${endpointId} found`,\n });\n }\n\n /**\n * Composes Alexa respond on a successfully processed Alexa directive to change the capability's value of a device\n */\n static handled(event: AlexaV3Request, propertyName: string, value: any, propertyInstance?: string): AlexaResponse {\n const response = new AlexaResponse({\n correlationToken: event?.directive?.header?.correlationToken,\n token: event?.directive?.endpoint?.scope?.token,\n endpointId: event?.directive?.endpoint?.endpointId,\n messageId: event?.directive?.header?.messageId,\n });\n\n response.addContextProperty({\n namespace: event?.directive?.header?.namespace,\n name: propertyName,\n instance: propertyInstance,\n value,\n });\n\n return response;\n }\n\n /**\n * Constructor for an Alexa Response.\n *\n * @param opts Contains initialization options for the response\n */\n constructor(opts?: {\n context?: {\n properties: AlexaV3ReportedState[];\n };\n namespace?: AlexaV3Namespace;\n name?: AlexaV3DirectiveType;\n messageId?: string;\n correlationToken?: string;\n payloadVersion?: '3';\n token?: string;\n endpointId?: string;\n payload?: AlexaV3Payload;\n changeCauseType?: 'APP_INTERACTION' | 'PHYSICAL_INTERACTION' | 'VOICE_INTERACTION';\n event?: AlexaV3Directive;\n }) {\n opts ||= {};\n\n if (opts.context !== undefined) {\n this.context = Utils.defaultIfNullOrEmpty(opts.context, undefined);\n }\n\n if (opts.event !== undefined) {\n this.event = Utils.defaultIfNullOrEmpty(opts.event, undefined);\n } else {\n this.event = {\n header: {\n namespace: Utils.defaultIfNullOrEmpty<AlexaV3Namespace>(opts.namespace, 'Alexa'),\n name: Utils.defaultIfNullOrEmpty<AlexaV3DirectiveType>(opts.name, 'Response'),\n messageId: Utils.defaultIfNullOrEmpty(opts.messageId, uuidv4()),\n correlationToken: Utils.defaultIfNullOrEmpty(opts.correlationToken, undefined),\n payloadVersion: Utils.defaultIfNullOrEmpty<'3'>(opts.payloadVersion, '3'),\n },\n endpoint: {\n scope: {\n type: 'BearerToken',\n token: Utils.defaultIfNullOrEmpty(opts.token, 'INVALID'),\n },\n endpointId: Utils.defaultIfNullOrEmpty(opts.endpointId, 'INVALID'),\n },\n payload: Utils.defaultIfNullOrEmpty(opts.payload, {}),\n };\n\n if (opts.changeCauseType) {\n this.event.payload.change = {\n cause: {\n type: opts.changeCauseType,\n },\n properties: [],\n };\n }\n }\n\n if (!this.event) {\n throw new Error('Event is not defined');\n }\n\n // No endpoint in an AcceptGrant or Discover request\n if (this.event.header.name === 'AcceptGrant.Response' || this.event.header.name === 'Discover.Response') {\n delete this.event.endpoint;\n }\n }\n\n addContext(): void {\n this.context ||= { properties: [] };\n }\n\n /**\n * Add a property to the context.\n *\n * @param opts Contains options for the property.\n */\n addContextProperty(opts: {\n namespace?: AlexaV3Namespace;\n instance?: string;\n name?: string;\n value?: any;\n timeOfSample?: string;\n uncertaintyInMilliseconds?: number;\n }): void {\n this.addContext();\n\n const property = {\n namespace: Utils.defaultIfNullOrEmpty(opts.namespace, 'Alexa.EndpointHealth'),\n instance: Utils.defaultIfNullOrEmpty(opts.instance, undefined),\n name: Utils.defaultIfNullOrEmpty(opts.name, 'connectivity'),\n value: Utils.defaultIfNullOrEmpty(opts.value, { value: 'OK' }),\n timeOfSample: Utils.defaultIfNullOrEmpty(opts.timeOfSample, new Date().toISOString()),\n uncertaintyInMilliseconds: Utils.defaultIfNullOrEmpty(opts.uncertaintyInMilliseconds, 0),\n };\n\n if (!property.instance) {\n delete property.instance;\n }\n\n this.context!.properties.push(property);\n }\n\n /**\n * Add a property to the payload.\n *\n * @param opts Contains options for the property.\n */\n addPayloadChangeProperty(opts: AlexaV3ContextProperty): void {\n opts ||= {} as AlexaV3ContextProperty;\n\n const property = {\n namespace: Utils.defaultIfNullOrEmpty(opts.namespace, 'Alexa.EndpointHealth'),\n instance: Utils.defaultIfNullOrEmpty(opts.instance, undefined),\n name: Utils.defaultIfNullOrEmpty(opts.name, 'connectivity'),\n value: Utils.defaultIfNullOrEmpty(opts.value, { value: 'OK' }),\n timeOfSample: Utils.defaultIfNullOrEmpty(opts.timeOfSample, new Date().toISOString()),\n uncertaintyInMilliseconds: Utils.defaultIfNullOrEmpty(opts.uncertaintyInMilliseconds, 0),\n };\n\n if (!property.instance) {\n delete property.instance;\n }\n\n if (!this.event) {\n throw new Error('Event is not defined');\n }\n this.event.payload.change ||= { properties: [], cause: { type: 'APP_INTERACTION' } };\n\n this.event.payload.change.properties.push(property);\n }\n\n static alexaCapability(): AlexaV3Capability[] {\n return [\n {\n type: 'AlexaInterface',\n interface: 'Alexa',\n version: '3',\n },\n ];\n }\n\n /**\n * Adds an endpoint to the payload.\n *\n * @param opts Contains options for the endpoint.\n */\n addPayloadEndpoint(opts: AlexaV3DiscoverAppliance): void {\n if (!this.event) {\n throw new Error('Event is not defined');\n }\n\n this.event.payload.endpoints ||= [];\n\n opts ||= {} as AlexaV3DiscoverAppliance;\n\n // construct the proper structure expected for the endpoint\n const endpoint: AlexaV3DiscoverAppliance = {\n endpointId: Utils.defaultIfNullOrEmpty(opts.endpointId, 'dummy-endpoint-001'),\n manufacturerName: Utils.defaultIfNullOrEmpty(opts.manufacturerName, 'ioBroker Group'),\n description: Utils.defaultIfNullOrEmpty(opts.description, 'Device controlled by ioBroker'),\n friendlyName: Utils.defaultIfNullOrEmpty(opts.friendlyName, 'ioBroker Stub Endpoint'),\n displayCategories: Utils.defaultIfNullOrEmpty(opts.displayCategories, ['OTHER']),\n capabilities: AlexaResponse.alexaCapability().concat(\n Utils.defaultIfNullOrEmpty<AlexaV3Capability[]>(opts.capabilities, []),\n ),\n cookie: undefined,\n };\n\n if (Object.prototype.hasOwnProperty.call(opts, 'cookie')) {\n endpoint.cookie = Utils.defaultIfNullOrEmpty<Record<string, string>>(opts.cookie, {});\n }\n\n this.event.payload.endpoints.push(endpoint);\n }\n\n /**\n * Creates a capability for an endpoint within the payload.\n *\n * @param opts Contains options for the endpoint capability.\n */\n asEndpointCapability(opts?: AlexaV3Capability): AlexaV3Capability {\n opts ||= {} as AlexaV3Capability;\n\n const response = {\n type: Utils.defaultIfNullOrEmpty(opts.type, 'AlexaInterface'),\n interface: Utils.defaultIfNullOrEmpty(opts.interface, 'Alexa'),\n version: Utils.defaultIfNullOrEmpty(opts.version, '3'),\n properties: Utils.defaultIfNullOrEmpty<{\n supported: { name: string }[];\n proactivelyReported?: boolean;\n retrievable?: boolean;\n nonControllable?: boolean;\n }>(\n opts.properties,\n {} as {\n supported: { name: string }[];\n proactivelyReported?: boolean;\n retrievable?: boolean;\n nonControllable?: boolean;\n },\n ),\n // not all capabilities have the following ones\n instance: Utils.defaultIfNullOrEmpty(opts.instance, undefined),\n configuration: Utils.defaultIfNullOrEmpty(opts.configuration, undefined),\n semantics: Utils.defaultIfNullOrEmpty(opts.semantics, undefined),\n capabilityResources: Utils.defaultIfNullOrEmpty(opts.capabilityResources, undefined),\n };\n\n if (!response.instance) {\n delete response.instance;\n }\n if (!response.configuration) {\n delete response.configuration;\n }\n if (!response.semantics) {\n delete response.semantics;\n }\n if (!response.capabilityResources) {\n delete response.capabilityResources;\n }\n\n return response;\n }\n\n /**\n * Get the composed Alexa Response.\n */\n get(): AlexaResponse {\n return this;\n }\n}\n"]}
@@ -5,7 +5,7 @@ const Utils_1 = require("../../Helpers/Utils");
5
5
  class Base {
6
6
  _properties;
7
7
  constructor() {
8
- this._properties = this.initProperties();
8
+ this._properties = [];
9
9
  }
10
10
  get name() {
11
11
  return `${this.constructor.name}`;
@@ -16,9 +16,6 @@ class Base {
16
16
  reportValue(value) {
17
17
  return value;
18
18
  }
19
- initProperties() {
20
- return [];
21
- }
22
19
  /**
23
20
  * Checks whether the capability instance matches, i.e. can handle the event Alexa sends to the skill
24
21
  *
@@ -93,10 +90,8 @@ class Base {
93
90
  /**
94
91
  * Extracts value to be set on the smart device sent in an Alexa directive
95
92
  */
96
- alexaValue(event) {
93
+ alexaValue(_event) {
97
94
  throw new Error(`Method alexaValue is not implemented in ${this.name} capability`);
98
- // @ts-expect-error fix later!!!!
99
- return this.property(event)?.alexaValue(event);
100
95
  }
101
96
  /**
102
97
  * Extracts endpoint id sent in an Alexa directive
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Base.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/Base.ts"],"names":[],"mappings":";;;AAAA,+CAAgD;AAUhD,MAAsB,IAAI;IACZ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ACF,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,WAAW,EAAE,IAAI,CAAC,WAAW;SAChC,CAAC;IACN,CAAC;IAED;;OAEG;IACH,IAAI,mBAAmB;QACnB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED;;OAEG;IACH,IAAI,WAAW;QACX,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,IAAI,OAAO;QACP,OAAO,GAAG,CAAC;IACf,CAAC;IAED;;OAEG;IACH,IAAI,aAAa;QACb,OAAO;YACH,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,sBAAsB;SAC1C,CAAC;IACN,CAAC;IAED,YAAY,CAAC,KAAqB;QAC9B,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC;IAC9C,CAAC;IAED;;OAEG;IACH,UAAU,CAAC,MAAsB;QAC7B,MAAM,IAAI,KAAK,CAAC,2CAA2C,IAAI,CAAC,IAAI,aAAa,CAAC,CAAC;IACvF,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,UAAU,CAAC,KAAqB;QACnC,OAAO,KAAK,CAAC,SAAS,CAAC,QAAQ,EAAE,UAAU,CAAC;IAChD,CAAC;CACJ;AAxHD,oBAwHC;AAED,kBAAe,IAAI,CAAC","sourcesContent":["import { className } from '../../Helpers/Utils';\nimport type {\n AlexaV3Capability,\n AlexaV3DirectiveValue,\n AlexaV3EndpointID,\n AlexaV3Namespace,\n AlexaV3Request,\n} from '../../types';\nimport type { Base as PropertiesBase } from '../Properties/Base';\n\nexport abstract class Base {\n protected _properties: PropertiesBase[];\n\n protected constructor() {\n this._properties = [];\n }\n\n get name(): string {\n return `${this.constructor.name}`;\n }\n\n get namespace(): AlexaV3Namespace {\n return `Alexa.${this.constructor.name}` as AlexaV3Namespace;\n }\n\n reportValue(value: number | boolean): any {\n return value;\n }\n\n /**\n * Checks whether the capability instance matches, i.e. can handle the event Alexa sends to the skill\n *\n * @param event Contains the Alexa event.\n */\n matches(event: AlexaV3Request): boolean {\n return (\n event?.directive?.header?.namespace === this.namespace &&\n event?.directive?.header?.payloadVersion === this.version\n );\n }\n\n static get namespace(): AlexaV3Namespace {\n return `Alexa.${className(this.toString())}` as AlexaV3Namespace;\n }\n\n /**\n * Checks whether the capability object matches, i.e., can handle the event Alexa sends to the skill\n *\n * @param event Contains the Alexa event.\n */\n static matches(event: AlexaV3Request): boolean {\n return event?.directive?.header?.namespace === this.namespace;\n }\n\n get properties(): PropertiesBase[] {\n return this._properties;\n }\n\n /**\n *\n * @param event Contains the Alexa event.\n * @returns Property to handle on Alexa directive\n */\n property(event: AlexaV3Request): PropertiesBase | undefined {\n return this.properties.find(p => p.matches(event));\n }\n\n /**\n * Returns object containing all the properties of the smart device capability as it expected by Alexa during discovery\n */\n get discoverableProperties(): {\n supported: { name: string }[];\n proactivelyReported: boolean;\n retrievable: boolean;\n } {\n return {\n supported: this.properties.map(p => {\n return { name: p.propertyName };\n }),\n proactivelyReported: this.proactivelyReported,\n retrievable: this.retrievable,\n };\n }\n\n /**\n * Returns whether the smart device proactively reports state changes\n */\n get proactivelyReported(): boolean {\n return true;\n }\n\n /**\n * Returns whether the smart device handles Alexa ReportState directives\n */\n get retrievable(): boolean {\n return true;\n }\n\n get version(): string {\n return '3';\n }\n\n /**\n * Returns response to Alexa Discovery directive\n */\n get alexaResponse(): AlexaV3Capability {\n return {\n interface: this.namespace,\n version: this.version,\n properties: this.discoverableProperties,\n };\n }\n\n propertyName(event: AlexaV3Request): string | undefined {\n return this.property(event)?.propertyName;\n }\n\n /**\n * Extracts value to be set on the smart device sent in an Alexa directive\n */\n alexaValue(_event: AlexaV3Request): AlexaV3DirectiveValue {\n throw new Error(`Method alexaValue is not implemented in ${this.name} capability`);\n }\n\n /**\n * Extracts endpoint id sent in an Alexa directive\n */\n static endpointId(event: AlexaV3Request): AlexaV3EndpointID | undefined {\n return event.directive.endpoint?.endpointId;\n }\n}\n\nexport default Base;\n"]}
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Base_1 = __importDefault(require("./Base"));
7
7
  const Brightness_1 = __importDefault(require("../Properties/Brightness"));
8
8
  class BrightnessController extends Base_1.default {
9
- _brightness;
10
- initProperties() {
11
- this._brightness = new Brightness_1.default();
12
- return [this._brightness];
9
+ #brightness;
10
+ constructor(opts) {
11
+ super();
12
+ this.#brightness = new Brightness_1.default(opts);
13
+ this._properties = [this.#brightness];
13
14
  }
14
15
  get brightness() {
15
- return this._brightness;
16
+ return this.#brightness;
16
17
  }
17
18
  }
18
19
  exports.default = BrightnessController;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BrightnessController.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/BrightnessController.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,0EAAkD;AAGlD,MAAqB,oBAAqB,SAAQ,cAAI;IACzC,WAAW,CAAa;IAEjC,YAAY,IAA4B;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,IAAI,oBAAU,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;CACJ;AAZD,uCAYC","sourcesContent":["import Base from './Base';\nimport Brightness from '../Properties/Brightness';\nimport type { ControlStateInitObject } from '../Properties/Base';\n\nexport default class BrightnessController extends Base {\n readonly #brightness: Brightness;\n\n constructor(opts: ControlStateInitObject) {\n super();\n this.#brightness = new Brightness(opts);\n this._properties = [this.#brightness];\n }\n\n get brightness(): Brightness {\n return this.#brightness;\n }\n}\n"]}
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Properties_1 = __importDefault(require("../Properties"));
7
7
  const Base_1 = __importDefault(require("./Base"));
8
8
  class ColorController extends Base_1.default {
9
- initProperties() {
10
- return [new Properties_1.default.Color()];
9
+ constructor(opts) {
10
+ super();
11
+ this._properties = [new Properties_1.default.Color(opts)];
11
12
  }
12
13
  }
13
14
  exports.default = ColorController;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorController.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorController.ts"],"names":[],"mappings":";;;;;AAAA,+DAAuC;AACvC,kDAA0B;AAG1B,MAAqB,eAAgB,SAAQ,cAAI;IAC7C,YAAY,IAA4B;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,oBAAU,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;IACpD,CAAC;CACJ;AALD,kCAKC","sourcesContent":["import Properties from '../Properties';\nimport Base from './Base';\nimport type { ControlStateInitObject } from '../Properties/Base';\n\nexport default class ColorController extends Base {\n constructor(opts: ControlStateInitObject) {\n super();\n this._properties = [new Properties.Color(opts)];\n }\n}\n"]}
@@ -7,9 +7,10 @@ const Base_1 = __importDefault(require("./Base"));
7
7
  const ColorTemperatureInKelvin_1 = __importDefault(require("../Properties/ColorTemperatureInKelvin"));
8
8
  class ColorTemperatureController extends Base_1.default {
9
9
  _colorTemperatureInKelvin;
10
- initProperties() {
11
- this._colorTemperatureInKelvin = new ColorTemperatureInKelvin_1.default();
12
- return [this._colorTemperatureInKelvin];
10
+ constructor(opts) {
11
+ super();
12
+ this._colorTemperatureInKelvin = new ColorTemperatureInKelvin_1.default(opts);
13
+ this._properties = [this._colorTemperatureInKelvin];
13
14
  }
14
15
  get colorTemperatureInKelvin() {
15
16
  return this._colorTemperatureInKelvin;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorTemperatureController.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorTemperatureController.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,sGAA8E;AAG9E,MAAqB,0BAA2B,SAAQ,cAAI;IACvC,yBAAyB,CAA2B;IAErE,YAAY,IAA4B;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,yBAAyB,GAAG,IAAI,kCAAwB,CAAC,IAAI,CAAC,CAAC;QACpE,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;IACxD,CAAC;IAED,IAAI,wBAAwB;QACxB,OAAO,IAAI,CAAC,yBAAyB,CAAC;IAC1C,CAAC;CACJ;AAZD,6CAYC","sourcesContent":["import Base from './Base';\nimport ColorTemperatureInKelvin from '../Properties/ColorTemperatureInKelvin';\nimport type { ControlStateInitObject } from '../Properties/Base';\n\nexport default class ColorTemperatureController extends Base {\n private readonly _colorTemperatureInKelvin: ColorTemperatureInKelvin;\n\n constructor(opts: ControlStateInitObject) {\n super();\n this._colorTemperatureInKelvin = new ColorTemperatureInKelvin(opts);\n this._properties = [this._colorTemperatureInKelvin];\n }\n\n get colorTemperatureInKelvin(): ColorTemperatureInKelvin {\n return this._colorTemperatureInKelvin;\n }\n}\n"]}
@@ -7,8 +7,9 @@ exports.ContactSensor = void 0;
7
7
  const Base_1 = __importDefault(require("./Base"));
8
8
  const Properties_1 = __importDefault(require("../Properties"));
9
9
  class ContactSensor extends Base_1.default {
10
- initProperties() {
11
- return [new Properties_1.default.DetectionState()];
10
+ constructor(opts) {
11
+ super();
12
+ this._properties = [new Properties_1.default.DetectionState(opts)];
12
13
  }
13
14
  }
14
15
  exports.ContactSensor = ContactSensor;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContactSensor.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/ContactSensor.ts"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,+DAAuC;AAGvC,MAAa,aAAc,SAAQ,cAAI;IACnC,YAAY,IAA4B;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,oBAAU,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,CAAC;CACJ;AALD,sCAKC;AAED,kBAAe,aAAa,CAAC","sourcesContent":["import Base from './Base';\nimport Properties from '../Properties';\nimport type { ControlStateInitObject } from '../Properties/Base';\n\nexport class ContactSensor extends Base {\n constructor(opts: ControlStateInitObject) {\n super();\n this._properties = [new Properties.DetectionState(opts)];\n }\n}\n\nexport default ContactSensor;\n"]}
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Properties_1 = __importDefault(require("../Properties"));
7
7
  const Base_1 = __importDefault(require("./Base"));
8
8
  class LockController extends Base_1.default {
9
- initProperties() {
10
- return [new Properties_1.default.LockState()];
9
+ constructor(opts) {
10
+ super();
11
+ this._properties = [new Properties_1.default.LockState(opts)];
11
12
  }
12
13
  }
13
14
  exports.default = LockController;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LockController.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/LockController.ts"],"names":[],"mappings":";;;;;AAAA,+DAAuC;AACvC,kDAA0B;AAG1B,MAAqB,cAAe,SAAQ,cAAI;IAC5C,YAAY,IAA4B;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,oBAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IACxD,CAAC;CACJ;AALD,iCAKC","sourcesContent":["import Properties from '../Properties';\nimport Base from './Base';\nimport type { ControlStateInitObject } from '../Properties/Base';\n\nexport default class LockController extends Base {\n constructor(opts: ControlStateInitObject) {\n super();\n this._properties = [new Properties.LockState(opts)];\n }\n}\n"]}
@@ -7,9 +7,10 @@ const Base_1 = __importDefault(require("./Base"));
7
7
  const Mode_1 = __importDefault(require("../Properties/Mode"));
8
8
  class ModeController extends Base_1.default {
9
9
  _property;
10
- initProperties() {
11
- this._property = new Mode_1.default();
12
- return [this._property];
10
+ constructor(opts) {
11
+ super();
12
+ this._property = new Mode_1.default(opts);
13
+ this._properties = [this._property];
13
14
  }
14
15
  /**
15
16
  * Returns response to Alexa Discovery directive
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ModeController.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/ModeController.ts"],"names":[],"mappings":";;;;;AAAA,kDAA0B;AAC1B,8DAAsC;AAUtC,MAAqB,cAAe,SAAQ,cAAI;IAC3B,SAAS,CAAO;IAEjC,YAAY,IAA4B;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,SAAS,GAAG,IAAI,cAAI,CAAC,IAAI,CAAC,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC;IAED;;OAEG;IACH,IAAI,aAAa;QACb,OAAO;YACH,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,QAAQ,EAAE,IAAI,CAAC,QAAQ;YACvB,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,UAAU,EAAE,IAAI,CAAC,sBAAsB;YACvC,aAAa,EAAE,IAAI,CAAC,gCAAgC;YACpD,SAAS,EAAE,IAAI,CAAC,4BAA4B;YAC5C,mBAAmB,EAAE,IAAI,CAAC,sCAAsC;SACnE,CAAC;IACN,CAAC;IAED,IAAI,sBAAsB;QAMtB,OAAO;YACH,SAAS,EAAE,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;gBAC/B,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC;YACpC,CAAC,CAAC;YACF,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;YAC7C,WAAW,EAAE,IAAI,CAAC,WAAW;YAC7B,eAAe,EAAE,KAAK;SACzB,CAAC;IACN,CAAC;IAED,IAAI,sCAAsC;QAGtC,OAAO,EAAE,aAAa,EAAE,IAAI,CAAC,aAAa,EAAE,CAAC;IACjD,CAAC;IAED,IAAI,aAAa;QACb,OAAO;YACH;gBACI,OAAO,EAAE,OAAO;gBAChB,KAAK,EAAE;oBACH,OAAO,EAAE,oBAAoB;iBAChC;aACJ;SACJ,CAAC;IACN,CAAC;IAED,IAAI,QAAQ;QACR,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,CAAC;IACxC,CAAC;IAED,IAAI,gCAAgC;QAIhC,OAAO;YACH,OAAO,EAAE,KAAK;YACd,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,iBAAiB,CAAC;SACxF,CAAC;IACN,CAAC;IAED,IAAI,4BAA4B;QAI5B,OAAO;YACH,cAAc,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,cAAc,CAAC;YAClF,aAAa,EAAE,IAAI,CAAC,SAAS,CAAC,cAAc,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,aAAa,CAAC;SACnF,CAAC;IACN,CAAC;CACJ;AAhFD,iCAgFC","sourcesContent":["import Base from './Base';\nimport Mode from '../Properties/Mode';\nimport type {\n AlexaV3ActionMapping,\n AlexaV3Capability,\n AlexaV3DiscoveryResponse,\n AlexaV3FriendlyName,\n AlexaV3StateMapping,\n} from '../../types';\nimport type { ControlStateInitObject } from '../Properties/Base';\n\nexport default class ModeController extends Base {\n private readonly _property: Mode;\n\n constructor(opts: ControlStateInitObject) {\n super();\n this._property = new Mode(opts);\n this._properties = [this._property];\n }\n\n /**\n * Returns response to Alexa Discovery directive\n */\n get alexaResponse(): AlexaV3Capability {\n return {\n interface: this.namespace,\n instance: this.instance,\n version: this.version,\n properties: this.discoverableProperties,\n configuration: this.configurationAsDiscoveryResponse,\n semantics: this.semanticsAsDiscoveryResponse,\n capabilityResources: this.capabilityResourcesAsDiscoveryResponse,\n };\n }\n\n get discoverableProperties(): {\n supported: { name: string }[];\n proactivelyReported: boolean;\n retrievable: boolean;\n nonControllable: false;\n } {\n return {\n supported: this.properties.map(p => {\n return { name: p.propertyName };\n }),\n proactivelyReported: this.proactivelyReported,\n retrievable: this.retrievable,\n nonControllable: false,\n };\n }\n\n get capabilityResourcesAsDiscoveryResponse(): {\n friendlyNames: AlexaV3FriendlyName[];\n } {\n return { friendlyNames: this.friendlyNames };\n }\n\n get friendlyNames(): AlexaV3FriendlyName[] {\n return [\n {\n '@type': 'asset',\n value: {\n assetId: 'Alexa.Setting.Mode',\n },\n },\n ];\n }\n\n get instance(): string {\n return `${this._property.instance}`;\n }\n\n get configurationAsDiscoveryResponse(): {\n ordered: boolean;\n supportedModes: AlexaV3DiscoveryResponse[];\n } {\n return {\n ordered: false,\n supportedModes: this._property.supportedModes.flatMap(mode => mode.discoveryResponse),\n };\n }\n\n get semanticsAsDiscoveryResponse(): {\n actionMappings: AlexaV3ActionMapping[];\n stateMappings: AlexaV3StateMapping[];\n } {\n return {\n actionMappings: this._property.supportedModes.flatMap(mode => mode.actionMappings),\n stateMappings: this._property.supportedModes.flatMap(mode => mode.stateMappings),\n };\n }\n}\n"]}
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Properties_1 = __importDefault(require("../Properties"));
7
7
  const Base_1 = __importDefault(require("./Base"));
8
8
  class MotionSensor extends Base_1.default {
9
- initProperties() {
10
- return [new Properties_1.default.DetectionState()];
9
+ constructor(opts) {
10
+ super();
11
+ this._properties = [new Properties_1.default.DetectionState(opts)];
11
12
  }
12
13
  }
13
14
  exports.default = MotionSensor;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MotionSensor.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/MotionSensor.ts"],"names":[],"mappings":";;;;;AAAA,+DAAuC;AACvC,kDAA0B;AAG1B,MAAqB,YAAa,SAAQ,cAAI;IAC1C,YAAY,IAA4B;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,oBAAU,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC;IAC7D,CAAC;CACJ;AALD,+BAKC","sourcesContent":["import Properties from '../Properties';\nimport Base from './Base';\nimport type { ControlStateInitObject } from '../Properties/Base';\n\nexport default class MotionSensor extends Base {\n constructor(opts: ControlStateInitObject) {\n super();\n this._properties = [new Properties.DetectionState(opts)];\n }\n}\n"]}
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Properties_1 = __importDefault(require("../Properties"));
7
7
  const Base_1 = __importDefault(require("./Base"));
8
8
  class PercentageController extends Base_1.default {
9
- initProperties() {
10
- return [new Properties_1.default.Percentage()];
9
+ constructor(opts) {
10
+ super();
11
+ this._properties = [new Properties_1.default.Percentage(opts)];
11
12
  }
12
13
  }
13
14
  exports.default = PercentageController;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PercentageController.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/PercentageController.ts"],"names":[],"mappings":";;;;;AAAA,+DAAuC;AACvC,kDAA0B;AAG1B,MAAqB,oBAAqB,SAAQ,cAAI;IAClD,YAAY,IAA4B;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,oBAAU,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC;IACzD,CAAC;CACJ;AALD,uCAKC","sourcesContent":["import Properties from '../Properties';\nimport Base from './Base';\nimport type { ControlStateInitObject } from '../Properties/Base';\n\nexport default class PercentageController extends Base {\n constructor(opts: ControlStateInitObject) {\n super();\n this._properties = [new Properties.Percentage(opts)];\n }\n}\n"]}
@@ -6,13 +6,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const PowerState_1 = __importDefault(require("../Properties/PowerState"));
7
7
  const Base_1 = __importDefault(require("./Base"));
8
8
  class PowerController extends Base_1.default {
9
- _powerState;
10
- initProperties() {
11
- this._powerState = new PowerState_1.default();
12
- return [this._powerState];
9
+ #powerState;
10
+ constructor(opts) {
11
+ super();
12
+ this.#powerState = new PowerState_1.default(opts);
13
+ this._properties = [this.#powerState];
13
14
  }
14
15
  get powerState() {
15
- return this._powerState;
16
+ return this.#powerState;
16
17
  }
17
18
  }
18
19
  exports.default = PowerController;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PowerController.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/PowerController.ts"],"names":[],"mappings":";;;;;AAAA,0EAAkD;AAClD,kDAA0B;AAG1B,MAAqB,eAAgB,SAAQ,cAAI;IACpC,WAAW,CAAa;IAEjC,YAAY,IAA4B;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,IAAI,oBAAU,CAAC,IAAI,CAAC,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC1C,CAAC;IAED,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;CACJ;AAZD,kCAYC","sourcesContent":["import PowerState from '../Properties/PowerState';\nimport Base from './Base';\nimport type { ControlStateInitObject } from '../Properties/Base';\n\nexport default class PowerController extends Base {\n readonly #powerState: PowerState;\n\n constructor(opts: ControlStateInitObject) {\n super();\n this.#powerState = new PowerState(opts);\n this._properties = [this.#powerState];\n }\n\n get powerState(): PowerState {\n return this.#powerState;\n }\n}\n"]}
@@ -9,10 +9,11 @@ const Base_1 = __importDefault(require("./Base"));
9
9
  class Speaker extends Base_1.default {
10
10
  _volume;
11
11
  _muted;
12
- initProperties() {
13
- this._volume = new Volume_1.default();
14
- this._muted = new Muted_1.default();
15
- return [this._volume, this._muted];
12
+ constructor(volumeOpts, mutedOpts) {
13
+ super();
14
+ this._volume = new Volume_1.default(volumeOpts);
15
+ this._muted = new Muted_1.default(mutedOpts);
16
+ this._properties = [this._volume, this._muted];
16
17
  }
17
18
  get volume() {
18
19
  return this._volume;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Speaker.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/Speaker.ts"],"names":[],"mappings":";;;;;AAAA,kEAA0C;AAC1C,gEAAwC;AACxC,kDAA0B;AAG1B,MAAqB,OAAQ,SAAQ,cAAI;IACpB,OAAO,CAAS;IAChB,MAAM,CAAQ;IAE/B,YAAY,UAAkC,EAAE,SAAiC;QAC7E,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,IAAI,gBAAM,CAAC,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,MAAM,GAAG,IAAI,eAAK,CAAC,SAAS,CAAC,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;IACnD,CAAC;IAED,IAAI,MAAM;QACN,OAAO,IAAI,CAAC,OAAO,CAAC;IACxB,CAAC;IAED,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;CACJ;AAlBD,0BAkBC","sourcesContent":["import Volume from '../Properties/Volume';\nimport Muted from '../Properties/Muted';\nimport Base from './Base';\nimport type { ControlStateInitObject } from '../Properties/Base';\n\nexport default class Speaker extends Base {\n private readonly _volume: Volume;\n private readonly _muted: Muted;\n\n constructor(volumeOpts: ControlStateInitObject, mutedOpts: ControlStateInitObject) {\n super();\n this._volume = new Volume(volumeOpts);\n this._muted = new Muted(mutedOpts);\n this._properties = [this._volume, this._muted];\n }\n\n get volume(): Volume {\n return this._volume;\n }\n\n get muted(): Muted {\n return this._muted;\n }\n}\n"]}
@@ -6,8 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const Properties_1 = __importDefault(require("../Properties"));
7
7
  const Base_1 = __importDefault(require("./Base"));
8
8
  class TemperatureSensor extends Base_1.default {
9
- initProperties() {
10
- return [new Properties_1.default.Temperature()];
9
+ constructor(opts) {
10
+ super();
11
+ this._properties = [new Properties_1.default.Temperature(opts)];
11
12
  }
12
13
  }
13
14
  exports.default = TemperatureSensor;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TemperatureSensor.js","sourceRoot":"","sources":["../../../../../src/lib/AlexaSmartHomeV3/Alexa/Capabilities/TemperatureSensor.ts"],"names":[],"mappings":";;;;;AAAA,+DAAuC;AACvC,kDAA0B;AAG1B,MAAqB,iBAAkB,SAAQ,cAAI;IAC/C,YAAY,IAA4B;QACpC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,WAAW,GAAG,CAAC,IAAI,oBAAU,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1D,CAAC;CACJ;AALD,oCAKC","sourcesContent":["import Properties from '../Properties';\nimport Base from './Base';\nimport type { ControlStateInitObject } from '../Properties/Base';\n\nexport default class TemperatureSensor extends Base {\n constructor(opts: ControlStateInitObject) {\n super();\n this._properties = [new Properties.Temperature(opts)];\n }\n}\n"]}