@camstack/addon-export-hap 1.1.6 → 1.1.8

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.
@@ -4664,7 +4664,7 @@ function _instanceof(cls, params = {}) {
4664
4664
  return inst;
4665
4665
  }
4666
4666
  //#endregion
4667
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4667
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4668
4668
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4669
4669
  EventCategory["SystemBoot"] = "system.boot";
4670
4670
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6464,6 +6464,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6464
6464
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6465
6465
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6466
6466
  DeviceRole["PressureSensor"] = "pressure-sensor";
6467
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6468
+ DeviceRole["WindSensor"] = "wind-sensor";
6469
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6470
+ DeviceRole["RainSensor"] = "rain-sensor";
6471
+ /** UV index (weather-station `uv-sensor` cap). */
6472
+ DeviceRole["UvSensor"] = "uv-sensor";
6473
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6474
+ * Distinct from AmbientLightSensor (lux). */
6475
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6476
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6477
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6467
6478
  DeviceRole["PowerSensor"] = "power-sensor";
6468
6479
  DeviceRole["EnergySensor"] = "energy-sensor";
6469
6480
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -9036,18 +9047,47 @@ object({
9036
9047
  lastUpdated: number().nullable()
9037
9048
  });
9038
9049
  DeviceType.Image;
9050
+ /**
9051
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
9052
+ * with a mowing lifecycle plus a dock action.
9053
+ *
9054
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
9055
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
9056
+ * nullable — some mowers don't report a battery percentage.
9057
+ *
9058
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
9059
+ * `dock` sends the mower back to its charging station.
9060
+ */
9061
+ var LawnMowerActivitySchema = _enum([
9062
+ "idle",
9063
+ "mowing",
9064
+ "paused",
9065
+ "docked",
9066
+ "error"
9067
+ ]);
9068
+ /** Severity of the current device/error code — info (status), warning, error. */
9069
+ var DeviceCodeSeveritySchema = _enum([
9070
+ "info",
9071
+ "warning",
9072
+ "error"
9073
+ ]);
9039
9074
  object({
9040
9075
  /** Lifecycle activity of the mower. */
9041
- activity: _enum([
9042
- "idle",
9043
- "mowing",
9044
- "paused",
9045
- "docked",
9046
- "error"
9047
- ]),
9076
+ activity: LawnMowerActivitySchema,
9048
9077
  /** 0..100 battery percentage. Null when the device has no battery
9049
9078
  * reading. */
9050
9079
  batteryLevel: number().min(0).max(100).nullable(),
9080
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9081
+ * task is active / progress is unavailable. */
9082
+ progressPercent: number().min(0).max(100).nullable(),
9083
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9084
+ * or null when unknown. */
9085
+ currentCode: number().nullable(),
9086
+ /** Human label for {@link currentCode}, or null when undecodable. */
9087
+ currentCodeLabel: string().nullable(),
9088
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9089
+ * attention; `info` is normal status. */
9090
+ severity: DeviceCodeSeveritySchema,
9051
9091
  /** Ms epoch when the slice was last updated. */
9052
9092
  lastChangedAt: number()
9053
9093
  });
@@ -10622,6 +10662,7 @@ var VacuumStateSchema = _enum([
10622
10662
  "paused",
10623
10663
  "returning",
10624
10664
  "docked",
10665
+ "drying",
10625
10666
  "error"
10626
10667
  ]);
10627
10668
  /**
@@ -10660,6 +10701,12 @@ object({
10660
10701
  detergent: TankStatusSchema.nullable(),
10661
10702
  /** Dust bin. Null when the hardware has no dust bin. */
10662
10703
  dustBin: TankStatusSchema.nullable(),
10704
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10705
+ progressPercent: number().min(0).max(100).nullable(),
10706
+ /** Current error code (0 / null = no error). */
10707
+ errorCode: number().nullable(),
10708
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10709
+ errorLabel: string().nullable(),
10663
10710
  /** Ms epoch when the slice was last updated. */
10664
10711
  lastChangedAt: number()
10665
10712
  });
@@ -12101,17 +12148,32 @@ var ReleaseInputSchema = object({
12101
12148
  * the parent cascades into every accessory. */
12102
12149
  camDeviceId: number().int().nonnegative()
12103
12150
  });
