@digital-alchemy/hass 24.9.4 → 24.9.5
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/README.md +1 -1
- package/dist/helpers/notify.helper.d.ts +2 -2
- package/package.json +16 -14
- package/scripts/mock-assistant.sh +5 -0
- package/scripts/run-e2e.sh +7 -0
- package/scripts/test.sh +2 -0
- package/src/dynamic.ts +4254 -0
- package/src/extensions/area.extension.ts +118 -0
- package/src/extensions/backup.extension.ts +63 -0
- package/src/extensions/call-proxy.extension.ts +113 -0
- package/src/extensions/config.extension.ts +119 -0
- package/src/extensions/conversation.extension.ts +46 -0
- package/src/extensions/device.extension.ts +56 -0
- package/src/extensions/entity.extension.ts +344 -0
- package/src/extensions/events.extension.ts +25 -0
- package/src/extensions/fetch-api.extension.ts +269 -0
- package/src/extensions/floor.extension.ts +76 -0
- package/src/extensions/id-by.extension.ts +157 -0
- package/src/extensions/index.ts +16 -0
- package/src/extensions/internal.extension.ts +145 -0
- package/src/extensions/label.extension.ts +83 -0
- package/src/extensions/reference.extension.ts +330 -0
- package/src/extensions/registry.extension.ts +44 -0
- package/src/extensions/websocket-api.extension.ts +554 -0
- package/src/extensions/zone.extension.ts +69 -0
- package/src/hass.module.ts +217 -0
- package/src/helpers/backup.helper.ts +11 -0
- package/src/helpers/constants.helper.ts +30 -0
- package/src/helpers/device.helper.ts +25 -0
- package/src/helpers/entity-state.helper.ts +171 -0
- package/src/helpers/features.helper.ts +580 -0
- package/src/helpers/fetch/calendar.ts +54 -0
- package/src/helpers/fetch/configuration.ts +75 -0
- package/src/helpers/fetch/index.ts +5 -0
- package/src/helpers/fetch/server-log.ts +28 -0
- package/src/helpers/fetch/service-list.ts +64 -0
- package/src/helpers/fetch/weather-forecasts.ts +86 -0
- package/src/helpers/fetch.helper.ts +328 -0
- package/src/helpers/id-by.helper.ts +53 -0
- package/src/helpers/index.ts +13 -0
- package/src/helpers/interfaces.helper.ts +340 -0
- package/src/helpers/manifest.helper.ts +0 -0
- package/src/helpers/notify.helper.ts +302 -0
- package/src/helpers/registry.ts +281 -0
- package/src/helpers/utility.helper.ts +147 -0
- package/src/helpers/websocket.helper.ts +117 -0
- package/src/index.ts +5 -0
- package/src/mock_assistant/extensions/area.extension.ts +62 -0
- package/src/mock_assistant/extensions/config.extension.ts +33 -0
- package/src/mock_assistant/extensions/device.extension.ts +44 -0
- package/src/mock_assistant/extensions/entity-registry.extension.ts +41 -0
- package/src/mock_assistant/extensions/entity.extension.ts +114 -0
- package/src/mock_assistant/extensions/events.extension.ts +37 -0
- package/src/mock_assistant/extensions/fetch.extension.ts +3 -0
- package/src/mock_assistant/extensions/fixtures.extension.ts +79 -0
- package/src/mock_assistant/extensions/floor.extension.ts +64 -0
- package/src/mock_assistant/extensions/index.ts +12 -0
- package/src/mock_assistant/extensions/label.extension.ts +64 -0
- package/src/mock_assistant/extensions/services.extension.ts +25 -0
- package/src/mock_assistant/extensions/websocket-api.extension.ts +84 -0
- package/src/mock_assistant/extensions/zone.extension.ts +65 -0
- package/src/mock_assistant/helpers/fixtures.ts +22 -0
- package/src/mock_assistant/helpers/index.ts +1 -0
- package/src/mock_assistant/index.ts +3 -0
- package/src/mock_assistant/main.ts +46 -0
- package/src/mock_assistant/mock-assistant.module.ts +90 -0
- package/src/quickboot.module.ts +23 -0
- package/src/testing/area.spec.ts +189 -0
- package/src/testing/backup.spec.ts +157 -0
- package/src/testing/config.spec.ts +188 -0
- package/src/testing/device.spec.ts +89 -0
- package/src/testing/entity.spec.ts +171 -0
- package/src/testing/events.spec.ts +78 -0
- package/src/testing/fetch-api.spec.ts +410 -0
- package/src/testing/fixtures.spec.ts +158 -0
- package/src/testing/floor.spec.ts +186 -0
- package/src/testing/id-by.spec.ts +140 -0
- package/src/testing/label.spec.ts +186 -0
- package/src/testing/ref-by.spec.ts +300 -0
- package/src/testing/websocket.spec.ts +63 -0
- package/src/testing/workflow.spec.ts +195 -0
- package/src/testing/zone.spec.ts +109 -0
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[](https://github.com/Digital-Alchemy-TS/hass)
|
|
2
2
|

|
|
3
|
-
|
|
4
3
|
[](https://codecov.io/gh/Digital-Alchemy-TS/hass)
|
|
5
4
|
[](https://www.npmjs.com/package/@digital-alchemy/hass)
|
|
5
|
+
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# 🏠 Welcome to `@digital-alchemy/hass`!
|
|
@@ -118,7 +118,7 @@ export type AppleNotificationData = {
|
|
|
118
118
|
/**
|
|
119
119
|
* iOS Supports ~10 actions.
|
|
120
120
|
*/
|
|
121
|
-
actions
|
|
121
|
+
actions?: Array<NotificationAction & AppleNotificationActionOptions>;
|
|
122
122
|
};
|
|
123
123
|
export type AndroidNotificationData = {
|
|
124
124
|
/**
|
|
@@ -257,7 +257,7 @@ export type AndroidNotificationData = {
|
|
|
257
257
|
/**
|
|
258
258
|
* Android Supports 3 actions.
|
|
259
259
|
*/
|
|
260
|
-
actions
|
|
260
|
+
actions?: Array<NotificationAction & AndroidNotificationActionOptions>;
|
|
261
261
|
};
|
|
262
262
|
export type NotificationData = {
|
|
263
263
|
/**
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"name": "@digital-alchemy/hass",
|
|
4
4
|
"repository": "https://github.com/Digital-Alchemy-TS/hass",
|
|
5
5
|
"homepage": "https://docs.digital-alchemy.app",
|
|
6
|
-
"version": "24.9.
|
|
6
|
+
"version": "24.9.5",
|
|
7
7
|
"description": "Typescript APIs for Home Assistant. Includes rest & websocket bindings",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"build": "rm -rf dist/; tsc",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"digital-alchemy"
|
|
27
27
|
],
|
|
28
28
|
"bin": {
|
|
29
|
-
"mock-assistant": "./
|
|
29
|
+
"mock-assistant": "./scripts/mock-assistant.sh"
|
|
30
30
|
},
|
|
31
31
|
"funding": [
|
|
32
32
|
{
|
|
@@ -43,7 +43,9 @@
|
|
|
43
43
|
"name": "Zoe Codez"
|
|
44
44
|
},
|
|
45
45
|
"files": [
|
|
46
|
-
"dist/**/*"
|
|
46
|
+
"dist/**/*",
|
|
47
|
+
"scripts/**/*",
|
|
48
|
+
"src/**/*"
|
|
47
49
|
],
|
|
48
50
|
"engines": {
|
|
49
51
|
"node": ">=20"
|
|
@@ -55,36 +57,36 @@
|
|
|
55
57
|
"license": "MIT",
|
|
56
58
|
"devDependencies": {
|
|
57
59
|
"@cspell/eslint-plugin": "^8.14.4",
|
|
58
|
-
"@digital-alchemy/core": "^24.9.
|
|
59
|
-
"@digital-alchemy/synapse": "^24.9.
|
|
60
|
-
"@digital-alchemy/type-writer": "^24.9.
|
|
60
|
+
"@digital-alchemy/core": "^24.9.5",
|
|
61
|
+
"@digital-alchemy/synapse": "^24.9.4",
|
|
62
|
+
"@digital-alchemy/type-writer": "^24.9.7",
|
|
61
63
|
"@eslint/compat": "^1.1.1",
|
|
62
64
|
"@eslint/eslintrc": "^3.1.0",
|
|
63
65
|
"@eslint/js": "^9.11.1",
|
|
64
|
-
"@faker-js/faker": "^9.0.
|
|
66
|
+
"@faker-js/faker": "^9.0.3",
|
|
65
67
|
"@types/jest": "^29.5.13",
|
|
66
68
|
"@types/js-yaml": "^4.0.9",
|
|
67
|
-
"@types/node": "^22.
|
|
68
|
-
"@types/node-cron": "^3",
|
|
69
|
+
"@types/node": "^22.7.4",
|
|
70
|
+
"@types/node-cron": "^3.0.11",
|
|
69
71
|
"@types/semver": "^7.5.8",
|
|
70
72
|
"@types/uuid": "^10.0.0",
|
|
71
73
|
"@types/ws": "^8.5.12",
|
|
72
|
-
"@typescript-eslint/eslint-plugin": "8.
|
|
73
|
-
"@typescript-eslint/parser": "8.
|
|
74
|
+
"@typescript-eslint/eslint-plugin": "8.8.0",
|
|
75
|
+
"@typescript-eslint/parser": "8.8.0",
|
|
74
76
|
"dayjs": "^1.11.13",
|
|
75
77
|
"dotenv": "^16.4.5",
|
|
76
78
|
"eslint": "9.11.1",
|
|
77
79
|
"eslint-config-prettier": "9.1.0",
|
|
78
80
|
"eslint-plugin-import": "^2.30.0",
|
|
79
81
|
"eslint-plugin-jsonc": "^2.16.0",
|
|
80
|
-
"eslint-plugin-no-unsanitized": "^4.1.
|
|
82
|
+
"eslint-plugin-no-unsanitized": "^4.1.2",
|
|
81
83
|
"eslint-plugin-prettier": "^5.2.1",
|
|
82
84
|
"eslint-plugin-security": "^3.0.1",
|
|
83
85
|
"eslint-plugin-simple-import-sort": "^12.1.1",
|
|
84
|
-
"eslint-plugin-sonarjs": "^2.0.
|
|
86
|
+
"eslint-plugin-sonarjs": "^2.0.3",
|
|
85
87
|
"eslint-plugin-sort-keys-fix": "^1.1.2",
|
|
86
88
|
"eslint-plugin-unicorn": "^55.0.0",
|
|
87
|
-
"globals": "^15.
|
|
89
|
+
"globals": "^15.10.0",
|
|
88
90
|
"jest": "^29.7.0",
|
|
89
91
|
"jest-environment-node": "^29.7.0",
|
|
90
92
|
"node-cron": "^3.0.3",
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
|
|
3
|
+
CONTAINER_NAME="digital_alchemy_e2e_homeassistant"
|
|
4
|
+
|
|
5
|
+
if ! docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME" >/dev/null 2>&1 || [ "$(docker inspect -f '{{.State.Running}}' "$CONTAINER_NAME")" != "true" ]; then
|
|
6
|
+
docker-compose -f ./e2e/hass/docker-compose.yaml up -d
|
|
7
|
+
fi
|
package/scripts/test.sh
ADDED