@camstack/addon-provider-homeassistant 1.2.171 → 1.2.173
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 +47 -9
- package/dist/addon.mjs +47 -9
- package/dist/{dist-DgmndKq0.mjs → dist-CSIrSsu7.mjs} +21859 -1708
- package/dist/{dist-C6CIOXDB.js → dist-DTt9hwTQ.js} +21859 -1708
- package/dist/ha-export/ha-export.addon.js +10 -1
- package/dist/ha-export/ha-export.addon.mjs +10 -1
- package/i18n/en.json +30 -0
- package/i18n/it.json +30 -0
- package/package.json +2 -1
package/dist/addon.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const require_dist = require("./dist-
|
|
2
|
+
const require_dist = require("./dist-DTt9hwTQ.js");
|
|
3
3
|
let node_crypto = require("node:crypto");
|
|
4
4
|
let node_zlib = require("node:zlib");
|
|
5
5
|
//#region src/ha-admin-link.ts
|
|
@@ -1592,6 +1592,7 @@ var COLD_START$15 = {
|
|
|
1592
1592
|
* - `target_temp_high` / `target_temp_low` → `targetHigh` / `targetLow`
|
|
1593
1593
|
* - `target_humidity` → `targetHumidity`
|
|
1594
1594
|
* - `current_temperature` / `current_humidity` → read-only
|
|
1595
|
+
* - `min_temp` / `max_temp` / `target_temp_step` → setpoint bounds
|
|
1595
1596
|
*
|
|
1596
1597
|
* Mutations route to:
|
|
1597
1598
|
* - `climate.set_hvac_mode({ hvac_mode })`
|
|
@@ -1691,6 +1692,9 @@ function climateSliceFromState(state) {
|
|
|
1691
1692
|
currentTemp: readNumberAttr$5(attrs, "current_temperature"),
|
|
1692
1693
|
currentHumidity: readNumberAttr$5(attrs, "current_humidity"),
|
|
1693
1694
|
...readSwing(attrs),
|
|
1695
|
+
minTemp: readNumberAttr$5(attrs, "min_temp"),
|
|
1696
|
+
maxTemp: readNumberAttr$5(attrs, "max_temp"),
|
|
1697
|
+
tempStep: readNumberAttr$5(attrs, "target_temp_step"),
|
|
1694
1698
|
lastFetchedAt
|
|
1695
1699
|
};
|
|
1696
1700
|
}
|
|
@@ -5744,18 +5748,22 @@ var HaBrokerRegistry = class {
|
|
|
5744
5748
|
var haBrokerSettingsSchema = { sections: [{
|
|
5745
5749
|
id: "ha-broker-credentials",
|
|
5746
5750
|
title: "Home Assistant connection",
|
|
5751
|
+
titleKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.title",
|
|
5747
5752
|
columns: 1,
|
|
5748
5753
|
fields: [
|
|
5749
5754
|
{
|
|
5750
5755
|
type: "select",
|
|
5751
5756
|
key: "authKind",
|
|
5752
5757
|
label: "Auth mode",
|
|
5758
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.authKind.label",
|
|
5753
5759
|
options: [{
|
|
5754
5760
|
value: "long-lived",
|
|
5755
|
-
label: "Long-lived token"
|
|
5761
|
+
label: "Long-lived token",
|
|
5762
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.authKind.o_long-lived.label"
|
|
5756
5763
|
}, {
|
|
5757
5764
|
value: "supervisor",
|
|
5758
|
-
label: "Supervisor (HA add-on)"
|
|
5765
|
+
label: "Supervisor (HA add-on)",
|
|
5766
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.authKind.o_supervisor.label"
|
|
5759
5767
|
}],
|
|
5760
5768
|
default: "long-lived"
|
|
5761
5769
|
},
|
|
@@ -5763,6 +5771,7 @@ var haBrokerSettingsSchema = { sections: [{
|
|
|
5763
5771
|
type: "text",
|
|
5764
5772
|
key: "baseUrl",
|
|
5765
5773
|
label: "HA base URL",
|
|
5774
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.baseUrl.label",
|
|
5766
5775
|
placeholder: "https://hassio.local:8123",
|
|
5767
5776
|
showWhen: {
|
|
5768
5777
|
field: "authKind",
|
|
@@ -5773,6 +5782,7 @@ var haBrokerSettingsSchema = { sections: [{
|
|
|
5773
5782
|
type: "password",
|
|
5774
5783
|
key: "accessToken",
|
|
5775
5784
|
label: "Long-lived access token",
|
|
5785
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.accessToken.label",
|
|
5776
5786
|
showToggle: true,
|
|
5777
5787
|
showWhen: {
|
|
5778
5788
|
field: "authKind",
|
|
@@ -5783,6 +5793,7 @@ var haBrokerSettingsSchema = { sections: [{
|
|
|
5783
5793
|
type: "password",
|
|
5784
5794
|
key: "supervisorToken",
|
|
5785
5795
|
label: "Supervisor token",
|
|
5796
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.supervisorToken.label",
|
|
5786
5797
|
showToggle: true,
|
|
5787
5798
|
showWhen: {
|
|
5788
5799
|
field: "authKind",
|
|
@@ -5798,7 +5809,7 @@ function mapHaEntityToCamStack(input) {
|
|
|
5798
5809
|
switch (domain) {
|
|
5799
5810
|
case "switch": return {
|
|
5800
5811
|
deviceType: require_dist.DeviceType.Switch,
|
|
5801
|
-
role: null,
|
|
5812
|
+
role: deviceClass === "outlet" ? require_dist.DeviceRole.Outlet : null,
|
|
5802
5813
|
capabilities: ["switch"]
|
|
5803
5814
|
};
|
|
5804
5815
|
case "input_boolean": return {
|
|
@@ -5935,18 +5946,33 @@ function mapLock(attributes) {
|
|
|
5935
5946
|
features
|
|
5936
5947
|
};
|
|
5937
5948
|
}
|
|
5938
|
-
function mapCover(attributes,
|
|
5949
|
+
function mapCover(attributes, deviceClass) {
|
|
5939
5950
|
const features = [];
|
|
5940
5951
|
const sf = readNumericAttr(attributes, "supported_features");
|
|
5941
5952
|
if (sf !== null && (sf & 4) !== 0) features.push(require_dist.DeviceFeature.CoverPositionable);
|
|
5942
5953
|
if (sf !== null && (sf & 128) !== 0) features.push(require_dist.DeviceFeature.CoverTilt);
|
|
5943
5954
|
return {
|
|
5944
5955
|
deviceType: require_dist.DeviceType.Cover,
|
|
5945
|
-
role:
|
|
5956
|
+
role: coverRoleFor(deviceClass),
|
|
5946
5957
|
capabilities: ["cover"],
|
|
5947
5958
|
features
|
|
5948
5959
|
};
|
|
5949
5960
|
}
|
|
5961
|
+
/** The cover KIND for an HA cover `device_class`; null for none / `damper`. */
|
|
5962
|
+
function coverRoleFor(deviceClass) {
|
|
5963
|
+
switch (deviceClass) {
|
|
5964
|
+
case "blind":
|
|
5965
|
+
case "shade": return require_dist.DeviceRole.CoverBlind;
|
|
5966
|
+
case "shutter": return require_dist.DeviceRole.CoverShutter;
|
|
5967
|
+
case "awning": return require_dist.DeviceRole.CoverAwning;
|
|
5968
|
+
case "curtain": return require_dist.DeviceRole.CoverCurtain;
|
|
5969
|
+
case "garage": return require_dist.DeviceRole.CoverGarage;
|
|
5970
|
+
case "gate": return require_dist.DeviceRole.CoverGate;
|
|
5971
|
+
case "door": return require_dist.DeviceRole.CoverDoor;
|
|
5972
|
+
case "window": return require_dist.DeviceRole.CoverWindow;
|
|
5973
|
+
default: return null;
|
|
5974
|
+
}
|
|
5975
|
+
}
|
|
5950
5976
|
function mapValve(attributes, _deviceClass) {
|
|
5951
5977
|
const features = [];
|
|
5952
5978
|
const sf = readNumericAttr(attributes, "supported_features");
|
|
@@ -6796,18 +6822,23 @@ function haConfigSchema() {
|
|
|
6796
6822
|
return { sections: [{
|
|
6797
6823
|
id: "connection",
|
|
6798
6824
|
title: "Home Assistant notify",
|
|
6825
|
+
titleKey: "provider-homeassistant:haConfig.s_connection.title",
|
|
6799
6826
|
fields: [{
|
|
6800
6827
|
type: "text",
|
|
6801
6828
|
key: "service",
|
|
6802
6829
|
label: "Notify service",
|
|
6830
|
+
labelKey: "provider-homeassistant:haConfig.s_connection.service.label",
|
|
6803
6831
|
required: true,
|
|
6804
6832
|
placeholder: "mobile_app_pixel_7",
|
|
6805
|
-
description: "The Home Assistant notify service to call — the part after `notify.` (e.g. `mobile_app_pixel_7`). Use Discover to list available services."
|
|
6833
|
+
description: "The Home Assistant notify service to call — the part after `notify.` (e.g. `mobile_app_pixel_7`). Use Discover to list available services.",
|
|
6834
|
+
descriptionKey: "provider-homeassistant:haConfig.s_connection.service.description"
|
|
6806
6835
|
}, {
|
|
6807
6836
|
type: "text",
|
|
6808
6837
|
key: "brokerId",
|
|
6809
6838
|
label: "Broker",
|
|
6810
|
-
|
|
6839
|
+
labelKey: "provider-homeassistant:haConfig.s_connection.brokerId.label",
|
|
6840
|
+
description: "Optional — the Home Assistant broker id to route through. Leave blank to use the only configured broker.",
|
|
6841
|
+
descriptionKey: "provider-homeassistant:haConfig.s_connection.brokerId.description"
|
|
6811
6842
|
}]
|
|
6812
6843
|
}] };
|
|
6813
6844
|
}
|
|
@@ -8103,26 +8134,33 @@ var HaProviderAddon = class HaProviderAddon extends require_dist.BaseDeviceProvi
|
|
|
8103
8134
|
if (cap === "calendar-source") return this.schema({ sections: [{
|
|
8104
8135
|
id: "ha-calendars-import",
|
|
8105
8136
|
title: "Calendars to import",
|
|
8137
|
+
titleKey: "provider-homeassistant:globalSettings.s_ha-calendars-import.title",
|
|
8106
8138
|
description: "Pick which Home Assistant calendar entities feed System → Calendars. Nothing selected = no calendars imported.",
|
|
8139
|
+
descriptionKey: "provider-homeassistant:globalSettings.s_ha-calendars-import.description",
|
|
8107
8140
|
columns: 1,
|
|
8108
8141
|
fields: [{
|
|
8109
8142
|
type: "multiselect",
|
|
8110
8143
|
key: "calendarIds",
|
|
8111
8144
|
label: "Calendars",
|
|
8145
|
+
labelKey: "provider-homeassistant:globalSettings.s_ha-calendars-import.calendarIds.label",
|
|
8112
8146
|
options: [],
|
|
8113
8147
|
optionsFrom: "_calendarCatalog",
|
|
8114
|
-
description: "Discovered from connected HA brokers. Select at least one to import; leave empty to import none."
|
|
8148
|
+
description: "Discovered from connected HA brokers. Select at least one to import; leave empty to import none.",
|
|
8149
|
+
descriptionKey: "provider-homeassistant:globalSettings.s_ha-calendars-import.calendarIds.description"
|
|
8115
8150
|
}]
|
|
8116
8151
|
}] });
|
|
8117
8152
|
return this.schema({ sections: [{
|
|
8118
8153
|
id: "ha-broker",
|
|
8119
8154
|
title: "Home Assistant broker",
|
|
8155
|
+
titleKey: "provider-homeassistant:globalSettings.s_ha-broker.title",
|
|
8120
8156
|
description: "Home Assistant brokers are managed in Connectivity → Brokers.",
|
|
8157
|
+
descriptionKey: "provider-homeassistant:globalSettings.s_ha-broker.description",
|
|
8121
8158
|
columns: 1,
|
|
8122
8159
|
fields: [{
|
|
8123
8160
|
type: "info",
|
|
8124
8161
|
key: "brokerHelp",
|
|
8125
8162
|
label: "Brokers are managed separately",
|
|
8163
|
+
labelKey: "provider-homeassistant:globalSettings.s_ha-broker.brokerHelp.label",
|
|
8126
8164
|
content: "This integration links to a Home Assistant broker. Add, edit, or remove brokers from Connectivity → Brokers. The integration only stores a reference to its broker — no credentials are kept here."
|
|
8127
8165
|
}]
|
|
8128
8166
|
}] });
|
package/dist/addon.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as connectivityCapability, At as record, B as floodCapability, C as buildAddonRouteProvider, Ct as _enum, D as carbonMonoxideCapability, Dt as literal, E as calendarSourceCapability, Et as discriminatedUnion, F as deviceAdoptionCapability, Ft as EventCategory, G as lawnMowerControlCapability, H as humidifierCapability, J as motionCapability, K as lockControlCapability, L as enumSensorCapability, M as controlCapability, Mt as union, N as coverCapability, Nt as unknown, O as climateControlCapability, Ot as number, P as deviceAdminLinkCapability, Pt as url, Q as numericSensorCapability, R as eventEmitterCapability, S as brokerCapability, T as buttonCapability, Tt as boolean, U as humiditySensorCapability, V as gasCapability, W as imageCapability, X as notificationOutputCapability, Y as normalizeUnit, Z as notifierCapability, _ as automationControlCapability, _t as DeviceRole, at as scriptRunnerCapability, b as binaryCapability, ct as tamperCapability, d as TargetSchema, dt as vacuumControlCapability, et as parseAdminBase, f as accessoriesCapability, ft as valveCapability, g as ambientLightSensorCapability, gt as DeviceFeature, h as alarmPanelCapability, ht as weatherCapability, it as pressureSensorCapability, j as contactCapability, jt as string, k as colorCapability, kt as object, lt as temperatureSensorCapability, m as airQualitySensorCapability, mt as waterHeaterCapability, n as BaseDevice, nt as prepareNotification, ot as smokeCapability, p as addonRoutesCapability, pt as vibrationCapability, q as mediaPlayerCapability, r as BaseDeviceProvider, rt as presenceCapability, s as EnumSensorDateTimeFormatSchema, st as switchCapability, tt as powerMeterCapability, ut as updateCapability, v as batteryCapability, vt as DeviceType, w as buildDeviceAdminUrl, wt as array, x as brightnessCapability, xt as createEvent, y as bestLocationMatch, yt as errMsg, z as fanControlCapability } from "./dist-
|
|
1
|
+
import { A as connectivityCapability, At as record, B as floodCapability, C as buildAddonRouteProvider, Ct as _enum, D as carbonMonoxideCapability, Dt as literal, E as calendarSourceCapability, Et as discriminatedUnion, F as deviceAdoptionCapability, Ft as EventCategory, G as lawnMowerControlCapability, H as humidifierCapability, J as motionCapability, K as lockControlCapability, L as enumSensorCapability, M as controlCapability, Mt as union, N as coverCapability, Nt as unknown, O as climateControlCapability, Ot as number, P as deviceAdminLinkCapability, Pt as url, Q as numericSensorCapability, R as eventEmitterCapability, S as brokerCapability, T as buttonCapability, Tt as boolean, U as humiditySensorCapability, V as gasCapability, W as imageCapability, X as notificationOutputCapability, Y as normalizeUnit, Z as notifierCapability, _ as automationControlCapability, _t as DeviceRole, at as scriptRunnerCapability, b as binaryCapability, ct as tamperCapability, d as TargetSchema, dt as vacuumControlCapability, et as parseAdminBase, f as accessoriesCapability, ft as valveCapability, g as ambientLightSensorCapability, gt as DeviceFeature, h as alarmPanelCapability, ht as weatherCapability, it as pressureSensorCapability, j as contactCapability, jt as string, k as colorCapability, kt as object, lt as temperatureSensorCapability, m as airQualitySensorCapability, mt as waterHeaterCapability, n as BaseDevice, nt as prepareNotification, ot as smokeCapability, p as addonRoutesCapability, pt as vibrationCapability, q as mediaPlayerCapability, r as BaseDeviceProvider, rt as presenceCapability, s as EnumSensorDateTimeFormatSchema, st as switchCapability, tt as powerMeterCapability, ut as updateCapability, v as batteryCapability, vt as DeviceType, w as buildDeviceAdminUrl, wt as array, x as brightnessCapability, xt as createEvent, y as bestLocationMatch, yt as errMsg, z as fanControlCapability } from "./dist-CSIrSsu7.mjs";
|
|
2
2
|
import { randomUUID } from "node:crypto";
|
|
3
3
|
import { brotliCompressSync, deflateSync, gzipSync } from "node:zlib";
|
|
4
4
|
//#region src/ha-admin-link.ts
|
|
@@ -1591,6 +1591,7 @@ var COLD_START$15 = {
|
|
|
1591
1591
|
* - `target_temp_high` / `target_temp_low` → `targetHigh` / `targetLow`
|
|
1592
1592
|
* - `target_humidity` → `targetHumidity`
|
|
1593
1593
|
* - `current_temperature` / `current_humidity` → read-only
|
|
1594
|
+
* - `min_temp` / `max_temp` / `target_temp_step` → setpoint bounds
|
|
1594
1595
|
*
|
|
1595
1596
|
* Mutations route to:
|
|
1596
1597
|
* - `climate.set_hvac_mode({ hvac_mode })`
|
|
@@ -1690,6 +1691,9 @@ function climateSliceFromState(state) {
|
|
|
1690
1691
|
currentTemp: readNumberAttr$5(attrs, "current_temperature"),
|
|
1691
1692
|
currentHumidity: readNumberAttr$5(attrs, "current_humidity"),
|
|
1692
1693
|
...readSwing(attrs),
|
|
1694
|
+
minTemp: readNumberAttr$5(attrs, "min_temp"),
|
|
1695
|
+
maxTemp: readNumberAttr$5(attrs, "max_temp"),
|
|
1696
|
+
tempStep: readNumberAttr$5(attrs, "target_temp_step"),
|
|
1693
1697
|
lastFetchedAt
|
|
1694
1698
|
};
|
|
1695
1699
|
}
|
|
@@ -5743,18 +5747,22 @@ var HaBrokerRegistry = class {
|
|
|
5743
5747
|
var haBrokerSettingsSchema = { sections: [{
|
|
5744
5748
|
id: "ha-broker-credentials",
|
|
5745
5749
|
title: "Home Assistant connection",
|
|
5750
|
+
titleKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.title",
|
|
5746
5751
|
columns: 1,
|
|
5747
5752
|
fields: [
|
|
5748
5753
|
{
|
|
5749
5754
|
type: "select",
|
|
5750
5755
|
key: "authKind",
|
|
5751
5756
|
label: "Auth mode",
|
|
5757
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.authKind.label",
|
|
5752
5758
|
options: [{
|
|
5753
5759
|
value: "long-lived",
|
|
5754
|
-
label: "Long-lived token"
|
|
5760
|
+
label: "Long-lived token",
|
|
5761
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.authKind.o_long-lived.label"
|
|
5755
5762
|
}, {
|
|
5756
5763
|
value: "supervisor",
|
|
5757
|
-
label: "Supervisor (HA add-on)"
|
|
5764
|
+
label: "Supervisor (HA add-on)",
|
|
5765
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.authKind.o_supervisor.label"
|
|
5758
5766
|
}],
|
|
5759
5767
|
default: "long-lived"
|
|
5760
5768
|
},
|
|
@@ -5762,6 +5770,7 @@ var haBrokerSettingsSchema = { sections: [{
|
|
|
5762
5770
|
type: "text",
|
|
5763
5771
|
key: "baseUrl",
|
|
5764
5772
|
label: "HA base URL",
|
|
5773
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.baseUrl.label",
|
|
5765
5774
|
placeholder: "https://hassio.local:8123",
|
|
5766
5775
|
showWhen: {
|
|
5767
5776
|
field: "authKind",
|
|
@@ -5772,6 +5781,7 @@ var haBrokerSettingsSchema = { sections: [{
|
|
|
5772
5781
|
type: "password",
|
|
5773
5782
|
key: "accessToken",
|
|
5774
5783
|
label: "Long-lived access token",
|
|
5784
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.accessToken.label",
|
|
5775
5785
|
showToggle: true,
|
|
5776
5786
|
showWhen: {
|
|
5777
5787
|
field: "authKind",
|
|
@@ -5782,6 +5792,7 @@ var haBrokerSettingsSchema = { sections: [{
|
|
|
5782
5792
|
type: "password",
|
|
5783
5793
|
key: "supervisorToken",
|
|
5784
5794
|
label: "Supervisor token",
|
|
5795
|
+
labelKey: "provider-homeassistant:haBrokerSettings.s_ha-broker-credentials.supervisorToken.label",
|
|
5785
5796
|
showToggle: true,
|
|
5786
5797
|
showWhen: {
|
|
5787
5798
|
field: "authKind",
|
|
@@ -5797,7 +5808,7 @@ function mapHaEntityToCamStack(input) {
|
|
|
5797
5808
|
switch (domain) {
|
|
5798
5809
|
case "switch": return {
|
|
5799
5810
|
deviceType: DeviceType.Switch,
|
|
5800
|
-
role: null,
|
|
5811
|
+
role: deviceClass === "outlet" ? DeviceRole.Outlet : null,
|
|
5801
5812
|
capabilities: ["switch"]
|
|
5802
5813
|
};
|
|
5803
5814
|
case "input_boolean": return {
|
|
@@ -5934,18 +5945,33 @@ function mapLock(attributes) {
|
|
|
5934
5945
|
features
|
|
5935
5946
|
};
|
|
5936
5947
|
}
|
|
5937
|
-
function mapCover(attributes,
|
|
5948
|
+
function mapCover(attributes, deviceClass) {
|
|
5938
5949
|
const features = [];
|
|
5939
5950
|
const sf = readNumericAttr(attributes, "supported_features");
|
|
5940
5951
|
if (sf !== null && (sf & 4) !== 0) features.push(DeviceFeature.CoverPositionable);
|
|
5941
5952
|
if (sf !== null && (sf & 128) !== 0) features.push(DeviceFeature.CoverTilt);
|
|
5942
5953
|
return {
|
|
5943
5954
|
deviceType: DeviceType.Cover,
|
|
5944
|
-
role:
|
|
5955
|
+
role: coverRoleFor(deviceClass),
|
|
5945
5956
|
capabilities: ["cover"],
|
|
5946
5957
|
features
|
|
5947
5958
|
};
|
|
5948
5959
|
}
|
|
5960
|
+
/** The cover KIND for an HA cover `device_class`; null for none / `damper`. */
|
|
5961
|
+
function coverRoleFor(deviceClass) {
|
|
5962
|
+
switch (deviceClass) {
|
|
5963
|
+
case "blind":
|
|
5964
|
+
case "shade": return DeviceRole.CoverBlind;
|
|
5965
|
+
case "shutter": return DeviceRole.CoverShutter;
|
|
5966
|
+
case "awning": return DeviceRole.CoverAwning;
|
|
5967
|
+
case "curtain": return DeviceRole.CoverCurtain;
|
|
5968
|
+
case "garage": return DeviceRole.CoverGarage;
|
|
5969
|
+
case "gate": return DeviceRole.CoverGate;
|
|
5970
|
+
case "door": return DeviceRole.CoverDoor;
|
|
5971
|
+
case "window": return DeviceRole.CoverWindow;
|
|
5972
|
+
default: return null;
|
|
5973
|
+
}
|
|
5974
|
+
}
|
|
5949
5975
|
function mapValve(attributes, _deviceClass) {
|
|
5950
5976
|
const features = [];
|
|
5951
5977
|
const sf = readNumericAttr(attributes, "supported_features");
|
|
@@ -6795,18 +6821,23 @@ function haConfigSchema() {
|
|
|
6795
6821
|
return { sections: [{
|
|
6796
6822
|
id: "connection",
|
|
6797
6823
|
title: "Home Assistant notify",
|
|
6824
|
+
titleKey: "provider-homeassistant:haConfig.s_connection.title",
|
|
6798
6825
|
fields: [{
|
|
6799
6826
|
type: "text",
|
|
6800
6827
|
key: "service",
|
|
6801
6828
|
label: "Notify service",
|
|
6829
|
+
labelKey: "provider-homeassistant:haConfig.s_connection.service.label",
|
|
6802
6830
|
required: true,
|
|
6803
6831
|
placeholder: "mobile_app_pixel_7",
|
|
6804
|
-
description: "The Home Assistant notify service to call — the part after `notify.` (e.g. `mobile_app_pixel_7`). Use Discover to list available services."
|
|
6832
|
+
description: "The Home Assistant notify service to call — the part after `notify.` (e.g. `mobile_app_pixel_7`). Use Discover to list available services.",
|
|
6833
|
+
descriptionKey: "provider-homeassistant:haConfig.s_connection.service.description"
|
|
6805
6834
|
}, {
|
|
6806
6835
|
type: "text",
|
|
6807
6836
|
key: "brokerId",
|
|
6808
6837
|
label: "Broker",
|
|
6809
|
-
|
|
6838
|
+
labelKey: "provider-homeassistant:haConfig.s_connection.brokerId.label",
|
|
6839
|
+
description: "Optional — the Home Assistant broker id to route through. Leave blank to use the only configured broker.",
|
|
6840
|
+
descriptionKey: "provider-homeassistant:haConfig.s_connection.brokerId.description"
|
|
6810
6841
|
}]
|
|
6811
6842
|
}] };
|
|
6812
6843
|
}
|
|
@@ -8102,26 +8133,33 @@ var HaProviderAddon = class HaProviderAddon extends BaseDeviceProvider {
|
|
|
8102
8133
|
if (cap === "calendar-source") return this.schema({ sections: [{
|
|
8103
8134
|
id: "ha-calendars-import",
|
|
8104
8135
|
title: "Calendars to import",
|
|
8136
|
+
titleKey: "provider-homeassistant:globalSettings.s_ha-calendars-import.title",
|
|
8105
8137
|
description: "Pick which Home Assistant calendar entities feed System → Calendars. Nothing selected = no calendars imported.",
|
|
8138
|
+
descriptionKey: "provider-homeassistant:globalSettings.s_ha-calendars-import.description",
|
|
8106
8139
|
columns: 1,
|
|
8107
8140
|
fields: [{
|
|
8108
8141
|
type: "multiselect",
|
|
8109
8142
|
key: "calendarIds",
|
|
8110
8143
|
label: "Calendars",
|
|
8144
|
+
labelKey: "provider-homeassistant:globalSettings.s_ha-calendars-import.calendarIds.label",
|
|
8111
8145
|
options: [],
|
|
8112
8146
|
optionsFrom: "_calendarCatalog",
|
|
8113
|
-
description: "Discovered from connected HA brokers. Select at least one to import; leave empty to import none."
|
|
8147
|
+
description: "Discovered from connected HA brokers. Select at least one to import; leave empty to import none.",
|
|
8148
|
+
descriptionKey: "provider-homeassistant:globalSettings.s_ha-calendars-import.calendarIds.description"
|
|
8114
8149
|
}]
|
|
8115
8150
|
}] });
|
|
8116
8151
|
return this.schema({ sections: [{
|
|
8117
8152
|
id: "ha-broker",
|
|
8118
8153
|
title: "Home Assistant broker",
|
|
8154
|
+
titleKey: "provider-homeassistant:globalSettings.s_ha-broker.title",
|
|
8119
8155
|
description: "Home Assistant brokers are managed in Connectivity → Brokers.",
|
|
8156
|
+
descriptionKey: "provider-homeassistant:globalSettings.s_ha-broker.description",
|
|
8120
8157
|
columns: 1,
|
|
8121
8158
|
fields: [{
|
|
8122
8159
|
type: "info",
|
|
8123
8160
|
key: "brokerHelp",
|
|
8124
8161
|
label: "Brokers are managed separately",
|
|
8162
|
+
labelKey: "provider-homeassistant:globalSettings.s_ha-broker.brokerHelp.label",
|
|
8125
8163
|
content: "This integration links to a Home Assistant broker. Add, edit, or remove brokers from Connectivity → Brokers. The integration only stores a reference to its broker — no credentials are kept here."
|
|
8126
8164
|
}]
|
|
8127
8165
|
}] });
|