@camstack/addon-provider-homeassistant 1.1.10 → 1.1.12

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 CHANGED
@@ -4629,7 +4629,7 @@ function _instanceof(cls, params = {}) {
4629
4629
  return inst;
4630
4630
  }
4631
4631
  //#endregion
4632
- //#region ../types/dist/sleep-B3AOslwX.mjs
4632
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4633
4633
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4634
4634
  EventCategory["SystemBoot"] = "system.boot";
4635
4635
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6197,6 +6197,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6197
6197
  DeviceType["Switch"] = "switch";
6198
6198
  DeviceType["Sensor"] = "sensor";
6199
6199
  DeviceType["Thermostat"] = "thermostat";
6200
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6201
+ * `climate-control` cap surface with `Thermostat` but renders a
6202
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6203
+ * independent vertical/horizontal swing). Sources: native Gree, and
6204
+ * reusable by other AC integrations. */
6205
+ DeviceType["Climate"] = "climate";
6200
6206
  DeviceType["Button"] = "button";
6201
6207
  /** Generic stateless event emitter — carries a device's EXACT declared
6202
6208
  * event vocabulary verbatim (no normalization). Installed with the
@@ -8992,7 +8998,7 @@ var climateControlCapability = {
8992
8998
  scope: "device",
8993
8999
  deviceNative: true,
8994
9000
  mode: "singleton",
8995
- deviceTypes: [DeviceType.Thermostat],
9001
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
8996
9002
  methods: {
8997
9003
  setMode: method(object({
8998
9004
  deviceId: number().int().nonnegative(),
@@ -13636,10 +13642,30 @@ var deviceProviderCapability = {
13636
13642
  type: string()
13637
13643
  }))),
13638
13644
  supportsDiscovery: method(object({}), boolean()),
13639
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13645
+ /**
13646
+ * Run a network scan. `params` carries optional provider-specific scan
13647
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13648
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13649
+ * (provider uses its local-network default).
13650
+ */
13651
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13640
13652
  kind: "mutation",
13641
13653
  auth: "admin"
13642
13654
  }),
13655
+ /**
13656
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13657
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13658
+ * `null` when the provider takes no extra scan params — the generic
13659
+ * aggregated scan never renders this; the per-integration scan does.
13660
+ */
13661
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13662
+ /**
13663
+ * The DeviceType this provider creates via manual add (Camera for
13664
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13665
+ * provider does not support manual creation. Lets the Add-Device dialog
13666
+ * pick the right type instead of assuming Camera.
13667
+ */
13668
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13643
13669
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13644
13670
  kind: "mutation",
13645
13671
  auth: "admin"
@@ -13763,9 +13789,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13763
13789
  async supportsDiscovery() {
13764
13790
  return false;
13765
13791
  }