12104
- var ResyncInputSchema = object({
12105
- /** Parent CamStack device id of an adopted device. The provider resolves its
12106
- * source (integration/broker + native id) and re-aligns the device's
12107
- * structural spec (type/role/capabilities/units) with the live mapping,
12108
- * rebuilding any child whose class changed while preserving operator edits. */
12109
- camDeviceId: number().int().nonnegative() });
12151
+ var ResyncInputSchema = object({
12152
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12153
+ * source (integration/broker + native id) and re-aligns the device's
12154
+ * structural spec (type/role/capabilities/units) with the live mapping,
12155
+ * rebuilding any child whose class changed while preserving operator edits. */
12156
+ camDeviceId: number().int().nonnegative(),
12157
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12158
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12159
+ * children are rebuilt fresh from source — correct names, coords, and units —
12160
+ * instead of being preserved by the incremental reconcile. Use to recover from
12161
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12162
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12163
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12164
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12165
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12166
+ * re-sync that preserves children. */
12167
+ resetToSource: boolean().optional()
12168
+ });
12110
12169
  var ResyncResultSchema = object({
12111
12170
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12112
12171
  changed: boolean(),
12113
12172
  /** Number of child devices rebuilt into a new class by this re-sync. */
12114
- rebuiltChildren: number().int().nonnegative()
12173
+ rebuiltChildren: number().int().nonnegative(),
12174
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12175
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12176
+ removedChildren: number().int().nonnegative().optional()
12115
12177
  });
12116
12178
  method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
12117
12179
  kind: "mutation",
