@camstack/addon-provider-homematic 1.1.10 → 1.1.11

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
@@ -4651,7 +4651,7 @@ function preprocess(fn, schema) {
4651
4651
  });
4652
4652
  }
4653
4653
  //#endregion
4654
- //#region ../types/dist/sleep-B3AOslwX.mjs
4654
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4655
4655
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4656
4656
  EventCategory["SystemBoot"] = "system.boot";
4657
4657
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6219,6 +6219,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6219
6219
  DeviceType["Switch"] = "switch";
6220
6220
  DeviceType["Sensor"] = "sensor";
6221
6221
  DeviceType["Thermostat"] = "thermostat";
6222
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6223
+ * `climate-control` cap surface with `Thermostat` but renders a
6224
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6225
+ * independent vertical/horizontal swing). Sources: native Gree, and
6226
+ * reusable by other AC integrations. */
6227
+ DeviceType["Climate"] = "climate";
6222
6228
  DeviceType["Button"] = "button";
6223
6229
  /** Generic stateless event emitter — carries a device's EXACT declared
6224
6230
  * event vocabulary verbatim (no normalization). Installed with the
@@ -9014,7 +9020,7 @@ var climateControlCapability = {
9014
9020
  scope: "device",
9015
9021
  deviceNative: true,
9016
9022
  mode: "singleton",
9017
- deviceTypes: [DeviceType.Thermostat],
9023
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
9018
9024
  methods: {
9019
9025
  setMode: method(object({
9020
9026
  deviceId: number().int().nonnegative(),
@@ -13613,10 +13619,30 @@ var deviceProviderCapability = {
13613
13619
  type: string()
13614
13620
  }))),
13615
13621
  supportsDiscovery: method(object({}), boolean()),
13616
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13622
+ /**
13623
+ * Run a network scan. `params` carries optional provider-specific scan
13624
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13625
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13626
+ * (provider uses its local-network default).
13627
+ */
13628
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13617
13629
  kind: "mutation",
13618
13630
  auth: "admin"
13619
13631
  }),
13632
+ /**
13633
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13634
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13635
+ * `null` when the provider takes no extra scan params — the generic
13636
+ * aggregated scan never renders this; the per-integration scan does.
13637
+ */
13638
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13639
+ /**
13640
+ * The DeviceType this provider creates via manual add (Camera for
13641
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13642
+ * provider does not support manual creation. Lets the Add-Device dialog
13643
+ * pick the right type instead of assuming Camera.
13644
+ */
13645
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13620
13646
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13621
13647
  kind: "mutation",
13622
13648
  auth: "admin"
@@ -13740,9 +13766,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13740
13766
  async supportsDiscovery() {
13741
13767
  return false;
13742
13768
  }
