@camstack/addon-advanced-notifier 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.
package/dist/addon.js CHANGED
@@ -4632,7 +4632,7 @@ function _instanceof(cls, params = {}) {
4632
4632
  return inst;
4633
4633
  }
4634
4634
  //#endregion
4635
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4635
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4636
4636
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4637
4637
  EventCategory["SystemBoot"] = "system.boot";
4638
4638
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6432,6 +6432,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6432
6432
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6433
6433
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6434
6434
  DeviceRole["PressureSensor"] = "pressure-sensor";
6435
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6436
+ DeviceRole["WindSensor"] = "wind-sensor";
6437
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6438
+ DeviceRole["RainSensor"] = "rain-sensor";
6439
+ /** UV index (weather-station `uv-sensor` cap). */
6440
+ DeviceRole["UvSensor"] = "uv-sensor";
6441
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6442
+ * Distinct from AmbientLightSensor (lux). */
6443
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6444
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6445
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6435
6446
  DeviceRole["PowerSensor"] = "power-sensor";
6436
6447
  DeviceRole["EnergySensor"] = "energy-sensor";
6437
6448
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -8964,18 +8975,47 @@ object({
8964
8975
  lastUpdated: number().nullable()
8965
8976
  });
8966
8977
  DeviceType.Image;
8978
+ /**
8979
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
8980
+ * with a mowing lifecycle plus a dock action.
8981
+ *
8982
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
8983
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
8984
+ * nullable — some mowers don't report a battery percentage.
8985
+ *
8986
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
8987
+ * `dock` sends the mower back to its charging station.
8988
+ */
8989
+ var LawnMowerActivitySchema = _enum([
8990
+ "idle",
8991
+ "mowing",
8992
+ "paused",
8993
+ "docked",
8994
+ "error"
8995
+ ]);
8996
+ /** Severity of the current device/error code — info (status), warning, error. */
8997
+ var DeviceCodeSeveritySchema = _enum([
8998
+ "info",
8999
+ "warning",
9000
+ "error"
9001
+ ]);
8967
9002
  object({
8968
9003
  /** Lifecycle activity of the mower. */
8969
- activity: _enum([
8970
- "idle",
8971
- "mowing",
8972
- "paused",
8973
- "docked",
8974
- "error"
8975
- ]),
9004
+ activity: LawnMowerActivitySchema,
8976
9005
  /** 0..100 battery percentage. Null when the device has no battery
8977
9006
  * reading. */
8978
9007
  batteryLevel: number().min(0).max(100).nullable(),
9008
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9009
+ * task is active / progress is unavailable. */
9010
+ progressPercent: number().min(0).max(100).nullable(),
9011
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9012
+ * or null when unknown. */
9013
+ currentCode: number().nullable(),
9014
+ /** Human label for {@link currentCode}, or null when undecodable. */
9015
+ currentCodeLabel: string().nullable(),
9016
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9017
+ * attention; `info` is normal status. */
9018
+ severity: DeviceCodeSeveritySchema,
8979
9019
  /** Ms epoch when the slice was last updated. */
8980
9020
  lastChangedAt: number()
8981
9021
  });
@@ -10550,6 +10590,7 @@ var VacuumStateSchema = _enum([
10550
10590
  "paused",
10551
10591
  "returning",
10552
10592
  "docked",
10593
+ "drying",
10553
10594
  "error"
10554
10595
  ]);
10555
10596
  /**
@@ -10588,6 +10629,12 @@ object({
10588
10629
  detergent: TankStatusSchema.nullable(),
10589
10630
  /** Dust bin. Null when the hardware has no dust bin. */
10590
10631
  dustBin: TankStatusSchema.nullable(),
10632
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10633
+ progressPercent: number().min(0).max(100).nullable(),
10634
+ /** Current error code (0 / null = no error). */
10635
+ errorCode: number().nullable(),
10636
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10637
+ errorLabel: string().nullable(),
10591
10638
  /** Ms epoch when the slice was last updated. */
10592
10639
  lastChangedAt: number()
10593
10640
  });
@@ -12029,17 +12076,32 @@ var ReleaseInputSchema = object({
12029
12076
  * the parent cascades into every accessory. */
12030
12077
  camDeviceId: number().int().nonnegative()
12031
12078
  });