@@ -13835,6 +13897,11 @@ var DeviceMetaSchema = object({
13835
13897
  addonId: string(),
13836
13898
  type: string(),
13837
13899
  name: string(),
13900
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13901
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13902
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13903
+ * `DeviceMeta.userNamed`. */
13904
+ userNamed: boolean().optional(),
13838
13905
  location: string().nullable(),
13839
13906
  disabled: boolean(),
13840
13907
  parentDeviceId: number().nullable(),
@@ -14145,6 +14212,9 @@ method(object({
14145
14212
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14146
14213
  kind: "mutation",
14147
14214
  auth: "admin"
14215
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14216
+ kind: "mutation",
14217
+ auth: "admin"
14148
14218
  }), method(object({
14149
14219
  deviceId: number(),
14150
14220
  key: string(),
@@ -17907,6 +17977,12 @@ Object.freeze({
17907
17977
  addonId: null,
17908
17978
  access: "create"
17909
17979
  },
17980
+ "deviceManager.adoptionResync": {
17981
+ capName: "device-manager",
17982
+ capScope: "system",
17983
+ addonId: null,
17984
+ access: "create"
17985
+ },
17910
17986
  "deviceManager.allocateDeviceId": {
17911
17987
  capName: "device-manager",
17912
17988
  capScope: "system",
@@ -4639,7 +4639,7 @@ function _instanceof(cls, params = {}) {
4639
4639
  return inst;
4640
4640
  }
4641
4641
  //#endregion
4642
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4642
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4643
4643
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4644
4644
  EventCategory["SystemBoot"] = "system.boot";
4645
4645
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6439,6 +6439,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6439
6439
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6440
6440
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6441
6441
  DeviceRole["PressureSensor"] = "pressure-sensor";
6442
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6443
+ DeviceRole["WindSensor"] = "wind-sensor";
6444
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6445
+ DeviceRole["RainSensor"] = "rain-sensor";
6446
+ /** UV index (weather-station `uv-sensor` cap). */
6447
+ DeviceRole["UvSensor"] = "uv-sensor";
6448
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6449
+ * Distinct from AmbientLightSensor (lux). */
6450
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6451
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6452
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6442
6453
  DeviceRole["PowerSensor"] = "power-sensor";
6443
6454
  DeviceRole["EnergySensor"] = "energy-sensor";
6444
6455
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -9011,18 +9022,47 @@ object({
9011
9022
  lastUpdated: number().nullable()
9012
9023
  });
9013
9024
  DeviceType.Image;
9025
+ /**
9026
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
9027
+ * with a mowing lifecycle plus a dock action.
9028
+ *
9029
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
9030
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
9031
+ * nullable — some mowers don't report a battery percentage.
9032
+ *
9033
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
9034
+ * `dock` sends the mower back to its charging station.
9035
+ */
9036
+ var LawnMowerActivitySchema = _enum([
9037
+ "idle",
9038
+ "mowing",
9039
+ "paused",
9040
+ "docked",
9041
+ "error"
9042
+ ]);
9043
+ /** Severity of the current device/error code — info (status), warning, error. */
9044
+ var DeviceCodeSeveritySchema = _enum([
9045
+ "info",
9046
+ "warning",
9047
+ "error"
9048
+ ]);
9014
9049
  object({
9015
9050
  /** Lifecycle activity of the mower. */
9016
- activity: _enum([
9017
- "idle",
9018
- "mowing",
9019
- "paused",
9020
- "docked",
9021
- "error"
9022
- ]),
9051
+ activity: LawnMowerActivitySchema,
9023
9052
  /** 0..100 battery percentage. Null when the device has no battery
9024
9053
  * reading. */
9025
9054
  batteryLevel: number().min(0).max(100).nullable(),
9055
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9056
+ * task is active / progress is unavailable. */
9057
+ progressPercent: number().min(0).max(100).nullable(),
9058
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9059
+ * or null when unknown. */
9060
+ currentCode: number().nullable(),
9061
+ /** Human label for {@link currentCode}, or null when undecodable. */
9062
+ currentCodeLabel: string().nullable(),
9063
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9064
+ * attention; `info` is normal status. */
9065
+ severity: DeviceCodeSeveritySchema,
9026
9066
  /** Ms epoch when the slice was last updated. */
9027
9067
  lastChangedAt: number()
9028
9068
  });
@@ -10597,6 +10637,7 @@ var VacuumStateSchema = _enum([
10597
10637
  "paused",
10598
10638
  "returning",
10599
10639
  "docked",
10640
+ "drying",
10600
10641
  "error"
10601
10642
  ]);
10602
10643
  /**
@@ -10635,6 +10676,12 @@ object({
10635
10676
  detergent: TankStatusSchema.nullable(),
10636
10677
  /** Dust bin. Null when the hardware has no dust bin. */
10637
10678
  dustBin: TankStatusSchema.nullable(),
10679
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10680
+ progressPercent: number().min(0).max(100).nullable(),
10681
+ /** Current error code (0 / null = no error). */
10682
+ errorCode: number().nullable(),
10683
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10684
+ errorLabel: string().nullable(),
10638
10685
  /** Ms epoch when the slice was last updated. */
10639
10686
  lastChangedAt: number()
10640
10687
  });
@@ -12076,17 +12123,32 @@ var ReleaseInputSchema = object({
12076
12123
  * the parent cascades into every accessory. */
12077
12124
  camDeviceId: number().int().nonnegative()
12078
12125
  });
12079
- var ResyncInputSchema = object({
12080
- /** Parent CamStack device id of an adopted device. The provider resolves its
12081
- * source (integration/broker + native id) and re-aligns the device's
12082
- * structural spec (type/role/capabilities/units) with the live mapping,
12083
- * rebuilding any child whose class changed while preserving operator edits. */
12084
- camDeviceId: number().int().nonnegative() });
12126
+ var ResyncInputSchema = object({
12127
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12128
+ * source (integration/broker + native id) and re-aligns the device's
12129
+ * structural spec (type/role/capabilities/units) with the live mapping,
12130
+ * rebuilding any child whose class changed while preserving operator edits. */
12131
+ camDeviceId: number().int().nonnegative(),
12132
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12133
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12134
+ * children are rebuilt fresh from source — correct names, coords, and units —
12135
+ * instead of being preserved by the incremental reconcile. Use to recover from
12136
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12137
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12138
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12139
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12140
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12141
+ * re-sync that preserves children. */
12142
+ resetToSource: boolean().optional()
12143
+ });
12085
12144
  var ResyncResultSchema = object({
12086
12145
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12087
12146
  changed: boolean(),
12088
12147
  /** Number of child devices rebuilt into a new class by this re-sync. */
12089
- rebuiltChildren: number().int().nonnegative()
12148
+ rebuiltChildren: number().int().nonnegative(),
12149
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12150
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12151
+ removedChildren: number().int().nonnegative().optional()
12090
12152
  });
12091
12153
  method(object({ integrationId: string() }), object({ filters: array(AdoptionFilterSchema) }), { auth: "admin" }), method(ListCandidatesInputSchema, ListCandidatesOutputSchema, { auth: "admin" }), method(GetCandidateInputSchema, DiscoveredChildDeviceSchema.nullable(), { auth: "admin" }), method(object({ integrationId: string() }), AdoptionStatusSchema, {
12092
12154
  kind: "mutation",
@@ -13810,6 +13872,11 @@ var DeviceMetaSchema = object({
13810
13872
  addonId: string(),
13811
13873
  type: string(),
13812
13874
  name: string(),
13875
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13876
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13877
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13878
+ * `DeviceMeta.userNamed`. */
13879
+ userNamed: boolean().optional(),
13813
13880
  location: string().nullable(),
13814
13881
  disabled: boolean(),
13815
13882
  parentDeviceId: number().nullable(),
@@ -14120,6 +14187,9 @@ method(object({
14120
14187
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14121
14188
  kind: "mutation",
14122
14189
  auth: "admin"
14190
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14191
+ kind: "mutation",
14192
+ auth: "admin"
14123
14193
  }), method(object({
14124
14194
  deviceId: number(),
14125
14195
  key: string(),
@@ -17882,6 +17952,12 @@ Object.freeze({
17882
17952
  addonId: null,
17883
17953
  access: "create"
17884
17954
  },
17955
+ "deviceManager.adoptionResync": {
17956
+ capName: "device-manager",
17957
+ capScope: "system",
17958
+ addonId: null,
17959
+ access: "create"
17960
+ },
17885
17961
  "deviceManager.allocateDeviceId": {
17886
17962
  capName: "device-manager",
17887
17963
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-hap",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "HomeKit (HAP) bridge exporter for CamStack devices. Publishes a bridged accessory per exposed device — MotionSensor in this MVP; Camera/Doorbell/Switch/Light follow.",
5
5
  "keywords": [
6
6
  "camstack",