@digital-alchemy/core 0.1.16 → 0.1.18
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.
- package/dist/{boilerplate/extensions → extensions}/cache.extension.d.ts +3 -3
- package/dist/{boilerplate/extensions → extensions}/cache.extension.js +16 -16
- package/dist/extensions/cache.extension.js.map +1 -0
- package/dist/{boilerplate/extensions → extensions}/configuration.extension.d.ts +4 -4
- package/dist/{boilerplate/extensions → extensions}/configuration.extension.js +26 -15
- package/dist/extensions/configuration.extension.js.map +1 -0
- package/dist/{boilerplate/extensions → extensions}/fetch.extension.d.ts +2 -2
- package/dist/{boilerplate/extensions → extensions}/fetch.extension.js +22 -22
- package/dist/extensions/fetch.extension.js.map +1 -0
- package/dist/{boilerplate/extensions → extensions}/index.d.ts +2 -0
- package/dist/{boilerplate/extensions → extensions}/index.js +2 -0
- package/dist/extensions/index.js.map +1 -0
- package/dist/{utilities/extensions/zcc.extension.d.ts → extensions/internal.extension.d.ts} +5 -5
- package/dist/{utilities/extensions/zcc.extension.js → extensions/internal.extension.js} +8 -8
- package/dist/extensions/internal.extension.js.map +1 -0
- package/dist/extensions/is.extension.js.map +1 -0
- package/dist/{boilerplate/extensions → extensions}/logger.extension.d.ts +3 -3
- package/dist/{boilerplate/extensions → extensions}/logger.extension.js +1 -1
- package/dist/extensions/logger.extension.js.map +1 -0
- package/dist/{boilerplate/extensions → extensions}/scheduler.extension.d.ts +1 -1
- package/dist/{boilerplate/extensions → extensions}/scheduler.extension.js +1 -1
- package/dist/extensions/scheduler.extension.js.map +1 -0
- package/dist/{boilerplate/extensions → extensions}/wiring.extension.d.ts +3 -30
- package/dist/{boilerplate/extensions → extensions}/wiring.extension.js +81 -55
- package/dist/extensions/wiring.extension.js.map +1 -0
- package/dist/helpers/async.helper.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/cache-memory.helper.js +1 -1
- package/dist/helpers/cache-memory.helper.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/cache-redis.helper.js +1 -1
- package/dist/helpers/cache-redis.helper.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/config-environment-loader.helper.js +1 -1
- package/dist/helpers/config-environment-loader.helper.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/config-file-loader.helper.js +2 -2
- package/dist/helpers/config-file-loader.helper.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/config.helper.d.ts +1 -1
- package/dist/{boilerplate/helpers → helpers}/config.helper.js +1 -1
- package/dist/helpers/config.helper.js.map +1 -0
- package/dist/helpers/context.helper.js.map +1 -0
- package/dist/helpers/cron.helper.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/errors.helper.d.ts +1 -1
- package/dist/helpers/errors.helper.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/events.helper.js +1 -1
- package/dist/helpers/events.helper.js.map +1 -0
- package/dist/helpers/extend.helper.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/fetch.helper.d.ts +1 -1
- package/dist/{boilerplate/helpers → helpers}/fetch.helper.js +1 -1
- package/dist/helpers/fetch.helper.js.map +1 -0
- package/dist/{utilities/helpers/index.js → helpers/index copy.js } +1 -1
- package/dist/helpers/index copy.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/index.d.ts +5 -0
- package/dist/{boilerplate/helpers → helpers}/index.js +5 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/lifecycle.helper.d.ts +1 -1
- package/dist/helpers/lifecycle.helper.js.map +1 -0
- package/dist/helpers/metrics.helper.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/testing.helper.d.ts +0 -5
- package/dist/{boilerplate/helpers → helpers}/testing.helper.js +3 -3
- package/dist/helpers/testing.helper.js.map +1 -0
- package/dist/helpers/utilities.helper.js.map +1 -0
- package/dist/{boilerplate/helpers → helpers}/wiring.helper.d.ts +12 -3
- package/dist/helpers/wiring.helper.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -4
- package/dist/index.js.map +1 -1
- package/package.json +21 -35
- package/dist/automation/automation.module.d.ts +0 -96
- package/dist/automation/automation.module.js +0 -102
- package/dist/automation/automation.module.js.map +0 -1
- package/dist/automation/extensions/aggressive-scenes.extension.d.ts +0 -12
- package/dist/automation/extensions/aggressive-scenes.extension.js +0 -114
- package/dist/automation/extensions/aggressive-scenes.extension.js.map +0 -1
- package/dist/automation/extensions/circadian.extension.d.ts +0 -6
- package/dist/automation/extensions/circadian.extension.js +0 -81
- package/dist/automation/extensions/circadian.extension.js.map +0 -1
- package/dist/automation/extensions/index.d.ts +0 -7
- package/dist/automation/extensions/index.js +0 -11
- package/dist/automation/extensions/index.js.map +0 -1
- package/dist/automation/extensions/light-manager.extension.d.ts +0 -26
- package/dist/automation/extensions/light-manager.extension.js +0 -258
- package/dist/automation/extensions/light-manager.extension.js.map +0 -1
- package/dist/automation/extensions/managed-switch.extension.d.ts +0 -3
- package/dist/automation/extensions/managed-switch.extension.js +0 -73
- package/dist/automation/extensions/managed-switch.extension.js.map +0 -1
- package/dist/automation/extensions/room.extension.d.ts +0 -11
- package/dist/automation/extensions/room.extension.js +0 -177
- package/dist/automation/extensions/room.extension.js.map +0 -1
- package/dist/automation/extensions/sequence-matcher.extension.d.ts +0 -3
- package/dist/automation/extensions/sequence-matcher.extension.js +0 -123
- package/dist/automation/extensions/sequence-matcher.extension.js.map +0 -1
- package/dist/automation/extensions/solar-calc.extension.d.ts +0 -20
- package/dist/automation/extensions/solar-calc.extension.js +0 -104
- package/dist/automation/extensions/solar-calc.extension.js.map +0 -1
- package/dist/automation/helpers/events.helper.d.ts +0 -33
- package/dist/automation/helpers/events.helper.js +0 -14
- package/dist/automation/helpers/events.helper.js.map +0 -1
- package/dist/automation/helpers/index.d.ts +0 -7
- package/dist/automation/helpers/index.js +0 -11
- package/dist/automation/helpers/index.js.map +0 -1
- package/dist/automation/helpers/managed-switch.helper.d.ts +0 -41
- package/dist/automation/helpers/managed-switch.helper.js +0 -3
- package/dist/automation/helpers/managed-switch.helper.js.map +0 -1
- package/dist/automation/helpers/metrics.helper.d.ts +0 -13
- package/dist/automation/helpers/metrics.helper.js +0 -30
- package/dist/automation/helpers/metrics.helper.js.map +0 -1
- package/dist/automation/helpers/reftimes.helper.d.ts +0 -54
- package/dist/automation/helpers/reftimes.helper.js +0 -33
- package/dist/automation/helpers/reftimes.helper.js.map +0 -1
- package/dist/automation/helpers/scene.helper.d.ts +0 -97
- package/dist/automation/helpers/scene.helper.js +0 -5
- package/dist/automation/helpers/scene.helper.js.map +0 -1
- package/dist/automation/helpers/sequence.helper.d.ts +0 -55
- package/dist/automation/helpers/sequence.helper.js +0 -3
- package/dist/automation/helpers/sequence.helper.js.map +0 -1
- package/dist/automation/helpers/solar.helper.d.ts +0 -3
- package/dist/automation/helpers/solar.helper.js +0 -262
- package/dist/automation/helpers/solar.helper.js.map +0 -1
- package/dist/automation/index.d.ts +0 -3
- package/dist/automation/index.js +0 -10
- package/dist/automation/index.js.map +0 -1
- package/dist/boilerplate/extensions/cache.extension.js.map +0 -1
- package/dist/boilerplate/extensions/cache.extension.spec.d.ts +0 -6
- package/dist/boilerplate/extensions/cache.extension.spec.js +0 -222
- package/dist/boilerplate/extensions/cache.extension.spec.js.map +0 -1
- package/dist/boilerplate/extensions/configuration.extension.js.map +0 -1
- package/dist/boilerplate/extensions/fetch.extension.js.map +0 -1
- package/dist/boilerplate/extensions/fetch.extension.spec.d.ts +0 -8
- package/dist/boilerplate/extensions/fetch.extension.spec.js +0 -59
- package/dist/boilerplate/extensions/fetch.extension.spec.js.map +0 -1
- package/dist/boilerplate/extensions/index.js.map +0 -1
- package/dist/boilerplate/extensions/logger.extension.js.map +0 -1
- package/dist/boilerplate/extensions/scheduler.extension.js.map +0 -1
- package/dist/boilerplate/extensions/wiring.extension.js.map +0 -1
- package/dist/boilerplate/extensions/wiring.extension.spec.d.ts +0 -8
- package/dist/boilerplate/extensions/wiring.extension.spec.js +0 -215
- package/dist/boilerplate/extensions/wiring.extension.spec.js.map +0 -1
- package/dist/boilerplate/helpers/cache-memory.helper.js.map +0 -1
- package/dist/boilerplate/helpers/cache-redis.helper.js.map +0 -1
- package/dist/boilerplate/helpers/config-environment-loader.helper.js.map +0 -1
- package/dist/boilerplate/helpers/config-file-loader.helper.js.map +0 -1
- package/dist/boilerplate/helpers/config.helper.js.map +0 -1
- package/dist/boilerplate/helpers/errors.helper.js.map +0 -1
- package/dist/boilerplate/helpers/events.helper.js.map +0 -1
- package/dist/boilerplate/helpers/fetch.helper.js.map +0 -1
- package/dist/boilerplate/helpers/index.js.map +0 -1
- package/dist/boilerplate/helpers/lifecycle.helper.js.map +0 -1
- package/dist/boilerplate/helpers/metrics.helper.js.map +0 -1
- package/dist/boilerplate/helpers/testing.helper.js.map +0 -1
- package/dist/boilerplate/helpers/wiring.helper.js.map +0 -1
- package/dist/boilerplate/index.d.ts +0 -2
- package/dist/boilerplate/index.js +0 -6
- package/dist/boilerplate/index.js.map +0 -1
- package/dist/gotify/extensions/application.extension.d.ts +0 -13
- package/dist/gotify/extensions/application.extension.js +0 -52
- package/dist/gotify/extensions/application.extension.js.map +0 -1
- package/dist/gotify/extensions/client.extension.d.ts +0 -8
- package/dist/gotify/extensions/client.extension.js +0 -38
- package/dist/gotify/extensions/client.extension.js.map +0 -1
- package/dist/gotify/extensions/fetch.extension.d.ts +0 -2
- package/dist/gotify/extensions/fetch.extension.js +0 -14
- package/dist/gotify/extensions/fetch.extension.js.map +0 -1
- package/dist/gotify/extensions/fetch.extension.spec.d.ts +0 -1
- package/dist/gotify/extensions/fetch.extension.spec.js +0 -284
- package/dist/gotify/extensions/fetch.extension.spec.js.map +0 -1
- package/dist/gotify/extensions/index.d.ts +0 -4
- package/dist/gotify/extensions/index.js +0 -8
- package/dist/gotify/extensions/index.js.map +0 -1
- package/dist/gotify/extensions/message.extension.d.ts +0 -8
- package/dist/gotify/extensions/message.extension.js +0 -37
- package/dist/gotify/extensions/message.extension.js.map +0 -1
- package/dist/gotify/gotify.module.d.ts +0 -34
- package/dist/gotify/gotify.module.js +0 -33
- package/dist/gotify/gotify.module.js.map +0 -1
- package/dist/gotify/helpers/api.d.ts +0 -346
- package/dist/gotify/helpers/api.js +0 -14
- package/dist/gotify/helpers/api.js.map +0 -1
- package/dist/gotify/helpers/events.helper.d.ts +0 -6
- package/dist/gotify/helpers/events.helper.js +0 -5
- package/dist/gotify/helpers/events.helper.js.map +0 -1
- package/dist/gotify/helpers/index.d.ts +0 -2
- package/dist/gotify/helpers/index.js +0 -6
- package/dist/gotify/helpers/index.js.map +0 -1
- package/dist/gotify/index.d.ts +0 -3
- package/dist/gotify/index.js +0 -7
- package/dist/gotify/index.js.map +0 -1
- package/dist/hass/dynamic.d.ts +0 -1126
- package/dist/hass/dynamic.js +0 -153
- package/dist/hass/dynamic.js.map +0 -1
- package/dist/hass/extensions/call-proxy.extension.d.ts +0 -4
- package/dist/hass/extensions/call-proxy.extension.js +0 -88
- package/dist/hass/extensions/call-proxy.extension.js.map +0 -1
- package/dist/hass/extensions/config.extension.d.ts +0 -2
- package/dist/hass/extensions/config.extension.js +0 -53
- package/dist/hass/extensions/config.extension.js.map +0 -1
- package/dist/hass/extensions/entity-manager.extension.d.ts +0 -61
- package/dist/hass/extensions/entity-manager.extension.js +0 -211
- package/dist/hass/extensions/entity-manager.extension.js.map +0 -1
- package/dist/hass/extensions/fetch-api.extension.d.ts +0 -29
- package/dist/hass/extensions/fetch-api.extension.js +0 -174
- package/dist/hass/extensions/fetch-api.extension.js.map +0 -1
- package/dist/hass/extensions/index.d.ts +0 -6
- package/dist/hass/extensions/index.js +0 -10
- package/dist/hass/extensions/index.js.map +0 -1
- package/dist/hass/extensions/utilities.extension.d.ts +0 -9
- package/dist/hass/extensions/utilities.extension.js +0 -43
- package/dist/hass/extensions/utilities.extension.js.map +0 -1
- package/dist/hass/extensions/validate.extension.d.ts +0 -2
- package/dist/hass/extensions/validate.extension.js +0 -34
- package/dist/hass/extensions/validate.extension.js.map +0 -1
- package/dist/hass/extensions/websocket-api.extension.d.ts +0 -39
- package/dist/hass/extensions/websocket-api.extension.js +0 -363
- package/dist/hass/extensions/websocket-api.extension.js.map +0 -1
- package/dist/hass/hass.module.d.ts +0 -80
- package/dist/hass/hass.module.js +0 -83
- package/dist/hass/hass.module.js.map +0 -1
- package/dist/hass/helpers/backup.helper.d.ts +0 -11
- package/dist/hass/helpers/backup.helper.js +0 -3
- package/dist/hass/helpers/backup.helper.js.map +0 -1
- package/dist/hass/helpers/constants.helper.d.ts +0 -54
- package/dist/hass/helpers/constants.helper.js +0 -63
- package/dist/hass/helpers/constants.helper.js.map +0 -1
- package/dist/hass/helpers/entity-state.helper.d.ts +0 -45
- package/dist/hass/helpers/entity-state.helper.js +0 -9
- package/dist/hass/helpers/entity-state.helper.js.map +0 -1
- package/dist/hass/helpers/fetch/calendar.d.ts +0 -54
- package/dist/hass/helpers/fetch/calendar.js +0 -3
- package/dist/hass/helpers/fetch/calendar.js.map +0 -1
- package/dist/hass/helpers/fetch/configuration.d.ts +0 -34
- package/dist/hass/helpers/fetch/configuration.js +0 -3
- package/dist/hass/helpers/fetch/configuration.js.map +0 -1
- package/dist/hass/helpers/fetch/index.d.ts +0 -4
- package/dist/hass/helpers/fetch/index.js +0 -8
- package/dist/hass/helpers/fetch/index.js.map +0 -1
- package/dist/hass/helpers/fetch/server-log.d.ts +0 -10
- package/dist/hass/helpers/fetch/server-log.js +0 -20
- package/dist/hass/helpers/fetch/server-log.js.map +0 -1
- package/dist/hass/helpers/fetch/service-list.d.ts +0 -51
- package/dist/hass/helpers/fetch/service-list.js +0 -3
- package/dist/hass/helpers/fetch/service-list.js.map +0 -1
- package/dist/hass/helpers/index.d.ts +0 -7
- package/dist/hass/helpers/index.js +0 -11
- package/dist/hass/helpers/index.js.map +0 -1
- package/dist/hass/helpers/metrics.helper.d.ts +0 -13
- package/dist/hass/helpers/metrics.helper.js +0 -30
- package/dist/hass/helpers/metrics.helper.js.map +0 -1
- package/dist/hass/helpers/utility.helper.d.ts +0 -61
- package/dist/hass/helpers/utility.helper.js +0 -38
- package/dist/hass/helpers/utility.helper.js.map +0 -1
- package/dist/hass/helpers/websocket.helper.d.ts +0 -129
- package/dist/hass/helpers/websocket.helper.js +0 -3
- package/dist/hass/helpers/websocket.helper.js.map +0 -1
- package/dist/hass/index.d.ts +0 -4
- package/dist/hass/index.js +0 -8
- package/dist/hass/index.js.map +0 -1
- package/dist/nexus/entities.extension.d.ts +0 -2
- package/dist/nexus/entities.extension.js +0 -50
- package/dist/nexus/entities.extension.js.map +0 -1
- package/dist/nexus/main.d.ts +0 -9
- package/dist/nexus/main.js +0 -28
- package/dist/nexus/main.js.map +0 -1
- package/dist/purge/main.d.ts +0 -34
- package/dist/purge/main.js +0 -50
- package/dist/purge/main.js.map +0 -1
- package/dist/purge/purge.extension.d.ts +0 -2
- package/dist/purge/purge.extension.js +0 -49
- package/dist/purge/purge.extension.js.map +0 -1
- package/dist/synapse/extensions/binary-sensor.extension.d.ts +0 -19
- package/dist/synapse/extensions/binary-sensor.extension.js +0 -84
- package/dist/synapse/extensions/binary-sensor.extension.js.map +0 -1
- package/dist/synapse/extensions/button.extension.d.ts +0 -10
- package/dist/synapse/extensions/button.extension.js +0 -46
- package/dist/synapse/extensions/button.extension.js.map +0 -1
- package/dist/synapse/extensions/index.d.ts +0 -6
- package/dist/synapse/extensions/index.js +0 -10
- package/dist/synapse/extensions/index.js.map +0 -1
- package/dist/synapse/extensions/registry.extension.d.ts +0 -21
- package/dist/synapse/extensions/registry.extension.js +0 -223
- package/dist/synapse/extensions/registry.extension.js.map +0 -1
- package/dist/synapse/extensions/scene.extension.d.ts +0 -9
- package/dist/synapse/extensions/scene.extension.js +0 -37
- package/dist/synapse/extensions/scene.extension.js.map +0 -1
- package/dist/synapse/extensions/sensor.extension.d.ts +0 -25
- package/dist/synapse/extensions/sensor.extension.js +0 -154
- package/dist/synapse/extensions/sensor.extension.js.map +0 -1
- package/dist/synapse/extensions/switch.extension.d.ts +0 -19
- package/dist/synapse/extensions/switch.extension.js +0 -95
- package/dist/synapse/extensions/switch.extension.js.map +0 -1
- package/dist/synapse/helpers/device-class.helper.d.ts +0 -323
- package/dist/synapse/helpers/device-class.helper.js +0 -241
- package/dist/synapse/helpers/device-class.helper.js.map +0 -1
- package/dist/synapse/helpers/index.d.ts +0 -3
- package/dist/synapse/helpers/index.js +0 -7
- package/dist/synapse/helpers/index.js.map +0 -1
- package/dist/synapse/helpers/metrics.helper.d.ts +0 -13
- package/dist/synapse/helpers/metrics.helper.js +0 -30
- package/dist/synapse/helpers/metrics.helper.js.map +0 -1
- package/dist/synapse/helpers/utility.helper.d.ts +0 -1
- package/dist/synapse/helpers/utility.helper.js +0 -3
- package/dist/synapse/helpers/utility.helper.js.map +0 -1
- package/dist/synapse/index.d.ts +0 -3
- package/dist/synapse/index.js +0 -7
- package/dist/synapse/index.js.map +0 -1
- package/dist/synapse/synapse.module.d.ts +0 -54
- package/dist/synapse/synapse.module.js +0 -63
- package/dist/synapse/synapse.module.js.map +0 -1
- package/dist/type-writer/build.extension.d.ts +0 -2
- package/dist/type-writer/build.extension.js +0 -52
- package/dist/type-writer/build.extension.js.map +0 -1
- package/dist/type-writer/main.d.ts +0 -17
- package/dist/type-writer/main.js +0 -36
- package/dist/type-writer/main.js.map +0 -1
- package/dist/type-writer/type-writer.extension.d.ts +0 -2
- package/dist/type-writer/type-writer.extension.js +0 -214
- package/dist/type-writer/type-writer.extension.js.map +0 -1
- package/dist/utilities/extensions/index.d.ts +0 -3
- package/dist/utilities/extensions/index.js +0 -7
- package/dist/utilities/extensions/index.js.map +0 -1
- package/dist/utilities/extensions/is.extension.js.map +0 -1
- package/dist/utilities/extensions/zcc-testing.extension.d.ts +0 -4
- package/dist/utilities/extensions/zcc-testing.extension.js +0 -9
- package/dist/utilities/extensions/zcc-testing.extension.js.map +0 -1
- package/dist/utilities/extensions/zcc.extension.js.map +0 -1
- package/dist/utilities/helpers/async.helper.js.map +0 -1
- package/dist/utilities/helpers/context.helper.js.map +0 -1
- package/dist/utilities/helpers/cron.helper.js.map +0 -1
- package/dist/utilities/helpers/extend.helper.js.map +0 -1
- package/dist/utilities/helpers/index.js.map +0 -1
- package/dist/utilities/helpers/utilities.helper.js.map +0 -1
- package/dist/utilities/index.d.ts +0 -2
- package/dist/utilities/index.js +0 -6
- package/dist/utilities/index.js.map +0 -1
- package/dist/utilities/tests/peat.spec.d.ts +0 -1
- package/dist/utilities/tests/peat.spec.js +0 -157
- package/dist/utilities/tests/peat.spec.js.map +0 -1
- package/dist/utilities/tests/sleep.spec.d.ts +0 -1
- package/dist/utilities/tests/sleep.spec.js +0 -21
- package/dist/utilities/tests/sleep.spec.js.map +0 -1
- /package/dist/{utilities/extensions → extensions}/is.extension.d.ts +0 -0
- /package/dist/{utilities/extensions → extensions}/is.extension.js +0 -0
- /package/dist/{utilities/helpers → helpers}/async.helper.d.ts +0 -0
- /package/dist/{utilities/helpers → helpers}/async.helper.js +0 -0
- /package/dist/{boilerplate/helpers → helpers}/cache-memory.helper.d.ts +0 -0
- /package/dist/{boilerplate/helpers → helpers}/cache-redis.helper.d.ts +0 -0
- /package/dist/{boilerplate/helpers → helpers}/config-environment-loader.helper.d.ts +0 -0
- /package/dist/{boilerplate/helpers → helpers}/config-file-loader.helper.d.ts +0 -0
- /package/dist/{utilities/helpers → helpers}/context.helper.d.ts +0 -0
- /package/dist/{utilities/helpers → helpers}/context.helper.js +0 -0
- /package/dist/{utilities/helpers → helpers}/cron.helper.d.ts +0 -0
- /package/dist/{utilities/helpers → helpers}/cron.helper.js +0 -0
- /package/dist/{boilerplate/helpers → helpers}/errors.helper.js +0 -0
- /package/dist/{boilerplate/helpers → helpers}/events.helper.d.ts +0 -0
- /package/dist/{utilities/helpers → helpers}/extend.helper.d.ts +0 -0
- /package/dist/{utilities/helpers → helpers}/extend.helper.js +0 -0
- /package/dist/{utilities/helpers/index.d.ts → helpers/index copy.d.ts} +0 -0
- /package/dist/{boilerplate/helpers → helpers}/lifecycle.helper.js +0 -0
- /package/dist/{boilerplate/helpers → helpers}/metrics.helper.d.ts +0 -0
- /package/dist/{boilerplate/helpers → helpers}/metrics.helper.js +0 -0
- /package/dist/{utilities/helpers → helpers}/utilities.helper.d.ts +0 -0
- /package/dist/{utilities/helpers → helpers}/utilities.helper.js +0 -0
- /package/dist/{boilerplate/helpers → helpers}/wiring.helper.js +0 -0
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
export * from "./async.helper";
|
|
1
2
|
export * from "./cache-memory.helper";
|
|
2
3
|
export * from "./cache-redis.helper";
|
|
3
4
|
export * from "./config.helper";
|
|
4
5
|
export * from "./config-environment-loader.helper";
|
|
5
6
|
export * from "./config-file-loader.helper";
|
|
7
|
+
export * from "./context.helper";
|
|
8
|
+
export * from "./cron.helper";
|
|
6
9
|
export * from "./errors.helper";
|
|
7
10
|
export * from "./events.helper";
|
|
11
|
+
export * from "./extend.helper";
|
|
8
12
|
export * from "./fetch.helper";
|
|
9
13
|
export * from "./lifecycle.helper";
|
|
10
14
|
export * from "./metrics.helper";
|
|
11
15
|
export * from "./testing.helper";
|
|
16
|
+
export * from "./utilities.helper";
|
|
12
17
|
export * from "./wiring.helper";
|
|
@@ -1,16 +1,21 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./async.helper"), exports);
|
|
4
5
|
tslib_1.__exportStar(require("./cache-memory.helper"), exports);
|
|
5
6
|
tslib_1.__exportStar(require("./cache-redis.helper"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./config.helper"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./config-environment-loader.helper"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./config-file-loader.helper"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./context.helper"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./cron.helper"), exports);
|
|
9
12
|
tslib_1.__exportStar(require("./errors.helper"), exports);
|
|
10
13
|
tslib_1.__exportStar(require("./events.helper"), exports);
|
|
14
|
+
tslib_1.__exportStar(require("./extend.helper"), exports);
|
|
11
15
|
tslib_1.__exportStar(require("./fetch.helper"), exports);
|
|
12
16
|
tslib_1.__exportStar(require("./lifecycle.helper"), exports);
|
|
13
17
|
tslib_1.__exportStar(require("./metrics.helper"), exports);
|
|
14
18
|
tslib_1.__exportStar(require("./testing.helper"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./utilities.helper"), exports);
|
|
15
20
|
tslib_1.__exportStar(require("./wiring.helper"), exports);
|
|
16
21
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/helpers/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,gEAAsC;AACtC,+DAAqC;AACrC,0DAAgC;AAChC,6EAAmD;AACnD,sEAA4C;AAC5C,2DAAiC;AACjC,wDAA8B;AAC9B,0DAAgC;AAChC,0DAAgC;AAChC,0DAAgC;AAChC,yDAA+B;AAC/B,6DAAmC;AACnC,2DAAiC;AACjC,2DAAiC;AACjC,6DAAmC;AACnC,0DAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lifecycle.helper.js","sourceRoot":"","sources":["../../src/helpers/lifecycle.helper.ts"],"names":[],"mappings":";;;AAuDA,mDAAmD;AACtC,QAAA,gBAAgB,GAAG;IAC9B,SAAS;IACT,YAAY;IACZ,WAAW;IACX,OAAO;IACP,eAAe;IACf,kBAAkB;CACV,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"metrics.helper.js","sourceRoot":"","sources":["../../src/helpers/metrics.helper.ts"],"names":[],"mappings":";;;AAAA,wDAAwD;AACxD,6CAAiE;AAEjE;;GAEG;AACU,QAAA,6BAA6B,GAAG,IAAI,qBAAO,CAAC;IACvD,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D;CAC7D,CAAC,CAAC;AAEH;;;GAGG;AACU,QAAA,4BAA4B,GAAG,IAAI,mBAAK,CAAC;IACpD,IAAI,EAAE,8DAA8D;IACpE,IAAI,EAAE,0DAA0D;CACjE,CAAC,CAAC"}
|
|
@@ -7,13 +7,14 @@ const js_yaml_1 = require("js-yaml");
|
|
|
7
7
|
const os_1 = require("os");
|
|
8
8
|
const path_1 = require("path");
|
|
9
9
|
const process_1 = require("process");
|
|
10
|
-
const __1 = require("
|
|
10
|
+
const __1 = require("..");
|
|
11
|
+
const _1 = require(".");
|
|
11
12
|
exports.TESTING_APP_NAME = "digital-alchemy-unit-tests";
|
|
12
13
|
function ConfigurationFiles() {
|
|
13
14
|
const testDataMap = new Map();
|
|
14
15
|
function writeConfigFile(filePath, data, encodingType) {
|
|
15
16
|
let content;
|
|
16
|
-
encodingType = encodingType || (0, path_1.extname)(filePath).slice(
|
|
17
|
+
encodingType = encodingType || (0, path_1.extname)(filePath).slice(_1.SINGLE) || "ini";
|
|
17
18
|
switch (encodingType) {
|
|
18
19
|
case "json":
|
|
19
20
|
content = JSON.stringify(data);
|
|
@@ -87,5 +88,4 @@ function ConfigurationFiles() {
|
|
|
87
88
|
};
|
|
88
89
|
}
|
|
89
90
|
exports.ConfigurationFiles = ConfigurationFiles;
|
|
90
|
-
__1.ZCC_Testing.configurationFiles = ConfigurationFiles;
|
|
91
91
|
//# sourceMappingURL=testing.helper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testing.helper.js","sourceRoot":"","sources":["../../src/helpers/testing.helper.ts"],"names":[],"mappings":";;;AAAA,2BAA2D;AAC3D,6BAA0C;AAC1C,qCAA2C;AAC3C,2BAA6B;AAC7B,+BAAqC;AACrC,qCAA8B;AAE9B,0BAAwB;AACxB,wBAA2B;AAEd,QAAA,gBAAgB,GAAG,4BAA4B,CAAC;AAO7D,SAAgB,kBAAkB;IAChC,MAAM,WAAW,GAAG,IAAI,GAAG,EAAuC,CAAC;I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AC,IAAI,IAAK,CAAC,KAAK,GAAG,oBAAY,CAAO,CACpD,CAAC;AACJ,CAAC;AAJD,oBAIC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Dayjs } from "dayjs";
|
|
3
3
|
import { EventEmitter } from "events";
|
|
4
|
-
import { CronExpression, TBlackHole, TContext
|
|
4
|
+
import { CronExpression, InternalDefinition, TBlackHole, TContext } from "..";
|
|
5
5
|
import { ILogger, LIB_BOILERPLATE, TCache } from "..";
|
|
6
6
|
import { AnyConfig, BooleanConfig, InternalConfig, NumberConfig, OptionalModuleConfiguration, StringArrayConfig, StringConfig } from "./config.helper";
|
|
7
7
|
import { TChildLifecycle, TLifecycleBase } from "./lifecycle.helper";
|
|
@@ -98,7 +98,7 @@ export type TServiceParams = {
|
|
|
98
98
|
*
|
|
99
99
|
* mostly useful for libraries
|
|
100
100
|
*/
|
|
101
|
-
internal:
|
|
101
|
+
internal: InternalDefinition;
|
|
102
102
|
/**
|
|
103
103
|
* add to the way the application starts / stops
|
|
104
104
|
*/
|
|
@@ -135,6 +135,15 @@ export type ServiceMap = Record<string, ServiceFunction>;
|
|
|
135
135
|
export type LibraryConfigurationOptions<S extends ServiceMap, C extends OptionalModuleConfiguration> = {
|
|
136
136
|
name: keyof LoadedModules;
|
|
137
137
|
services: S;
|
|
138
|
+
/**
|
|
139
|
+
* ensure other libraries get loaded first.
|
|
140
|
+
* only list those that are directly utilized in library
|
|
141
|
+
*
|
|
142
|
+
* - application must declare all dependencies, this is used for validation & determining loading order
|
|
143
|
+
* - warnings will be emitted if this library utilizes a different version of a dependency than what the app uses
|
|
144
|
+
* - version provided by app will be substituted
|
|
145
|
+
*/
|
|
146
|
+
depends?: LibraryConfigurationOptions<ServiceMap, OptionalModuleConfiguration>[];
|
|
138
147
|
configuration?: C;
|
|
139
148
|
/**
|
|
140
149
|
* Define which services should be initialized first. Any remaining services are done at the end in no set order
|
|
@@ -171,7 +180,7 @@ type Wire = {
|
|
|
171
180
|
* - initializes lifecycle
|
|
172
181
|
* - attaches event emitters
|
|
173
182
|
*/
|
|
174
|
-
[WIRE_PROJECT]: (ZCC:
|
|
183
|
+
[WIRE_PROJECT]: (ZCC: InternalDefinition) => Promise<TChildLifecycle>;
|
|
175
184
|
};
|
|
176
185
|
export type LibraryDefinition<S extends ServiceMap, C extends OptionalModuleConfiguration> = LibraryConfigurationOptions<S, C> & Wire & {
|
|
177
186
|
lifecycle: TChildLifecycle;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wiring.helper.js","sourceRoot":"","sources":["../../src/helpers/wiring.helper.ts"],"names":[],"mappings":";;;AA4Ra,QAAA,YAAY,GAAG,MAAM,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./
|
|
2
|
-
export * from "./
|
|
1
|
+
export * from "./extensions";
|
|
2
|
+
export * from "./helpers";
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
|
|
5
|
-
tslib_1.__exportStar(require("./
|
|
6
|
-
//
|
|
7
|
-
tslib_1.__exportStar(require("./boilerplate"), exports);
|
|
4
|
+
tslib_1.__exportStar(require("./extensions"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./helpers"), exports);
|
|
8
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,uDAA6B;AAC7B,oDAA0B"}
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digital-alchemy/core",
|
|
3
3
|
"repository": {
|
|
4
|
-
"url": "git+https://github.com/
|
|
4
|
+
"url": "git+https://github.com/Digital-Alchemy-TS/core"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.1.
|
|
6
|
+
"version": "0.1.18",
|
|
7
7
|
"author": {
|
|
8
8
|
"url": "https://github.com/zoe-codez",
|
|
9
9
|
"name": "Zoe"
|
|
@@ -12,21 +12,10 @@
|
|
|
12
12
|
"build": "tsc -p tsconfig.lib.json",
|
|
13
13
|
"lint": "eslint src",
|
|
14
14
|
"prepublishOnly": "npm run build",
|
|
15
|
-
"dev:type-writer": "tsx watch src/type-writer/main.ts",
|
|
16
|
-
"dev:nexus": "tsx watch src/nexus/main.ts",
|
|
17
|
-
"dev:purge": "tsx watch src/purge/main.ts",
|
|
18
15
|
"test": "./scripts/test.sh"
|
|
19
16
|
},
|
|
20
17
|
"exports": {
|
|
21
|
-
".": "./dist/index.js"
|
|
22
|
-
"./hass": "./dist/hass/index.js",
|
|
23
|
-
"./gotify": "./dist/gotify/index.js",
|
|
24
|
-
"./synapse": "./dist/synapse/index.js",
|
|
25
|
-
"./automation": "./dist/automation/index.js"
|
|
26
|
-
},
|
|
27
|
-
"bin": {
|
|
28
|
-
"synapse-purge": "./dist/purge/main.js",
|
|
29
|
-
"type-writer": "./dist/type-writer/main.js"
|
|
18
|
+
".": "./dist/index.js"
|
|
30
19
|
},
|
|
31
20
|
"files": [
|
|
32
21
|
"dist/**/*"
|
|
@@ -37,52 +26,49 @@
|
|
|
37
26
|
"dependencies": {
|
|
38
27
|
"chalk": "^5.3.0",
|
|
39
28
|
"dayjs": "^1.11.10",
|
|
40
|
-
"ini": "^4.1.
|
|
29
|
+
"ini": "^4.1.2",
|
|
41
30
|
"js-yaml": "^4.1.0",
|
|
42
31
|
"minimist": "^1.2.8",
|
|
43
32
|
"node-cache": "^5.1.2",
|
|
44
33
|
"node-cron": "^3.0.3",
|
|
45
|
-
"prom-client": "^15.1.0"
|
|
46
|
-
"ws": "^8.16.0"
|
|
34
|
+
"prom-client": "^15.1.0"
|
|
47
35
|
},
|
|
48
36
|
"optionalDependencies": {
|
|
49
|
-
"redis": "^4.6.13"
|
|
50
|
-
"typescript": "^5.3.3"
|
|
37
|
+
"redis": "^4.6.13"
|
|
51
38
|
},
|
|
52
39
|
"devDependencies": {
|
|
53
|
-
"@cspell/eslint-plugin": "^8.
|
|
54
|
-
"@faker-js/faker": "^8.4.
|
|
40
|
+
"@cspell/eslint-plugin": "^8.5.0",
|
|
41
|
+
"@faker-js/faker": "^8.4.1",
|
|
55
42
|
"@types/ini": "^4.1.0",
|
|
56
43
|
"@types/jest": "^29.5.12",
|
|
57
44
|
"@types/js-yaml": "^4.0.9",
|
|
58
45
|
"@types/minimist": "^1.2.5",
|
|
59
46
|
"@types/node-cron": "^3.0.11",
|
|
60
|
-
"@types/node": "^20.11.
|
|
61
|
-
"@types/semver": "^7.5.
|
|
47
|
+
"@types/node": "^20.11.24",
|
|
48
|
+
"@types/semver": "^7.5.8",
|
|
62
49
|
"@types/sinonjs__fake-timers": "^8.1.5",
|
|
63
|
-
"@
|
|
64
|
-
"@
|
|
65
|
-
"@typescript-eslint/eslint-plugin": "6.21.0",
|
|
66
|
-
"@typescript-eslint/parser": "6.21.0",
|
|
50
|
+
"@typescript-eslint/eslint-plugin": "7.1.1",
|
|
51
|
+
"@typescript-eslint/parser": "7.1.1",
|
|
67
52
|
"eslint-config-prettier": "9.1.0",
|
|
68
53
|
"eslint-plugin-import": "^2.29.1",
|
|
69
54
|
"eslint-plugin-jsonc": "^2.13.0",
|
|
70
55
|
"eslint-plugin-no-unsanitized": "^4.0.2",
|
|
71
56
|
"eslint-plugin-prettier": "^5.1.3",
|
|
72
|
-
"eslint-plugin-security": "^2.1.
|
|
73
|
-
"eslint-plugin-simple-import-sort": "^
|
|
74
|
-
"eslint-plugin-sonarjs": "^0.
|
|
57
|
+
"eslint-plugin-security": "^2.1.1",
|
|
58
|
+
"eslint-plugin-simple-import-sort": "^12.0.0",
|
|
59
|
+
"eslint-plugin-sonarjs": "^0.24.0",
|
|
75
60
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
76
|
-
"eslint-plugin-unicorn": "^51.0.
|
|
77
|
-
"eslint": "8.
|
|
61
|
+
"eslint-plugin-unicorn": "^51.0.1",
|
|
62
|
+
"eslint": "8.57.0",
|
|
78
63
|
"jest-environment-node": "^29.7.0",
|
|
79
64
|
"jest": "^29.7.0",
|
|
80
|
-
"npm-check-updates": "^16.14.
|
|
65
|
+
"npm-check-updates": "^16.14.15",
|
|
81
66
|
"prettier": "^3.2.5",
|
|
82
67
|
"ts-jest": "^29.1.2",
|
|
83
68
|
"tslib": "^2.6.2",
|
|
84
|
-
"tsx": "^4.7.
|
|
85
|
-
"type-fest": "^4.
|
|
69
|
+
"tsx": "^4.7.1",
|
|
70
|
+
"type-fest": "^4.11.0",
|
|
71
|
+
"typescript": "^5.3.3"
|
|
86
72
|
},
|
|
87
73
|
"jest": {
|
|
88
74
|
"preset": "ts-jest",
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { AggressiveScenes, CircadianLighting, LightManager, ManagedSwitch, Room, SequenceWatcher, SolarCalculator } from "./extensions";
|
|
2
|
-
export declare const LIB_AUTOMATION: import("../boilerplate").LibraryDefinition<{
|
|
3
|
-
/**
|
|
4
|
-
* # Aggressive Scenes extension
|
|
5
|
-
*
|
|
6
|
-
* Sets up opt-in functionality that allows for more active management of scene states inside the system
|
|
7
|
-
* It coordinates with rooms to know what the current state is, and periodically checks entities to ensure that are currently in the state that they are expected to be
|
|
8
|
-
*
|
|
9
|
-
* - Correct for changes made in the real world (humans turning on a switch that should be off at the moment)
|
|
10
|
-
* - Changing definitions of "correct" (like light colors for circadian lighting)
|
|
11
|
-
* - Entities that failed to change to the correct state when asked the first time
|
|
12
|
-
*/
|
|
13
|
-
aggressive: typeof AggressiveScenes;
|
|
14
|
-
/**
|
|
15
|
-
* # Circadian lighting
|
|
16
|
-
*
|
|
17
|
-
* Generate an entity to maintain the current color temperature target for lights
|
|
18
|
-
*/
|
|
19
|
-
circadian: typeof CircadianLighting;
|
|
20
|
-
/**
|
|
21
|
-
* Internal tools for managing lights
|
|
22
|
-
*/
|
|
23
|
-
light: typeof LightManager;
|
|
24
|
-
/**
|
|
25
|
-
* adjust the state of a switch, based on a calculated state
|
|
26
|
-
*/
|
|
27
|
-
managed_switch: typeof ManagedSwitch;
|
|
28
|
-
/**
|
|
29
|
-
* Coordinate a set of entities as a higher level group
|
|
30
|
-
*
|
|
31
|
-
* Creates scenes, and sensors
|
|
32
|
-
*/
|
|
33
|
-
room: typeof Room;
|
|
34
|
-
/**
|
|
35
|
-
* match a sequence of events to trigger callback
|
|
36
|
-
*/
|
|
37
|
-
sequence: typeof SequenceWatcher;
|
|
38
|
-
/**
|
|
39
|
-
* tools for performing logic with sun position
|
|
40
|
-
*/
|
|
41
|
-
solar: typeof SolarCalculator;
|
|
42
|
-
}, {
|
|
43
|
-
AGGRESSIVE_SCENES: {
|
|
44
|
-
default: true;
|
|
45
|
-
description: string;
|
|
46
|
-
type: "boolean";
|
|
47
|
-
};
|
|
48
|
-
CIRCADIAN_DIFF_THRESHOLD: {
|
|
49
|
-
default: number;
|
|
50
|
-
description: string;
|
|
51
|
-
type: "number";
|
|
52
|
-
};
|
|
53
|
-
CIRCADIAN_ENABLED: {
|
|
54
|
-
default: true;
|
|
55
|
-
description: string;
|
|
56
|
-
type: "boolean";
|
|
57
|
-
};
|
|
58
|
-
CIRCADIAN_MAX_TEMP: {
|
|
59
|
-
default: number;
|
|
60
|
-
description: string;
|
|
61
|
-
type: "number";
|
|
62
|
-
};
|
|
63
|
-
CIRCADIAN_MIN_TEMP: {
|
|
64
|
-
default: number;
|
|
65
|
-
description: string;
|
|
66
|
-
type: "number";
|
|
67
|
-
};
|
|
68
|
-
CIRCADIAN_RATE: {
|
|
69
|
-
default: number;
|
|
70
|
-
description: string[];
|
|
71
|
-
type: "number";
|
|
72
|
-
};
|
|
73
|
-
CIRCADIAN_SENSOR_NAME: {
|
|
74
|
-
default: string;
|
|
75
|
-
description: string;
|
|
76
|
-
type: "string";
|
|
77
|
-
};
|
|
78
|
-
CIRCADIAN_THROTTLE: {
|
|
79
|
-
default: number;
|
|
80
|
-
description: string;
|
|
81
|
-
type: "number";
|
|
82
|
-
};
|
|
83
|
-
SEQUENCE_TIMEOUT: {
|
|
84
|
-
default: number;
|
|
85
|
-
description: string;
|
|
86
|
-
type: "number";
|
|
87
|
-
};
|
|
88
|
-
}>;
|
|
89
|
-
declare module "../boilerplate" {
|
|
90
|
-
interface LoadedModules {
|
|
91
|
-
/**
|
|
92
|
-
* higher level automation tools
|
|
93
|
-
*/
|
|
94
|
-
automation: typeof LIB_AUTOMATION;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LIB_AUTOMATION = void 0;
|
|
4
|
-
const boilerplate_1 = require("../boilerplate");
|
|
5
|
-
const extensions_1 = require("./extensions");
|
|
6
|
-
exports.LIB_AUTOMATION = (0, boilerplate_1.CreateLibrary)({
|
|
7
|
-
configuration: {
|
|
8
|
-
AGGRESSIVE_SCENES: {
|
|
9
|
-
default: true,
|
|
10
|
-
description: "Verify continue to match their desired state as defined by the room's current scene",
|
|
11
|
-
type: "boolean",
|
|
12
|
-
},
|
|
13
|
-
CIRCADIAN_DIFF_THRESHOLD: {
|
|
14
|
-
default: 50,
|
|
15
|
-
description: "Current light temperature must be at least this much off target in order to be eligible for adjustment",
|
|
16
|
-
type: "number",
|
|
17
|
-
},
|
|
18
|
-
CIRCADIAN_ENABLED: {
|
|
19
|
-
default: true,
|
|
20
|
-
description: "Take responsibility for generating [CIRCADIAN_SENSOR] and emitting updates",
|
|
21
|
-
type: "boolean",
|
|
22
|
-
},
|
|
23
|
-
CIRCADIAN_MAX_TEMP: {
|
|
24
|
-
default: 5500,
|
|
25
|
-
description: "Maximum color temperature for circadian lighting. Used at solar noon",
|
|
26
|
-
type: "number",
|
|
27
|
-
},
|
|
28
|
-
CIRCADIAN_MIN_TEMP: {
|
|
29
|
-
default: 2000,
|
|
30
|
-
description: "Minimum color temperature for circadian lighting. Used while it's dark out",
|
|
31
|
-
type: "number",
|
|
32
|
-
},
|
|
33
|
-
CIRCADIAN_RATE: {
|
|
34
|
-
default: 3,
|
|
35
|
-
description: [
|
|
36
|
-
"Number of entities to adjust at the same time",
|
|
37
|
-
"Higher values increase load",
|
|
38
|
-
],
|
|
39
|
-
type: "number",
|
|
40
|
-
},
|
|
41
|
-
CIRCADIAN_SENSOR_NAME: {
|
|
42
|
-
default: "Light temperature",
|
|
43
|
-
description: "Sensor for reading / writing current light temperature to",
|
|
44
|
-
type: "string",
|
|
45
|
-
},
|
|
46
|
-
CIRCADIAN_THROTTLE: {
|
|
47
|
-
default: 300,
|
|
48
|
-
description: "Artificial delay to add",
|
|
49
|
-
type: "number",
|
|
50
|
-
},
|
|
51
|
-
SEQUENCE_TIMEOUT: {
|
|
52
|
-
default: 1500,
|
|
53
|
-
description: "When tracking state changes for a sequence event, another change must happen inside this time window",
|
|
54
|
-
type: "number",
|
|
55
|
-
},
|
|
56
|
-
},
|
|
57
|
-
name: "automation",
|
|
58
|
-
// light depends circadian
|
|
59
|
-
priorityInit: ["circadian"],
|
|
60
|
-
services: {
|
|
61
|
-
/**
|
|
62
|
-
* # Aggressive Scenes extension
|
|
63
|
-
*
|
|
64
|
-
* Sets up opt-in functionality that allows for more active management of scene states inside the system
|
|
65
|
-
* It coordinates with rooms to know what the current state is, and periodically checks entities to ensure that are currently in the state that they are expected to be
|
|
66
|
-
*
|
|
67
|
-
* - Correct for changes made in the real world (humans turning on a switch that should be off at the moment)
|
|
68
|
-
* - Changing definitions of "correct" (like light colors for circadian lighting)
|
|
69
|
-
* - Entities that failed to change to the correct state when asked the first time
|
|
70
|
-
*/
|
|
71
|
-
aggressive: extensions_1.AggressiveScenes,
|
|
72
|
-
/**
|
|
73
|
-
* # Circadian lighting
|
|
74
|
-
*
|
|
75
|
-
* Generate an entity to maintain the current color temperature target for lights
|
|
76
|
-
*/
|
|
77
|
-
circadian: extensions_1.CircadianLighting,
|
|
78
|
-
/**
|
|
79
|
-
* Internal tools for managing lights
|
|
80
|
-
*/
|
|
81
|
-
light: extensions_1.LightManager,
|
|
82
|
-
/**
|
|
83
|
-
* adjust the state of a switch, based on a calculated state
|
|
84
|
-
*/
|
|
85
|
-
managed_switch: extensions_1.ManagedSwitch,
|
|
86
|
-
/**
|
|
87
|
-
* Coordinate a set of entities as a higher level group
|
|
88
|
-
*
|
|
89
|
-
* Creates scenes, and sensors
|
|
90
|
-
*/
|
|
91
|
-
room: extensions_1.Room,
|
|
92
|
-
/**
|
|
93
|
-
* match a sequence of events to trigger callback
|
|
94
|
-
*/
|
|
95
|
-
sequence: extensions_1.SequenceWatcher,
|
|
96
|
-
/**
|
|
97
|
-
* tools for performing logic with sun position
|
|
98
|
-
*/
|
|
99
|
-
solar: extensions_1.SolarCalculator,
|
|
100
|
-
},
|
|
101
|
-
});
|
|
102
|
-
//# sourceMappingURL=automation.module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"automation.module.js","sourceRoot":"","sources":["../../src/automation/automation.module.ts"],"names":[],"mappings":";;;AAAA,gDAA+C;AAC/C,6CAQsB;AAET,QAAA,cAAc,GAAG,IAAA,2BAAa,EAAC;IAC1C,aAAa,EAAE;QACb,iBAAiB,EAAE;YACjB,OAAO,EAAE,IAAI;YACb,WAAW,EACT,qFAAqF;YACvF,IAAI,EAAE,SAAS;SAChB;QACD,wBAAwB,EAAE;YACxB,OAAO,EAAE,EAAE;YACX,WAAW,EACT,wGAAwG;YAC1G,IAAI,EAAE,QAAQ;SACf;QACD,iBAAiB,EAAE;YACjB,OAAO,EAAE,IAAI;YACb,WAAW,EACT,4EAA4E;YAC9E,IAAI,EAAE,SAAS;SAChB;QACD,kBAAkB,EAAE;YAClB,OAAO,EAAE,IAAI;YACb,WAAW,EACT,sEAAsE;YACxE,IAAI,EAAE,QAAQ;SACf;QACD,kBAAkB,EAAE;YAClB,OAAO,EAAE,IAAI;YACb,WAAW,EACT,4EAA4E;YAC9E,IAAI,EAAE,QAAQ;SACf;QACD,cAAc,EAAE;YACd,OAAO,EAAE,CAAC;YACV,WAAW,EAAE;gBACX,+CAA+C;gBAC/C,6BAA6B;aAC9B;YACD,IAAI,EAAE,QAAQ;SACf;QACD,qBAAqB,EAAE;YACrB,OAAO,EAAE,mBAAmB;YAC5B,WAAW,EAAE,2DAA2D;YACxE,IAAI,EAAE,QAAQ;SACf;QACD,kBAAkB,EAAE;YAClB,OAAO,EAAE,GAAG;YACZ,WAAW,EAAE,yBAAyB;YACtC,IAAI,EAAE,QAAQ;SACf;QACD,gBAAgB,EAAE;YAChB,OAAO,EAAE,IAAI;YACb,WAAW,EACT,sGAAsG;YACxG,IAAI,EAAE,QAAQ;SACf;KACF;IACD,IAAI,EAAE,YAAY;IAClB,0BAA0B;IAC1B,YAAY,EAAE,CAAC,WAAW,CAAC;IAC3B,QAAQ,EAAE;QACR;;;;;;;;;WASG;QACH,UAAU,EAAE,6BAAgB;QAC5B;;;;WAIG;QACH,SAAS,EAAE,8BAAiB;QAC5B;;WAEG;QACH,KAAK,EAAE,yBAAY;QACnB;;WAEG;QACH,cAAc,EAAE,0BAAa;QAC7B;;;;WAIG;QACH,IAAI,EAAE,iBAAI;QACV;;WAEG;QACH,QAAQ,EAAE,4BAAe;QACzB;;WAEG;QACH,KAAK,EAAE,4BAAe;KACvB;CACF,CAAC,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { TContext, TServiceParams } from "../..";
|
|
2
|
-
import { RoomScene } from "../helpers";
|
|
3
|
-
type TValidateOptions = {
|
|
4
|
-
context: TContext;
|
|
5
|
-
room: string;
|
|
6
|
-
name: string;
|
|
7
|
-
scene: RoomScene;
|
|
8
|
-
};
|
|
9
|
-
export declare function AggressiveScenes({ logger, config, hass, event, automation, }: TServiceParams): {
|
|
10
|
-
validateRoomScene: ({ scene, room, name, context, }: TValidateOptions) => Promise<void>;
|
|
11
|
-
};
|
|
12
|
-
export {};
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AggressiveScenes = void 0;
|
|
4
|
-
const __1 = require("../..");
|
|
5
|
-
const hass_1 = require("../../hass");
|
|
6
|
-
const helpers_1 = require("../helpers");
|
|
7
|
-
function AggressiveScenes({ logger, config, hass, event, automation, }) {
|
|
8
|
-
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
9
|
-
async function manageSwitch(entity, scene) {
|
|
10
|
-
const entity_id = entity.entity_id;
|
|
11
|
-
const expected = scene[entity_id];
|
|
12
|
-
if (__1.is.empty(expected)) {
|
|
13
|
-
// ??
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
if (entity.state === "unavailable") {
|
|
17
|
-
logger.warn({ name: entity_id }, `{unavailable} entity, cannot manage state`);
|
|
18
|
-
return;
|
|
19
|
-
}
|
|
20
|
-
let performedUpdate = false;
|
|
21
|
-
if (entity.state !== expected.state) {
|
|
22
|
-
await matchSwitchToScene(entity, expected);
|
|
23
|
-
performedUpdate = true;
|
|
24
|
-
}
|
|
25
|
-
if (performedUpdate) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if ("entity_id" in entity.attributes) {
|
|
29
|
-
// ? This is a group
|
|
30
|
-
const id = entity.attributes.entity_id;
|
|
31
|
-
if (__1.is.array(id) && !__1.is.empty(id)) {
|
|
32
|
-
await (0, __1.each)(entity.attributes.entity_id, async (child_id) => {
|
|
33
|
-
const child = hass.entity.byId(child_id);
|
|
34
|
-
if (!child) {
|
|
35
|
-
logger.warn(`%s => %s child entity of group cannot be found`, entity_id, child_id);
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
if (child.state === "unavailable") {
|
|
39
|
-
logger.warn({ name: child_id }, `{unavailable} entity, cannot manage state`);
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
if (child.state !== expected.state) {
|
|
43
|
-
await matchSwitchToScene(child, expected);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
async function matchSwitchToScene(entity, expected) {
|
|
50
|
-
const entity_id = entity.entity_id;
|
|
51
|
-
logger.debug({ name: entity_id, state: expected.state }, `changing state`);
|
|
52
|
-
event.emit(helpers_1.AGGRESSIVE_SCENES_ADJUSTMENT, {
|
|
53
|
-
entity_id,
|
|
54
|
-
type: "switch_on_off",
|
|
55
|
-
});
|
|
56
|
-
if (expected.state === "on") {
|
|
57
|
-
await hass.call.switch.turn_on({ entity_id });
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
await hass.call.switch.turn_off({ entity_id });
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* This function should **NOT** emit logs on noop
|
|
64
|
-
*
|
|
65
|
-
* - errors
|
|
66
|
-
* - warnings
|
|
67
|
-
* - state changes
|
|
68
|
-
*/
|
|
69
|
-
async function validateRoomScene({ scene, room, name, context, }) {
|
|
70
|
-
if (config.automation.AGGRESSIVE_SCENES === false ||
|
|
71
|
-
scene?.aggressive === false) {
|
|
72
|
-
// nothing to do
|
|
73
|
-
return;
|
|
74
|
-
}
|
|
75
|
-
if (!scene?.definition) {
|
|
76
|
-
logger.warn({ context, name, room, scene }, `cannot validate room scene`);
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
if (!__1.is.object(scene.definition) || __1.is.empty(scene.definition)) {
|
|
80
|
-
// ? There currently is no use case for a scene with no entities in it
|
|
81
|
-
// Not technically an error though
|
|
82
|
-
logger.warn("no definition");
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
const entities = Object.keys(scene.definition);
|
|
86
|
-
await (0, __1.each)(entities, async (entity_id) => {
|
|
87
|
-
const entity = hass.entity.byId(entity_id);
|
|
88
|
-
if (!entity) {
|
|
89
|
-
// * Home assistant outright does not send an entity for this id
|
|
90
|
-
// The wrong id was probably input
|
|
91
|
-
//
|
|
92
|
-
// ? This is distinct from "unavailable" entities
|
|
93
|
-
logger.error({ name: entity_id }, `cannot find entity`);
|
|
94
|
-
return;
|
|
95
|
-
}
|
|
96
|
-
const entityDomain = (0, hass_1.domain)(entity_id);
|
|
97
|
-
switch (entityDomain) {
|
|
98
|
-
case "light":
|
|
99
|
-
await automation.light.manageLight(entity, scene.definition);
|
|
100
|
-
return;
|
|
101
|
-
case "switch":
|
|
102
|
-
await manageSwitch(entity, scene.definition);
|
|
103
|
-
return;
|
|
104
|
-
default:
|
|
105
|
-
logger.debug({ name: entityDomain }, `no actions set for domain`);
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
}
|
|
109
|
-
return {
|
|
110
|
-
validateRoomScene,
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
exports.AggressiveScenes = AggressiveScenes;
|
|
114
|
-
//# sourceMappingURL=aggressive-scenes.extension.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"aggressive-scenes.extension.js","sourceRoot":"","sources":["../../../src/automation/extensions/aggressive-scenes.extension.ts"],"names":[],"mappings":";;;AAAA,6BAA2D;AAC3D,qCAA+D;AAC/D,wCAMoB;AASpB,SAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,UAAU,GACK;IACf,wDAAwD;IACxD,KAAK,UAAU,YAAY,CACzB,MAA2C,EAC3C,KAAsB;QAEtB,MAAM,SAAS,GAAG,MAAM,CAAC,SAAkC,CAAC;QAC5D,MAAM,QAAQ,GAAG,KAAK,CAAC,SAAS,CAAqB,CAAC;QACtD,IAAI,MAAE,CAAC,KAAK,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ting({ logger, lifecycle, scheduler, synapse, automation, config, context, event, }: TServiceParams): {
|
|
3
|
-
circadianEntity: import("../../synapse").VirtualSensor<number, object>;
|
|
4
|
-
getKelvin: () => number;
|
|
5
|
-
updateKelvin: () => void;
|
|
6
|
-
};
|