12032
- var ResyncInputSchema = object({
12033
- /** Parent CamStack device id of an adopted device. The provider resolves its
12034
- * source (integration/broker + native id) and re-aligns the device's
12035
- * structural spec (type/role/capabilities/units) with the live mapping,
12036
- * rebuilding any child whose class changed while preserving operator edits. */
12037
- camDeviceId: number().int().nonnegative() });
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(),
12085
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12086
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12087
+ * children are rebuilt fresh from source — correct names, coords, and units —
12088
+ * instead of being preserved by the incremental reconcile. Use to recover from
12089
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12090
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12091
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12092
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12093
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12094
+ * re-sync that preserves children. */
12095
+ resetToSource: boolean().optional()
12096
+ });
12038
12097
  var ResyncResultSchema = object({
12039
12098
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12040
12099
  changed: boolean(),
12041
12100
  /** Number of child devices rebuilt into a new class by this re-sync. */
12042
- rebuiltChildren: number().int().nonnegative()
12101
+ rebuiltChildren: number().int().nonnegative(),
12102
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12103
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12104
+ removedChildren: number().int().nonnegative().optional()
12043
12105
  });
12044
12106
  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, {
12045
12107
  kind: "mutation",
@@ -13738,6 +13800,11 @@ var DeviceMetaSchema = object({
13738
13800
  addonId: string(),
13739
13801
  type: string(),
13740
13802
  name: string(),
13803
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13804
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13805
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13806
+ * `DeviceMeta.userNamed`. */
13807
+ userNamed: boolean().optional(),
13741
13808
  location: string().nullable(),
13742
13809
  disabled: boolean(),
13743
13810
  parentDeviceId: number().nullable(),
@@ -14048,6 +14115,9 @@ method(object({
14048
14115
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14049
14116
  kind: "mutation",
14050
14117
  auth: "admin"
14118
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14119
+ kind: "mutation",
14120
+ auth: "admin"
14051
14121
  }), method(object({
14052
14122
  deviceId: number(),
14053
14123
  key: string(),
@@ -17830,6 +17900,12 @@ Object.freeze({
17830
17900
  addonId: null,
17831
17901
  access: "create"
17832
17902
  },
17903
+ "deviceManager.adoptionResync": {
17904
+ capName: "device-manager",
17905
+ capScope: "system",
17906
+ addonId: null,
17907
+ access: "create"
17908
+ },
17833
17909
  "deviceManager.allocateDeviceId": {
17834
17910
  capName: "device-manager",
17835
17911
  capScope: "system",
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-NOH4yRwj.mjs
4631
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4632
4632
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4633
4633
  EventCategory["SystemBoot"] = "system.boot";
4634
4634
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6428,6 +6428,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6428
6428
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6429
6429
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6430
6430
  DeviceRole["PressureSensor"] = "pressure-sensor";
6431
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6432
+ DeviceRole["WindSensor"] = "wind-sensor";
6433
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6434
+ DeviceRole["RainSensor"] = "rain-sensor";
6435
+ /** UV index (weather-station `uv-sensor` cap). */
6436
+ DeviceRole["UvSensor"] = "uv-sensor";
6437
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6438
+ * Distinct from AmbientLightSensor (lux). */
6439
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6440
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6441
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6431
6442
  DeviceRole["PowerSensor"] = "power-sensor";
6432
6443
  DeviceRole["EnergySensor"] = "energy-sensor";
6433
6444
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -8960,18 +8971,47 @@ object({
8960
8971
  lastUpdated: number().nullable()
8961
8972
  });
8962
8973
  DeviceType.Image;
8974
+ /**
8975
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
8976
+ * with a mowing lifecycle plus a dock action.
8977
+ *
8978
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
8979
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
8980
+ * nullable — some mowers don't report a battery percentage.
8981
+ *
8982
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
8983
+ * `dock` sends the mower back to its charging station.
8984
+ */
8985
+ var LawnMowerActivitySchema = _enum([
8986
+ "idle",
8987
+ "mowing",
8988
+ "paused",
8989
+ "docked",
8990
+ "error"
8991
+ ]);
8992
+ /** Severity of the current device/error code — info (status), warning, error. */
8993
+ var DeviceCodeSeveritySchema = _enum([
8994
+ "info",
8995
+ "warning",
8996
+ "error"
8997
+ ]);
8963
8998
  object({
8964
8999
  /** Lifecycle activity of the mower. */
8965
- activity: _enum([
8966
- "idle",
8967
- "mowing",
8968
- "paused",
8969
- "docked",
8970
- "error"
8971
- ]),
9000
+ activity: LawnMowerActivitySchema,
8972
9001
  /** 0..100 battery percentage. Null when the device has no battery
8973
9002
  * reading. */
8974
9003
  batteryLevel: number().min(0).max(100).nullable(),
9004
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9005
+ * task is active / progress is unavailable. */
9006
+ progressPercent: number().min(0).max(100).nullable(),
9007
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9008
+ * or null when unknown. */
9009
+ currentCode: number().nullable(),
9010
+ /** Human label for {@link currentCode}, or null when undecodable. */
9011
+ currentCodeLabel: string().nullable(),
9012
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9013
+ * attention; `info` is normal status. */
9014
+ severity: DeviceCodeSeveritySchema,
8975
9015
  /** Ms epoch when the slice was last updated. */
8976
9016
  lastChangedAt: number()
8977
9017
  });
@@ -10546,6 +10586,7 @@ var VacuumStateSchema = _enum([
10546
10586
  "paused",
10547
10587
  "returning",
10548
10588
  "docked",
10589
+ "drying",
10549
10590
  "error"
10550
10591
  ]);
10551
10592
  /**
@@ -10584,6 +10625,12 @@ object({
10584
10625
  detergent: TankStatusSchema.nullable(),
10585
10626
  /** Dust bin. Null when the hardware has no dust bin. */
10586
10627
  dustBin: TankStatusSchema.nullable(),
10628
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10629
+ progressPercent: number().min(0).max(100).nullable(),
10630
+ /** Current error code (0 / null = no error). */
10631
+ errorCode: number().nullable(),
10632
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10633
+ errorLabel: string().nullable(),
10587
10634
  /** Ms epoch when the slice was last updated. */
10588
10635
  lastChangedAt: number()
10589
10636
  });
@@ -12025,17 +12072,32 @@ var ReleaseInputSchema = object({
12025
12072
  * the parent cascades into every accessory. */
12026
12073
  camDeviceId: number().int().nonnegative()
12027
12074
  });
12028
- var ResyncInputSchema = object({
12029
- /** Parent CamStack device id of an adopted device. The provider resolves its
12030
- * source (integration/broker + native id) and re-aligns the device's
12031
- * structural spec (type/role/capabilities/units) with the live mapping,
12032
- * rebuilding any child whose class changed while preserving operator edits. */
12033
- camDeviceId: number().int().nonnegative() });
12075
+ var ResyncInputSchema = object({
12076
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12077
+ * source (integration/broker + native id) and re-aligns the device's
12078
+ * structural spec (type/role/capabilities/units) with the live mapping,
12079
+ * rebuilding any child whose class changed while preserving operator edits. */
12080
+ camDeviceId: number().int().nonnegative(),
12081
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12082
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12083
+ * children are rebuilt fresh from source — correct names, coords, and units —
12084
+ * instead of being preserved by the incremental reconcile. Use to recover from
12085
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12086
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12087
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12088
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12089
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12090
+ * re-sync that preserves children. */
12091
+ resetToSource: boolean().optional()
12092
+ });
12034
12093
  var ResyncResultSchema = object({
12035
12094
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12036
12095
  changed: boolean(),
12037
12096
  /** Number of child devices rebuilt into a new class by this re-sync. */
12038
- rebuiltChildren: number().int().nonnegative()
12097
+ rebuiltChildren: number().int().nonnegative(),
12098
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12099
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12100
+ removedChildren: number().int().nonnegative().optional()
12039
12101
  });
12040
12102
  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, {
12041
12103
  kind: "mutation",
@@ -13734,6 +13796,11 @@ var DeviceMetaSchema = object({
13734
13796
  addonId: string(),
13735
13797
  type: string(),
13736
13798
  name: string(),
13799
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13800
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13801
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13802
+ * `DeviceMeta.userNamed`. */
13803
+ userNamed: boolean().optional(),
13737
13804
  location: string().nullable(),
13738
13805
  disabled: boolean(),
13739
13806
  parentDeviceId: number().nullable(),
@@ -14044,6 +14111,9 @@ method(object({
14044
14111
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14045
14112
  kind: "mutation",
14046
14113
  auth: "admin"
14114
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14115
+ kind: "mutation",
14116
+ auth: "admin"
14047
14117
  }), method(object({
14048
14118
  deviceId: number(),
14049
14119
  key: string(),
@@ -17826,6 +17896,12 @@ Object.freeze({
17826
17896
  addonId: null,
17827
17897
  access: "create"
17828
17898
  },
17899
+ "deviceManager.adoptionResync": {
17900
+ capName: "device-manager",
17901
+ capScope: "system",
17902
+ addonId: null,
17903
+ access: "create"
17904
+ },
17829
17905
  "deviceManager.allocateDeviceId": {
17830
17906
  capName: "device-manager",
17831
17907
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-advanced-notifier",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "Rules-based notification engine for CamStack",
5
5
  "license": "MIT",
6
6
  "main": "./dist/index.js",