13743
- async discoverDevices() {
13769
+ async discoverDevices(_input) {
13744
13770
  return [];
13745
13771
  }
13772
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13773
+ * Null = no extra params. Override in providers that support scoped scans. */
13774
+ async getDiscoveryParamsSchema() {
13775
+ return null;
13776
+ }
13777
+ /**
13778
+ * The DeviceType this provider creates via manual add — derived from the
13779
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13780
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13781
+ */
13782
+ async getManualCreationType() {
13783
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13784
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13785
+ }
13746
13786
  async adoptDiscoveredDevice(_input) {
13747
13787
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13748
13788
  }
@@ -15653,7 +15693,10 @@ method(object({
15653
15693
  }), FieldProbeResultSchema, {
15654
15694
  kind: "mutation",
15655
15695
  auth: "admin"
15656
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15696
+ }), method(object({
15697
+ addonId: string(),
15698
+ integrationId: string()
15699
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15657
15700
  addonId: string(),
15658
15701
  integrationId: string()
15659
15702
  }), AdoptionStatusSchema, {
@@ -15668,7 +15711,24 @@ method(object({
15668
15711
  }), method(ResyncInputSchema, ResyncResultSchema, {
15669
15712
  kind: "mutation",
15670
15713
  auth: "admin"
15714
+ }), method(object({}), object({ providers: array(object({
15715
+ addonId: string(),
15716
+ label: string()
15717
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15718
+ addonId: string(),
15719
+ label: string(),
15720
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15721
+ error: string().nullable()
15722
+ })).readonly() }), {
15723
+ kind: "mutation",
15724
+ auth: "admin"
15671
15725
  }), method(object({
15726
+ addonId: string(),
15727
+ params: record(string(), unknown()).optional()
15728
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15729
+ kind: "mutation",
15730
+ auth: "admin"
15731
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15672
15732
  deviceId: number(),
15673
15733
  key: string(),
15674
15734
  value: unknown()
@@ -20791,6 +20851,12 @@ Object.freeze({
20791
20851
  addonId: null,
20792
20852
  access: "create"
20793
20853
  },
20854
+ "deviceManager.adoptionListCandidateFilters": {
20855
+ capName: "device-manager",
20856
+ capScope: "system",
20857
+ addonId: null,
20858
+ access: "view"
20859
+ },
20794
20860
  "deviceManager.adoptionListCandidates": {
20795
20861
  capName: "device-manager",
20796
20862
  capScope: "system",
@@ -20839,12 +20905,30 @@ Object.freeze({
20839
20905
  addonId: null,
20840
20906
  access: "create"
20841
20907
  },
20908
+ "deviceManager.discoverAllProviders": {
20909
+ capName: "device-manager",
20910
+ capScope: "system",
20911
+ addonId: null,
20912
+ access: "create"
20913
+ },
20842
20914
  "deviceManager.discoverDevices": {
20843
20915
  capName: "device-manager",
20844
20916
  capScope: "system",
20845
20917
  addonId: null,
20846
20918
  access: "create"
20847
20919
  },
20920
+ "deviceManager.discoverProvider": {
20921
+ capName: "device-manager",
20922
+ capScope: "system",
20923
+ addonId: null,
20924
+ access: "create"
20925
+ },
20926
+ "deviceManager.discoveryProviders": {
20927
+ capName: "device-manager",
20928
+ capScope: "system",
20929
+ addonId: null,
20930
+ access: "view"
20931
+ },
20848
20932
  "deviceManager.enable": {
20849
20933
  capName: "device-manager",
20850
20934
  capScope: "system",
@@ -20995,6 +21079,18 @@ Object.freeze({
20995
21079
  addonId: null,
20996
21080
  access: "create"
20997
21081
  },
21082
+ "deviceManager.providerCreationType": {
21083
+ capName: "device-manager",
21084
+ capScope: "system",
21085
+ addonId: null,
21086
+ access: "view"
21087
+ },
21088
+ "deviceManager.providerDiscoveryParamsSchema": {
21089
+ capName: "device-manager",
21090
+ capScope: "system",
21091
+ addonId: null,
21092
+ access: "view"
21093
+ },
20998
21094
  "deviceManager.registerDevice": {
20999
21095
  capName: "device-manager",
21000
21096
  capScope: "system",
@@ -21211,6 +21307,18 @@ Object.freeze({
21211
21307
  addonId: null,
21212
21308
  access: "view"
21213
21309
  },
21310
+ "deviceProvider.getDiscoveryParamsSchema": {
21311
+ capName: "device-provider",
21312
+ capScope: "system",
21313
+ addonId: null,
21314
+ access: "view"
21315
+ },
21316
+ "deviceProvider.getManualCreationType": {
21317
+ capName: "device-provider",
21318
+ capScope: "system",
21319
+ addonId: null,
21320
+ access: "view"
21321
+ },
21214
21322
  "deviceProvider.getStatus": {
21215
21323
  capName: "device-provider",
21216
21324
  capScope: "system",
package/dist/addon.mjs CHANGED
@@ -4652,7 +4652,7 @@ function preprocess(fn, schema) {
4652
4652
  });
4653
4653
  }
4654
4654
  //#endregion
4655
- //#region ../types/dist/sleep-B3AOslwX.mjs
4655
+ //#region ../types/dist/sleep-C2M2zF7x.mjs
4656
4656
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4657
4657
  EventCategory["SystemBoot"] = "system.boot";
4658
4658
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6220,6 +6220,12 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
6220
6220
  DeviceType["Switch"] = "switch";
6221
6221
  DeviceType["Sensor"] = "sensor";
6222
6222
  DeviceType["Thermostat"] = "thermostat";
6223
+ /** Air-conditioner / heat-pump climate device (HVAC) — shares the
6224
+ * `climate-control` cap surface with `Thermostat` but renders a
6225
+ * dedicated AC-appropriate control UI (mode chips, fan speed,
6226
+ * independent vertical/horizontal swing). Sources: native Gree, and
6227
+ * reusable by other AC integrations. */
6228
+ DeviceType["Climate"] = "climate";
6223
6229
  DeviceType["Button"] = "button";
6224
6230
  /** Generic stateless event emitter — carries a device's EXACT declared
6225
6231
  * event vocabulary verbatim (no normalization). Installed with the
@@ -9015,7 +9021,7 @@ var climateControlCapability = {
9015
9021
  scope: "device",
9016
9022
  deviceNative: true,
9017
9023
  mode: "singleton",
9018
- deviceTypes: [DeviceType.Thermostat],
9024
+ deviceTypes: [DeviceType.Thermostat, DeviceType.Climate],
9019
9025
  methods: {
9020
9026
  setMode: method(object({
9021
9027
  deviceId: number().int().nonnegative(),
@@ -13614,10 +13620,30 @@ var deviceProviderCapability = {
13614
13620
  type: string()
13615
13621
  }))),
13616
13622
  supportsDiscovery: method(object({}), boolean()),
13617
- discoverDevices: method(object({}), array(DiscoveryCandidateSchema), {
13623
+ /**
13624
+ * Run a network scan. `params` carries optional provider-specific scan
13625
+ * inputs (e.g. a broadcast address / subnet for cross-subnet discovery),
13626
+ * shaped by `getDiscoveryParamsSchema`. Omitted for the generic scan
13627
+ * (provider uses its local-network default).
13628
+ */
13629
+ discoverDevices: method(object({ params: record(string(), unknown()).optional() }), array(DiscoveryCandidateSchema), {
13618
13630
  kind: "mutation",
13619
13631
  auth: "admin"
13620
13632
  }),
13633
+ /**
13634
+ * Optional form schema (`ConfigUISchema`) for the EXTRA per-scan inputs a
13635
+ * provider accepts (e.g. Gree's broadcast address for a different subnet).
13636
+ * `null` when the provider takes no extra scan params — the generic
13637
+ * aggregated scan never renders this; the per-integration scan does.
13638
+ */
13639
+ getDiscoveryParamsSchema: method(object({}), CreationSchemaOutputSchema),
13640
+ /**
13641
+ * The DeviceType this provider creates via manual add (Camera for
13642
+ * Reolink/ONVIF, Container for Gree, Hub for Ecowitt). `null` when the
13643
+ * provider does not support manual creation. Lets the Add-Device dialog
13644
+ * pick the right type instead of assuming Camera.
13645
+ */
13646
+ getManualCreationType: method(object({}), object({ deviceType: _enum(DeviceType).nullable() })),
13621
13647
  adoptDiscoveredDevice: method(object({ candidate: DiscoveryCandidateSchema }), DeviceSummarySchema, {
13622
13648
  kind: "mutation",
13623
13649
  auth: "admin"
@@ -13741,9 +13767,23 @@ var BaseDeviceProvider = class extends BaseAddon {
13741
13767
  async supportsDiscovery() {
13742
13768
  return false;
13743
13769
  }
13744
- async discoverDevices() {
13770
+ async discoverDevices(_input) {
13745
13771
  return [];
13746
13772
  }
13773
+ /** Extra per-scan input form (e.g. a broadcast address for another subnet).
13774
+ * Null = no extra params. Override in providers that support scoped scans. */
13775
+ async getDiscoveryParamsSchema() {
13776
+ return null;
13777
+ }
13778
+ /**
13779
+ * The DeviceType this provider creates via manual add — derived from the
13780
+ * `deviceClasses` map (first registered type). `null` when manual creation is
13781
+ * unsupported. Lets the Add-Device dialog pick the right type per provider.
13782
+ */
13783
+ async getManualCreationType() {
13784
+ if (!await this.supportsManualCreation()) return { deviceType: null };
13785
+ return { deviceType: Object.values(DeviceType).find((t) => this.deviceClasses[t] !== void 0) ?? null };
13786
+ }
13747
13787
  async adoptDiscoveredDevice(_input) {
13748
13788
  throw new Error(`${this.providerName} provider does not support discovery-based adoption`);
13749
13789
  }
@@ -15654,7 +15694,10 @@ method(object({
15654
15694
  }), FieldProbeResultSchema, {
15655
15695
  kind: "mutation",
15656
15696
  auth: "admin"
15657
- }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15697
+ }), method(object({
15698
+ addonId: string(),
15699
+ integrationId: string()
15700
+ }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema.extend({ addonId: string() }), ListCandidatesOutputSchema, { auth: "admin" }), method(object({
15658
15701
  addonId: string(),
15659
15702
  integrationId: string()
15660
15703
  }), AdoptionStatusSchema, {
@@ -15669,7 +15712,24 @@ method(object({
15669
15712
  }), method(ResyncInputSchema, ResyncResultSchema, {
15670
15713
  kind: "mutation",
15671
15714
  auth: "admin"
15715
+ }), method(object({}), object({ providers: array(object({
15716
+ addonId: string(),
15717
+ label: string()
15718
+ })).readonly() }), { auth: "admin" }), method(object({}), object({ groups: array(object({
15719
+ addonId: string(),
15720
+ label: string(),
15721
+ candidates: array(DiscoveryCandidateSchema).readonly(),
15722
+ error: string().nullable()
15723
+ })).readonly() }), {
15724
+ kind: "mutation",
15725
+ auth: "admin"
15672
15726
  }), method(object({
15727
+ addonId: string(),
15728
+ params: record(string(), unknown()).optional()
15729
+ }), object({ candidates: array(DiscoveryCandidateSchema).readonly() }), {
15730
+ kind: "mutation",
15731
+ auth: "admin"
15732
+ }), method(object({ addonId: string() }), object({ deviceType: _enum(DeviceType).nullable() }), { auth: "admin" }), method(object({ addonId: string() }), unknown(), { auth: "admin" }), method(object({
15673
15733
  deviceId: number(),
15674
15734
  key: string(),
15675
15735
  value: unknown()
@@ -20792,6 +20852,12 @@ Object.freeze({
20792
20852
  addonId: null,
20793
20853
  access: "create"
20794
20854
  },
20855
+ "deviceManager.adoptionListCandidateFilters": {
20856
+ capName: "device-manager",
20857
+ capScope: "system",
20858
+ addonId: null,
20859
+ access: "view"
20860
+ },
20795
20861
  "deviceManager.adoptionListCandidates": {
20796
20862
  capName: "device-manager",
20797
20863
  capScope: "system",
@@ -20840,12 +20906,30 @@ Object.freeze({
20840
20906
  addonId: null,
20841
20907
  access: "create"
20842
20908
  },
20909
+ "deviceManager.discoverAllProviders": {
20910
+ capName: "device-manager",
20911
+ capScope: "system",
20912
+ addonId: null,
20913
+ access: "create"
20914
+ },
20843
20915
  "deviceManager.discoverDevices": {
20844
20916
  capName: "device-manager",
20845
20917
  capScope: "system",
20846
20918
  addonId: null,
20847
20919
  access: "create"
20848
20920
  },
20921
+ "deviceManager.discoverProvider": {
20922
+ capName: "device-manager",
20923
+ capScope: "system",
20924
+ addonId: null,
20925
+ access: "create"
20926
+ },
20927
+ "deviceManager.discoveryProviders": {
20928
+ capName: "device-manager",
20929
+ capScope: "system",
20930
+ addonId: null,
20931
+ access: "view"
20932
+ },
20849
20933
  "deviceManager.enable": {
20850
20934
  capName: "device-manager",
20851
20935
  capScope: "system",
@@ -20996,6 +21080,18 @@ Object.freeze({
20996
21080
  addonId: null,
20997
21081
  access: "create"
20998
21082
  },
21083
+ "deviceManager.providerCreationType": {
21084
+ capName: "device-manager",
21085
+ capScope: "system",
21086
+ addonId: null,
21087
+ access: "view"
21088
+ },
21089
+ "deviceManager.providerDiscoveryParamsSchema": {
21090
+ capName: "device-manager",
21091
+ capScope: "system",
21092
+ addonId: null,
21093
+ access: "view"
21094
+ },
20999
21095
  "deviceManager.registerDevice": {
21000
21096
  capName: "device-manager",
21001
21097
  capScope: "system",
@@ -21212,6 +21308,18 @@ Object.freeze({
21212
21308
  addonId: null,
21213
21309
  access: "view"
21214
21310
  },
21311
+ "deviceProvider.getDiscoveryParamsSchema": {
21312
+ capName: "device-provider",
21313
+ capScope: "system",
21314
+ addonId: null,
21315
+ access: "view"
21316
+ },
21317
+ "deviceProvider.getManualCreationType": {
21318
+ capName: "device-provider",
21319
+ capScope: "system",
21320
+ addonId: null,
21321
+ access: "view"
21322
+ },
21215
21323
  "deviceProvider.getStatus": {
21216
21324
  capName: "device-provider",
21217
21325
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homematic",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "Homematic / HomematicIP (CCU3 / RaspberryMatic) device-provider addon for CamStack — wraps the nodehomematic library",
5
5
  "keywords": [
6
6
  "camstack",