13766
- async discoverDevices() {
13792
+ async discoverDevices(_input) {
13767
13793
  return [];
13768
13794
  }
13795
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13796
+ * Null = no extra params. Override in providers that support scoped scans. */
13797
+ async getDiscoveryParamsSchema() {
13798
+ return null;
13799
+ }
13800
+ /**
13801
+ * The DeviceType this provider creates via manual add — derived from the
13802
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13803
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13804
+ */
13805
+ async getManualCreationType() {
13806
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13807
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13808
+ }
13769
13809
  async adoptDiscoveredDevice(_input) {
13770
13810
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13771
13811
  }
@@ -15676,7 +15716,10 @@ method(object({
15676
15716
  }), FieldProbeResultSchema, {
15677
15717
  kind: "mutation",
15678
15718
  auth: "admin"
15679
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15719
+ }), method(object({
15720
+ addonId: string(),
15721
+ integrationId: string()
15722
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15680
15723
  addonId: string(),
15681
15724
  integrationId: string()
15682
15725
  }), AdoptionStatusSchema, {
@@ -15691,7 +15734,24 @@ method(object({
15691
15734
  }), method(ResyncInputSchema, ResyncResultSchema, {
15692
15735
  kind: "mutation",
15693
15736
  auth: "admin"
15737
+ }), method(object({}), object({ providers: array(object({
15738
+ addonId: string(),
15739
+ label: string()
15740
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15741
+ addonId: string(),
15742
+ label: string(),
15743
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15744
+ error: string().nullable()
15745
+ })).readonly() }), {
15746
+ kind: "mutation",
15747
+ auth: "admin"
15694
15748
  }), method(object({
15749
+ addonId: string(),
15750
+ params: record(string(), unknown()).optional()
15751
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15752
+ kind: "mutation",
15753
+ auth: "admin"
15754
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15695
15755
  deviceId: number(),
15696
15756
  key: string(),
15697
15757
  value: unknown()
@@ -18432,6 +18492,17 @@ var AvailableIntegrationTypeSchema = object({
18432
18492
  iconUrl: string().nullable(),
18433
18493
  color: string(),
18434
18494
  instanceMode: string(),
18495
+ /**
18496
+ * Integration wizard `mode` (LOCKED MODEL): `standalone` (create
18497
+ * immediately then add devices, no config step/button), `account` (config
18498
+ * step), or `broker` (broker step). Derived server-side by
18499
+ * `getAvailableTypes` when the addon manifest omits an explicit `mode`.
18500
+ */
18501
+ mode: _enum([
18502
+ "standalone",
18503
+ "account",
18504
+ "broker"
18505
+ ]),
18435
18506
  discoveryMode: string(),
18436
18507
  /**
18437
18508
  * Which integration-marker cap the addon declared, so the wizard can
@@ -20892,6 +20963,12 @@ Object.freeze({
20892
20963
  addonId: null,
20893
20964
  access: "create"
20894
20965
  },
20966
+ "deviceManager.adoptionListCandidateFilters": {
20967
+ capName: "device-manager",
20968
+ capScope: "system",
20969
+ addonId: null,
20970
+ access: "view"
20971
+ },
20895
20972
  "deviceManager.adoptionListCandidates": {
20896
20973
  capName: "device-manager",
20897
20974
  capScope: "system",
@@ -20940,12 +21017,30 @@ Object.freeze({
20940
21017
  addonId: null,
20941
21018
  access: "create"
20942
21019
  },
21020
+ "deviceManager.discoverAllProviders": {
21021
+ capName: "device-manager",
21022
+ capScope: "system",
21023
+ addonId: null,
21024
+ access: "create"
21025
+ },
20943
21026
  "deviceManager.discoverDevices": {
20944
21027
  capName: "device-manager",
20945
21028
  capScope: "system",
20946
21029
  addonId: null,
20947
21030
  access: "create"
20948
21031
  },
21032
+ "deviceManager.discoverProvider": {
21033
+ capName: "device-manager",
21034
+ capScope: "system",
21035
+ addonId: null,
21036
+ access: "create"
21037
+ },
21038
+ "deviceManager.discoveryProviders": {
21039
+ capName: "device-manager",
21040
+ capScope: "system",
21041
+ addonId: null,
21042
+ access: "view"
21043
+ },
20949
21044
  "deviceManager.enable": {
20950
21045
  capName: "device-manager",
20951
21046
  capScope: "system",
@@ -21096,6 +21191,18 @@ Object.freeze({
21096
21191
  addonId: null,
21097
21192
  access: "create"
21098
21193
  },
21194
+ "deviceManager.providerCreationType": {
21195
+ capName: "device-manager",
21196
+ capScope: "system",
21197
+ addonId: null,
21198
+ access: "view"
21199
+ },
21200
+ "deviceManager.providerDiscoveryParamsSchema": {
21201
+ capName: "device-manager",
21202
+ capScope: "system",
21203
+ addonId: null,
21204
+ access: "view"
21205
+ },
21099
21206
  "deviceManager.registerDevice": {
21100
21207
  capName: "device-manager",
21101
21208
  capScope: "system",
@@ -21312,6 +21419,18 @@ Object.freeze({
21312
21419
  addonId: null,
21313
21420
  access: "view"
21314
21421
  },
21422
+ "deviceProvider.getDiscoveryParamsSchema": {
21423
+ capName: "device-provider",
21424
+ capScope: "system",
21425
+ addonId: null,
21426
+ access: "view"
21427
+ },
21428
+ "deviceProvider.getManualCreationType": {
21429
+ capName: "device-provider",
21430
+ capScope: "system",
21431
+ addonId: null,
21432
+ access: "view"
21433
+ },
21315
21434
  "deviceProvider.getStatus": {
21316
21435
  capName: "device-provider",
21317
21436
  capScope: "system",
@@ -30226,6 +30345,7 @@ var PARENT_TYPE_PRIORITY = [
30226
30345
  DeviceType.MediaPlayer,
30227
30346
  DeviceType.AlarmPanel,
30228
30347
  DeviceType.Thermostat,
30348
+ DeviceType.Climate,
30229
30349
  DeviceType.Humidifier,
30230
30350
  DeviceType.WaterHeater,
30231
30351
  DeviceType.Lock,
package/dist/addon.mjs CHANGED
@@ -4628,7 +4628,7 @@ function _instanceof(cls, params = {}) {
4628
4628
  return inst;
4629
4629
  }
4630
4630
  //#endregion
4631
- //#region ../types/dist/sleep-B3AOslwX.mjs
4631
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4632
4632
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4633
4633
  EventCategory["SystemBoot"] = "system.boot";
4634
4634
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6196,6 +6196,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6196
6196
  DeviceType["Switch"] = "switch";
6197
6197
  DeviceType["Sensor"] = "sensor";
6198
6198
  DeviceType["Thermostat"] = "thermostat";
6199
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6200
+ * `climate-control` cap surface with `Thermostat` but renders a
6201
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6202
+ * independent vertical/horizontal swing). Sources: native Gree, and
6203
+ * reusable by other AC integrations. */
6204
+ DeviceType["Climate"] = "climate";
6199
6205
  DeviceType["Button"] = "button";
6200
6206
  /** Generic stateless event emitter — carries a device's EXACT declared
6201
6207
  * event vocabulary verbatim (no normalization). Installed with the
@@ -8991,7 +8997,7 @@ var climateControlCapability = {
8991
8997
  scope: "device",
8992
8998
  deviceNative: true,
8993
8999
  mode: "singleton",
8994
- deviceTypes: [DeviceType.Thermostat],
9000
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
8995
9001
  methods: {
8996
9002
  setMode: method(object({
8997
9003
  deviceId: number().int().nonnegative(),
@@ -13635,10 +13641,30 @@ var deviceProviderCapability = {
13635
13641
  type: string()
13636
13642
  }))),
13637
13643
  supportsDiscovery: method(object({}), boolean()),
13638
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13644
+ /**
13645
+ * Run a network scan. `params` carries optional provider-specific scan
13646
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13647
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13648
+ * (provider uses its local-network default).
13649
+ */
13650
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13639
13651
  kind: "mutation",
13640
13652
  auth: "admin"
13641
13653
  }),
13654
+ /**
13655
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13656
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13657
+ * `null` when the provider takes no extra scan params — the generic
13658
+ * aggregated scan never renders this; the per-integration scan does.
13659
+ */
13660
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13661
+ /**
13662
+ * The DeviceType this provider creates via manual add (Camera for
13663
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13664
+ * provider does not support manual creation. Lets the Add-Device dialog
13665
+ * pick the right type instead of assuming Camera.
13666
+ */
13667
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13642
13668
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13643
13669
  kind: "mutation",
13644
13670
  auth: "admin"
@@ -13762,9 +13788,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13762
13788
  async supportsDiscovery() {
13763
13789
  return false;
13764
13790
  }
13765
- async discoverDevices() {
13791
+ async discoverDevices(_input) {
13766
13792
  return [];
13767
13793
  }
13794
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13795
+ * Null = no extra params. Override in providers that support scoped scans. */
13796
+ async getDiscoveryParamsSchema() {
13797
+ return null;
13798
+ }
13799
+ /**
13800
+ * The DeviceType this provider creates via manual add — derived from the
13801
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13802
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13803
+ */
13804
+ async getManualCreationType() {
13805
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13806
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13807
+ }
13768
13808
  async adoptDiscoveredDevice(_input) {
13769
13809
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13770
13810
  }
@@ -15675,7 +15715,10 @@ method(object({
15675
15715
  }), FieldProbeResultSchema, {
15676
15716
  kind: "mutation",
15677
15717
  auth: "admin"
15678
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15718
+ }), method(object({
15719
+ addonId: string(),
15720
+ integrationId: string()
15721
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15679
15722
  addonId: string(),
15680
15723
  integrationId: string()
15681
15724
  }), AdoptionStatusSchema, {
@@ -15690,7 +15733,24 @@ method(object({
15690
15733
  }), method(ResyncInputSchema, ResyncResultSchema, {
15691
15734
  kind: "mutation",
15692
15735
  auth: "admin"
15736
+ }), method(object({}), object({ providers: array(object({
15737
+ addonId: string(),
15738
+ label: string()
15739
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15740
+ addonId: string(),
15741
+ label: string(),
15742
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15743
+ error: string().nullable()
15744
+ })).readonly() }), {
15745
+ kind: "mutation",
15746
+ auth: "admin"
15693
15747
  }), method(object({
15748
+ addonId: string(),
15749
+ params: record(string(), unknown()).optional()
15750
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15751
+ kind: "mutation",
15752
+ auth: "admin"
15753
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15694
15754
  deviceId: number(),
15695
15755
  key: string(),
15696
15756
  value: unknown()
@@ -18431,6 +18491,17 @@ var AvailableIntegrationTypeSchema = object({
18431
18491
  iconUrl: string().nullable(),
18432
18492
  color: string(),
18433
18493
  instanceMode: string(),
18494
+ /**
18495
+ * Integration wizard `mode` (LOCKED MODEL): `standalone` (create
18496
+ * immediately then add devices, no config step/button), `account` (config
18497
+ * step), or `broker` (broker step). Derived server-side by
18498
+ * `getAvailableTypes` when the addon manifest omits an explicit `mode`.
18499
+ */
18500
+ mode: _enum([
18501
+ "standalone",
18502
+ "account",
18503
+ "broker"
18504
+ ]),
18434
18505
  discoveryMode: string(),
18435
18506
  /**
18436
18507
  * Which integration-marker cap the addon declared, so the wizard can
@@ -20891,6 +20962,12 @@ Object.freeze({
20891
20962
  addonId: null,
20892
20963
  access: "create"
20893
20964
  },
20965
+ "deviceManager.adoptionListCandidateFilters": {
20966
+ capName: "device-manager",
20967
+ capScope: "system",
20968
+ addonId: null,
20969
+ access: "view"
20970
+ },
20894
20971
  "deviceManager.adoptionListCandidates": {
20895
20972
  capName: "device-manager",
20896
20973
  capScope: "system",
@@ -20939,12 +21016,30 @@ Object.freeze({
20939
21016
  addonId: null,
20940
21017
  access: "create"
20941
21018
  },
21019
+ "deviceManager.discoverAllProviders": {
21020
+ capName: "device-manager",
21021
+ capScope: "system",
21022
+ addonId: null,
21023
+ access: "create"
21024
+ },
20942
21025
  "deviceManager.discoverDevices": {
20943
21026
  capName: "device-manager",
20944
21027
  capScope: "system",
20945
21028
  addonId: null,
20946
21029
  access: "create"
20947
21030
  },
21031
+ "deviceManager.discoverProvider": {
21032
+ capName: "device-manager",
21033
+ capScope: "system",
21034
+ addonId: null,
21035
+ access: "create"
21036
+ },
21037
+ "deviceManager.discoveryProviders": {
21038
+ capName: "device-manager",
21039
+ capScope: "system",
21040
+ addonId: null,
21041
+ access: "view"
21042
+ },
20948
21043
  "deviceManager.enable": {
20949
21044
  capName: "device-manager",
20950
21045
  capScope: "system",
@@ -21095,6 +21190,18 @@ Object.freeze({
21095
21190
  addonId: null,
21096
21191
  access: "create"
21097
21192
  },
21193
+ "deviceManager.providerCreationType": {
21194
+ capName: "device-manager",
21195
+ capScope: "system",
21196
+ addonId: null,
21197
+ access: "view"
21198
+ },
21199
+ "deviceManager.providerDiscoveryParamsSchema": {
21200
+ capName: "device-manager",
21201
+ capScope: "system",
21202
+ addonId: null,
21203
+ access: "view"
21204
+ },
21098
21205
  "deviceManager.registerDevice": {
21099
21206
  capName: "device-manager",
21100
21207
  capScope: "system",
@@ -21311,6 +21418,18 @@ Object.freeze({
21311
21418
  addonId: null,
21312
21419
  access: "view"
21313
21420
  },
21421
+ "deviceProvider.getDiscoveryParamsSchema": {
21422
+ capName: "device-provider",
21423
+ capScope: "system",
21424
+ addonId: null,
21425
+ access: "view"
21426
+ },
21427
+ "deviceProvider.getManualCreationType": {
21428
+ capName: "device-provider",
21429
+ capScope: "system",
21430
+ addonId: null,
21431
+ access: "view"
21432
+ },
21314
21433
  "deviceProvider.getStatus": {
21315
21434
  capName: "device-provider",
21316
21435
  capScope: "system",
@@ -30225,6 +30344,7 @@ var PARENT_TYPE_PRIORITY = [
30225
30344
  DeviceType.MediaPlayer,
30226
30345
  DeviceType.AlarmPanel,
30227
30346
  DeviceType.Thermostat,
30347
+ DeviceType.Climate,
30228
30348
  DeviceType.Humidifier,
30229
30349
  DeviceType.WaterHeater,
30230
30350
  DeviceType.Lock,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.1.10",
3
+ "version": "1.1.12",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",