@camstack/addon-provider-homeassistant 1.2.170 → 1.2.172
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/addon.js +43 -9
- package/dist/addon.mjs +43 -9
- package/dist/{dist-BaG2A4xn.mjs → dist-B9xf8_Ix.mjs} +22164 -1751
- package/dist/{dist-B7c8ebLd.js → dist-Ba9raKow.js} +22164 -1751
- package/dist/ha-export/ha-export.addon.js +38 -1
- package/dist/ha-export/ha-export.addon.mjs +15 -1
- package/i18n/en.json +30 -0
- package/i18n/it.json +30 -0
- package/package.json +2 -1
|
@@ -2,9 +2,36 @@ Object.defineProperties(exports, {
|
|
|
2
2
|
__esModule: { value: true },
|
|
3
3
|
[Symbol.toStringTag]: { value: "Module" }
|
|
4
4
|
});
|
|
5
|
+
//#region \0rolldown/runtime.js
|
|
6
|
+
var __create = Object.create;
|
|
7
|
+
var __defProp = Object.defineProperty;
|
|
8
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
9
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
10
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
11
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
|
|
14
|
+
key = keys[i];
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
|
|
16
|
+
get: ((k) => from[k]).bind(null, key),
|
|
17
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return to;
|
|
21
|
+
};
|
|
22
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
23
|
+
value: mod,
|
|
24
|
+
enumerable: true
|
|
25
|
+
}) : target, mod));
|
|
5
26
|
//#endregion
|
|
6
|
-
const require_dist = require("../dist-
|
|
27
|
+
const require_dist = require("../dist-Ba9raKow.js");
|
|
7
28
|
let node_crypto = require("node:crypto");
|
|
29
|
+
require("node:zlib");
|
|
30
|
+
let node_fs = require("node:fs");
|
|
31
|
+
node_fs = __toESM(node_fs, 1);
|
|
32
|
+
let node_path = require("node:path");
|
|
33
|
+
node_path = __toESM(node_path, 1);
|
|
34
|
+
require("node:child_process");
|
|
8
35
|
/** The `BrokerInfo.kind` tag the Home Assistant provider stamps. */
|
|
9
36
|
var HA_BROKER_KIND = "home-assistant";
|
|
10
37
|
/**
|
|
@@ -4336,6 +4363,7 @@ async function call(slice, capName, make) {
|
|
|
4336
4363
|
}
|
|
4337
4364
|
return { ok: true };
|
|
4338
4365
|
}
|
|
4366
|
+
process.platform, process.env["SystemRoot"];
|
|
4339
4367
|
/**
|
|
4340
4368
|
* The ONE derivation of "a signed, expiring URL".
|
|
4341
4369
|
*
|
|
@@ -7942,12 +7970,14 @@ var HaExportAddon = class extends require_dist.BaseAddon {
|
|
|
7942
7970
|
{
|
|
7943
7971
|
id: "ha-export-brokers",
|
|
7944
7972
|
title: "Home Assistant instances",
|
|
7973
|
+
titleKey: "provider-homeassistant:globalSettings.s_ha-export-brokers.title",
|
|
7945
7974
|
description: brokerFields.length > 0 ? "One switch per Home Assistant broker. An instance that is off receives nothing; the devices exported to it are remembered and resume when it is turned back on." : "No Home Assistant broker is registered yet. Add one under External systems → Brokers and it will appear here.",
|
|
7946
7975
|
columns: 1,
|
|
7947
7976
|
fields: brokerFields.length > 0 ? brokerFields : [{
|
|
7948
7977
|
type: "info",
|
|
7949
7978
|
key: "ha-export:__no-brokers",
|
|
7950
7979
|
label: "No brokers",
|
|
7980
|
+
labelKey: "provider-homeassistant:globalSettings.s_ha-export-brokers.ha-export___no-brokers.label",
|
|
7951
7981
|
content: "Register a Home Assistant broker to enable the export.",
|
|
7952
7982
|
variant: "warning"
|
|
7953
7983
|
}]
|
|
@@ -7955,18 +7985,22 @@ var HaExportAddon = class extends require_dist.BaseAddon {
|
|
|
7955
7985
|
{
|
|
7956
7986
|
id: "ha-export-transport",
|
|
7957
7987
|
title: "Connection",
|
|
7988
|
+
titleKey: "provider-homeassistant:globalSettings.s_ha-export-transport.title",
|
|
7958
7989
|
columns: 1,
|
|
7959
7990
|
fields: [{
|
|
7960
7991
|
type: "text",
|
|
7961
7992
|
key: "publicBaseUrl",
|
|
7962
7993
|
label: "Hub URL Home Assistant can reach",
|
|
7994
|
+
labelKey: "provider-homeassistant:globalSettings.s_ha-export-transport.publicBaseUrl.label",
|
|
7963
7995
|
description: "Used to build the signed image links Home Assistant fetches. Leave empty to derive one from the network capabilities; a link that cannot be built is never sent.",
|
|
7996
|
+
descriptionKey: "provider-homeassistant:globalSettings.s_ha-export-transport.publicBaseUrl.description",
|
|
7964
7997
|
default: ""
|
|
7965
7998
|
}]
|
|
7966
7999
|
},
|
|
7967
8000
|
{
|
|
7968
8001
|
id: "ha-export-advanced",
|
|
7969
8002
|
title: "Advanced",
|
|
8003
|
+
titleKey: "provider-homeassistant:globalSettings.s_ha-export-advanced.title",
|
|
7970
8004
|
style: "accordion",
|
|
7971
8005
|
defaultCollapsed: true,
|
|
7972
8006
|
columns: 1,
|
|
@@ -7974,7 +8008,9 @@ var HaExportAddon = class extends require_dist.BaseAddon {
|
|
|
7974
8008
|
type: "number",
|
|
7975
8009
|
key: "reconcileIntervalSec",
|
|
7976
8010
|
label: "Reconcile interval (s)",
|
|
8011
|
+
labelKey: "provider-homeassistant:globalSettings.s_ha-export-advanced.reconcileIntervalSec.label",
|
|
7977
8012
|
description: "Full re-announce and re-push cadence. Bus events are telemetry and may be dropped; this is the contract.",
|
|
8013
|
+
descriptionKey: "provider-homeassistant:globalSettings.s_ha-export-advanced.reconcileIntervalSec.description",
|
|
7978
8014
|
default: DEFAULT_CONFIG.reconcileIntervalSec
|
|
7979
8015
|
}]
|
|
7980
8016
|
}
|
|
@@ -8012,6 +8048,7 @@ var HaExportAddon = class extends require_dist.BaseAddon {
|
|
|
8012
8048
|
sections: [{
|
|
8013
8049
|
id: "ha-export",
|
|
8014
8050
|
title: "Home Assistant",
|
|
8051
|
+
titleKey: "provider-homeassistant:contribution.s_ha-export.title",
|
|
8015
8052
|
description: enabled.length > 0 ? "Each Home Assistant instance receives only the devices switched on for it." : "No Home Assistant instance is enabled for export. Turn one on in the Home Assistant Export addon settings.",
|
|
8016
8053
|
tab: "export",
|
|
8017
8054
|
columns: 1,
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { $ as oauthIntegrationCapability, C as buildAddonRouteProvider, Ft as EventCategory, I as deviceExportCapability, St as nodePin, a as COCO_TO_MACRO, bt as BaseAddon, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, jt as string, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema } from "../dist-
|
|
1
|
+
import { $ as oauthIntegrationCapability, C as buildAddonRouteProvider, Ft as EventCategory, I as deviceExportCapability, St as nodePin, a as COCO_TO_MACRO, bt as BaseAddon, c as FanDirectionSchema, i as CAMERA_SWITCH_ORDER, jt as string, l as HvacModeSchema, o as CameraSwitchIdSchema, p as addonRoutesCapability, t as AlarmArmModeSchema, u as MediaPlayerRepeatSchema } from "../dist-B9xf8_Ix.mjs";
|
|
2
2
|
import { createHmac, timingSafeEqual } from "node:crypto";
|
|
3
|
+
import "node:zlib";
|
|
4
|
+
import "node:fs";
|
|
5
|
+
import "node:path";
|
|
6
|
+
import "node:child_process";
|
|
3
7
|
/** The `BrokerInfo.kind` tag the Home Assistant provider stamps. */
|
|
4
8
|
var HA_BROKER_KIND = "home-assistant";
|
|
5
9
|
/**
|
|
@@ -4331,6 +4335,7 @@ async function call(slice, capName, make) {
|
|
|
4331
4335
|
}
|
|
4332
4336
|
return { ok: true };
|
|
4333
4337
|
}
|
|
4338
|
+
process.platform, process.env["SystemRoot"];
|
|
4334
4339
|
/**
|
|
4335
4340
|
* The ONE derivation of "a signed, expiring URL".
|
|
4336
4341
|
*
|
|
@@ -7937,12 +7942,14 @@ var HaExportAddon = class extends BaseAddon {
|
|
|
7937
7942
|
{
|
|
7938
7943
|
id: "ha-export-brokers",
|
|
7939
7944
|
title: "Home Assistant instances",
|
|
7945
|
+
titleKey: "provider-homeassistant:globalSettings.s_ha-export-brokers.title",
|
|
7940
7946
|
description: brokerFields.length > 0 ? "One switch per Home Assistant broker. An instance that is off receives nothing; the devices exported to it are remembered and resume when it is turned back on." : "No Home Assistant broker is registered yet. Add one under External systems → Brokers and it will appear here.",
|
|
7941
7947
|
columns: 1,
|
|
7942
7948
|
fields: brokerFields.length > 0 ? brokerFields : [{
|
|
7943
7949
|
type: "info",
|
|
7944
7950
|
key: "ha-export:__no-brokers",
|
|
7945
7951
|
label: "No brokers",
|
|
7952
|
+
labelKey: "provider-homeassistant:globalSettings.s_ha-export-brokers.ha-export___no-brokers.label",
|
|
7946
7953
|
content: "Register a Home Assistant broker to enable the export.",
|
|
7947
7954
|
variant: "warning"
|
|
7948
7955
|
}]
|
|
@@ -7950,18 +7957,22 @@ var HaExportAddon = class extends BaseAddon {
|
|
|
7950
7957
|
{
|
|
7951
7958
|
id: "ha-export-transport",
|
|
7952
7959
|
title: "Connection",
|
|
7960
|
+
titleKey: "provider-homeassistant:globalSettings.s_ha-export-transport.title",
|
|
7953
7961
|
columns: 1,
|
|
7954
7962
|
fields: [{
|
|
7955
7963
|
type: "text",
|
|
7956
7964
|
key: "publicBaseUrl",
|
|
7957
7965
|
label: "Hub URL Home Assistant can reach",
|
|
7966
|
+
labelKey: "provider-homeassistant:globalSettings.s_ha-export-transport.publicBaseUrl.label",
|
|
7958
7967
|
description: "Used to build the signed image links Home Assistant fetches. Leave empty to derive one from the network capabilities; a link that cannot be built is never sent.",
|
|
7968
|
+
descriptionKey: "provider-homeassistant:globalSettings.s_ha-export-transport.publicBaseUrl.description",
|
|
7959
7969
|
default: ""
|
|
7960
7970
|
}]
|
|
7961
7971
|
},
|
|
7962
7972
|
{
|
|
7963
7973
|
id: "ha-export-advanced",
|
|
7964
7974
|
title: "Advanced",
|
|
7975
|
+
titleKey: "provider-homeassistant:globalSettings.s_ha-export-advanced.title",
|
|
7965
7976
|
style: "accordion",
|
|
7966
7977
|
defaultCollapsed: true,
|
|
7967
7978
|
columns: 1,
|
|
@@ -7969,7 +7980,9 @@ var HaExportAddon = class extends BaseAddon {
|
|
|
7969
7980
|
type: "number",
|
|
7970
7981
|
key: "reconcileIntervalSec",
|
|
7971
7982
|
label: "Reconcile interval (s)",
|
|
7983
|
+
labelKey: "provider-homeassistant:globalSettings.s_ha-export-advanced.reconcileIntervalSec.label",
|
|
7972
7984
|
description: "Full re-announce and re-push cadence. Bus events are telemetry and may be dropped; this is the contract.",
|
|
7985
|
+
descriptionKey: "provider-homeassistant:globalSettings.s_ha-export-advanced.reconcileIntervalSec.description",
|
|
7973
7986
|
default: DEFAULT_CONFIG.reconcileIntervalSec
|
|
7974
7987
|
}]
|
|
7975
7988
|
}
|
|
@@ -8007,6 +8020,7 @@ var HaExportAddon = class extends BaseAddon {
|
|
|
8007
8020
|
sections: [{
|
|
8008
8021
|
id: "ha-export",
|
|
8009
8022
|
title: "Home Assistant",
|
|
8023
|
+
titleKey: "provider-homeassistant:contribution.s_ha-export.title",
|
|
8010
8024
|
description: enabled.length > 0 ? "Each Home Assistant instance receives only the devices switched on for it." : "No Home Assistant instance is enabled for export. Turn one on in the Home Assistant Export addon settings.",
|
|
8011
8025
|
tab: "export",
|
|
8012
8026
|
columns: 1,
|
package/i18n/en.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"globalSettings.s_ha-calendars-import.title": "Calendars to import",
|
|
3
|
+
"globalSettings.s_ha-calendars-import.description": "Pick which Home Assistant calendar entities feed System → Calendars. Nothing selected = no calendars imported.",
|
|
4
|
+
"globalSettings.s_ha-calendars-import.calendarIds.label": "Calendars",
|
|
5
|
+
"globalSettings.s_ha-calendars-import.calendarIds.description": "Discovered from connected HA brokers. Select at least one to import; leave empty to import none.",
|
|
6
|
+
"globalSettings.s_ha-broker.title": "Home Assistant broker",
|
|
7
|
+
"globalSettings.s_ha-broker.description": "Home Assistant brokers are managed in Connectivity → Brokers.",
|
|
8
|
+
"globalSettings.s_ha-broker.brokerHelp.label": "Brokers are managed separately",
|
|
9
|
+
"haBrokerSettings.s_ha-broker-credentials.title": "Home Assistant connection",
|
|
10
|
+
"haBrokerSettings.s_ha-broker-credentials.authKind.label": "Auth mode",
|
|
11
|
+
"haBrokerSettings.s_ha-broker-credentials.authKind.o_long-lived.label": "Long-lived token",
|
|
12
|
+
"haBrokerSettings.s_ha-broker-credentials.authKind.o_supervisor.label": "Supervisor (HA add-on)",
|
|
13
|
+
"haBrokerSettings.s_ha-broker-credentials.baseUrl.label": "HA base URL",
|
|
14
|
+
"haBrokerSettings.s_ha-broker-credentials.accessToken.label": "Long-lived access token",
|
|
15
|
+
"haBrokerSettings.s_ha-broker-credentials.supervisorToken.label": "Supervisor token",
|
|
16
|
+
"globalSettings.s_ha-export-brokers.title": "Home Assistant instances",
|
|
17
|
+
"globalSettings.s_ha-export-brokers.ha-export___no-brokers.label": "No brokers",
|
|
18
|
+
"globalSettings.s_ha-export-transport.title": "Connection",
|
|
19
|
+
"globalSettings.s_ha-export-transport.publicBaseUrl.label": "Hub URL Home Assistant can reach",
|
|
20
|
+
"globalSettings.s_ha-export-transport.publicBaseUrl.description": "Used to build the signed image links Home Assistant fetches. Leave empty to derive one from the network capabilities; a link that cannot be built is never sent.",
|
|
21
|
+
"globalSettings.s_ha-export-advanced.title": "Advanced",
|
|
22
|
+
"globalSettings.s_ha-export-advanced.reconcileIntervalSec.label": "Reconcile interval (s)",
|
|
23
|
+
"globalSettings.s_ha-export-advanced.reconcileIntervalSec.description": "Full re-announce and re-push cadence. Bus events are telemetry and may be dropped; this is the contract.",
|
|
24
|
+
"contribution.s_ha-export.title": "Home Assistant",
|
|
25
|
+
"haConfig.s_connection.title": "Home Assistant notify",
|
|
26
|
+
"haConfig.s_connection.service.label": "Notify service",
|
|
27
|
+
"haConfig.s_connection.service.description": "The Home Assistant notify service to call — the part after `notify.` (e.g. `mobile_app_pixel_7`). Use Discover to list available services.",
|
|
28
|
+
"haConfig.s_connection.brokerId.label": "Broker",
|
|
29
|
+
"haConfig.s_connection.brokerId.description": "Optional — the Home Assistant broker id to route through. Leave blank to use the only configured broker."
|
|
30
|
+
}
|
package/i18n/it.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"globalSettings.s_ha-calendars-import.title": "Calendari da importare",
|
|
3
|
+
"globalSettings.s_ha-calendars-import.description": "Scegli quali entità calendario di Home Assistant alimentano Sistema → Calendari. Nessuna selezione = nessun calendario importato.",
|
|
4
|
+
"globalSettings.s_ha-calendars-import.calendarIds.label": "Calendari",
|
|
5
|
+
"globalSettings.s_ha-calendars-import.calendarIds.description": "Rilevati dai broker HA collegati. Seleziona almeno un calendario da importare; lascia vuoto per non importarne nessuno.",
|
|
6
|
+
"globalSettings.s_ha-broker.title": "Broker Home Assistant",
|
|
7
|
+
"globalSettings.s_ha-broker.description": "I broker Home Assistant si gestiscono in Connettività → Broker.",
|
|
8
|
+
"globalSettings.s_ha-broker.brokerHelp.label": "I broker si gestiscono separatamente",
|
|
9
|
+
"haBrokerSettings.s_ha-broker-credentials.title": "Connessione a Home Assistant",
|
|
10
|
+
"haBrokerSettings.s_ha-broker-credentials.authKind.label": "Modalità di autenticazione",
|
|
11
|
+
"haBrokerSettings.s_ha-broker-credentials.authKind.o_long-lived.label": "Token a lunga durata",
|
|
12
|
+
"haBrokerSettings.s_ha-broker-credentials.authKind.o_supervisor.label": "Supervisor (add-on di HA)",
|
|
13
|
+
"haBrokerSettings.s_ha-broker-credentials.baseUrl.label": "URL base di HA",
|
|
14
|
+
"haBrokerSettings.s_ha-broker-credentials.accessToken.label": "Token di accesso a lunga durata",
|
|
15
|
+
"haBrokerSettings.s_ha-broker-credentials.supervisorToken.label": "Token del Supervisor",
|
|
16
|
+
"globalSettings.s_ha-export-brokers.title": "Istanze di Home Assistant",
|
|
17
|
+
"globalSettings.s_ha-export-brokers.ha-export___no-brokers.label": "Nessun broker",
|
|
18
|
+
"globalSettings.s_ha-export-transport.title": "Connessione",
|
|
19
|
+
"globalSettings.s_ha-export-transport.publicBaseUrl.label": "URL dell'hub raggiungibile da Home Assistant",
|
|
20
|
+
"globalSettings.s_ha-export-transport.publicBaseUrl.description": "Serve a costruire i link firmati alle immagini che Home Assistant scarica. Lascia vuoto per ricavarlo dalle capacità di rete; un link che non si può costruire non viene mai inviato.",
|
|
21
|
+
"globalSettings.s_ha-export-advanced.title": "Avanzate",
|
|
22
|
+
"globalSettings.s_ha-export-advanced.reconcileIntervalSec.label": "Intervallo di riconciliazione (s)",
|
|
23
|
+
"globalSettings.s_ha-export-advanced.reconcileIntervalSec.description": "Frequenza di ripubblicazione completa e di nuovo invio. Gli eventi del bus sono telemetria e possono andare persi: questo è il contratto.",
|
|
24
|
+
"contribution.s_ha-export.title": "Home Assistant",
|
|
25
|
+
"haConfig.s_connection.title": "Notifica Home Assistant",
|
|
26
|
+
"haConfig.s_connection.service.label": "Servizio di notifica",
|
|
27
|
+
"haConfig.s_connection.service.description": "Il servizio di notifica di Home Assistant da chiamare: la parte dopo `notify.` (ad es. `mobile_app_pixel_7`). Usa Rileva per elencare i servizi disponibili.",
|
|
28
|
+
"haConfig.s_connection.brokerId.label": "Broker",
|
|
29
|
+
"haConfig.s_connection.brokerId.description": "Facoltativo: l'id del broker Home Assistant da cui passare. Lascia vuoto per usare l'unico broker configurato."
|
|
30
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@camstack/addon-provider-homeassistant",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.172",
|
|
4
4
|
"description": "Home Assistant device provider addon for CamStack",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"camstack",
|
|
@@ -120,6 +120,7 @@
|
|
|
120
120
|
},
|
|
121
121
|
"files": [
|
|
122
122
|
"dist",
|
|
123
|
+
"i18n",
|
|
123
124
|
"assets"
|
|
124
125
|
],
|
|
125
126
|
"scripts": {
|