@camstack/addon-export-ha-mqtt 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.
@@ -4679,7 +4679,7 @@ function number(params) {
4679
4679
  return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
4680
4680
  }
4681
4681
  //#endregion
4682
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4682
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4683
4683
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4684
4684
  EventCategory["SystemBoot"] = "system.boot";
4685
4685
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6479,6 +6479,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6479
6479
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6480
6480
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6481
6481
  DeviceRole["PressureSensor"] = "pressure-sensor";
6482
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6483
+ DeviceRole["WindSensor"] = "wind-sensor";
6484
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6485
+ DeviceRole["RainSensor"] = "rain-sensor";
6486
+ /** UV index (weather-station `uv-sensor` cap). */
6487
+ DeviceRole["UvSensor"] = "uv-sensor";
6488
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6489
+ * Distinct from AmbientLightSensor (lux). */
6490
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6491
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6492
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6482
6493
  DeviceRole["PowerSensor"] = "power-sensor";
6483
6494
  DeviceRole["EnergySensor"] = "energy-sensor";
6484
6495
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -8997,18 +9008,47 @@ object({
8997
9008
  lastUpdated: number$1().nullable()
8998
9009
  });
8999
9010
  DeviceType.Image;
9011
+ /**
9012
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
9013
+ * with a mowing lifecycle plus a dock action.
9014
+ *
9015
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
9016
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
9017
+ * nullable — some mowers don't report a battery percentage.
9018
+ *
9019
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
9020
+ * `dock` sends the mower back to its charging station.
9021
+ */
9022
+ var LawnMowerActivitySchema = _enum([
9023
+ "idle",
9024
+ "mowing",
9025
+ "paused",
9026
+ "docked",
9027
+ "error"
9028
+ ]);
9029
+ /** Severity of the current device/error code — info (status), warning, error. */
9030
+ var DeviceCodeSeveritySchema = _enum([
9031
+ "info",
9032
+ "warning",
9033
+ "error"
9034
+ ]);
9000
9035
  object({
9001
9036
  /** Lifecycle activity of the mower. */
9002
- activity: _enum([
9003
- "idle",
9004
- "mowing",
9005
- "paused",
9006
- "docked",
9007
- "error"
9008
- ]),
9037
+ activity: LawnMowerActivitySchema,
9009
9038
  /** 0..100 battery percentage. Null when the device has no battery
9010
9039
  * reading. */
9011
9040
  batteryLevel: number$1().min(0).max(100).nullable(),
9041
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9042
+ * task is active / progress is unavailable. */
9043
+ progressPercent: number$1().min(0).max(100).nullable(),
9044
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9045
+ * or null when unknown. */
9046
+ currentCode: number$1().nullable(),
9047
+ /** Human label for {@link currentCode}, or null when undecodable. */
9048
+ currentCodeLabel: string().nullable(),
9049
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9050
+ * attention; `info` is normal status. */
9051
+ severity: DeviceCodeSeveritySchema,
9012
9052
  /** Ms epoch when the slice was last updated. */
9013
9053
  lastChangedAt: number$1()
9014
9054
  });
@@ -10583,6 +10623,7 @@ var VacuumStateSchema = _enum([
10583
10623
  "paused",
10584
10624
  "returning",
10585
10625
  "docked",
10626
+ "drying",
10586
10627
  "error"
10587
10628
  ]);
10588
10629
  /**
@@ -10621,6 +10662,12 @@ object({
10621
10662
  detergent: TankStatusSchema.nullable(),
10622
10663
  /** Dust bin. Null when the hardware has no dust bin. */
10623
10664
  dustBin: TankStatusSchema.nullable(),
10665
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10666
+ progressPercent: number$1().min(0).max(100).nullable(),
10667
+ /** Current error code (0 / null = no error). */
10668
+ errorCode: number$1().nullable(),
10669
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10670
+ errorLabel: string().nullable(),
10624
10671
  /** Ms epoch when the slice was last updated. */
10625
10672
  lastChangedAt: number$1()
10626
10673
  });
@@ -12062,17 +12109,32 @@ var ReleaseInputSchema = object({
12062
12109
  * the parent cascades into every accessory. */
12063
12110
  camDeviceId: number$1().int().nonnegative()
12064
12111
  });
12065
- var ResyncInputSchema = object({
12066
- /** Parent CamStack device id of an adopted device. The provider resolves its
12067
- * source (integration/broker + native id) and re-aligns the device's
12068
- * structural spec (type/role/capabilities/units) with the live mapping,
12069
- * rebuilding any child whose class changed while preserving operator edits. */
12070
- camDeviceId: number$1().int().nonnegative() });
12112
+ var ResyncInputSchema = object({
12113
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12114
+ * source (integration/broker + native id) and re-aligns the device's
12115
+ * structural spec (type/role/capabilities/units) with the live mapping,
12116
+ * rebuilding any child whose class changed while preserving operator edits. */
12117
+ camDeviceId: number$1().int().nonnegative(),
12118
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12119
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12120
+ * children are rebuilt fresh from source — correct names, coords, and units —
12121
+ * instead of being preserved by the incremental reconcile. Use to recover from
12122
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12123
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12124
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12125
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12126
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12127
+ * re-sync that preserves children. */
12128
+ resetToSource: boolean().optional()
12129
+ });
12071
12130
  var ResyncResultSchema = object({
12072
12131
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12073
12132
  changed: boolean(),
12074
12133
  /** Number of child devices rebuilt into a new class by this re-sync. */
12075
- rebuiltChildren: number$1().int().nonnegative()
12134
+ rebuiltChildren: number$1().int().nonnegative(),
12135
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12136
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12137
+ removedChildren: number$1().int().nonnegative().optional()
12076
12138
  });
12077
12139
  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, {
12078
12140
  kind: "mutation",
@@ -13796,6 +13858,11 @@ var DeviceMetaSchema = object({
13796
13858
  addonId: string(),
13797
13859
  type: string(),
13798
13860
  name: string(),
13861
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13862
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13863
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13864
+ * `DeviceMeta.userNamed`. */
13865
+ userNamed: boolean().optional(),
13799
13866
  location: string().nullable(),
13800
13867
  disabled: boolean(),
13801
13868
  parentDeviceId: number$1().nullable(),
@@ -14106,6 +14173,9 @@ method(object({
14106
14173
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14107
14174
  kind: "mutation",
14108
14175
  auth: "admin"
14176
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14177
+ kind: "mutation",
14178
+ auth: "admin"
14109
14179
  }), method(object({
14110
14180
  deviceId: number$1(),
14111
14181
  key: string(),
@@ -17868,6 +17938,12 @@ Object.freeze({
17868
17938
  addonId: null,
17869
17939
  access: "create"
17870
17940
  },
17941
+ "deviceManager.adoptionResync": {
17942
+ capName: "device-manager",
17943
+ capScope: "system",
17944
+ addonId: null,
17945
+ access: "create"
17946
+ },
17871
17947
  "deviceManager.allocateDeviceId": {
17872
17948
  capName: "device-manager",
17873
17949
  capScope: "system",
@@ -4677,7 +4677,7 @@ function number(params) {
4677
4677
  return /* @__PURE__ */ _coercedNumber(ZodNumber, params);
4678
4678
  }
4679
4679
  //#endregion
4680
- //#region ../types/dist/sleep-NOH4yRwj.mjs
4680
+ //#region ../types/dist/sleep-DVmKHFGi.mjs
4681
4681
  var EventCategory = /* @__PURE__ */ function(EventCategory) {
4682
4682
  EventCategory["SystemBoot"] = "system.boot";
4683
4683
  EventCategory["SystemAddonsReady"] = "system.addons-ready";
@@ -6477,6 +6477,17 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
6477
6477
  DeviceRole["HumiditySensor"] = "humidity-sensor";
6478
6478
  DeviceRole["AmbientLightSensor"] = "ambient-light-sensor";
6479
6479
  DeviceRole["PressureSensor"] = "pressure-sensor";
6480
+ /** Wind speed or direction (weather-station `wind-sensor` cap). */
6481
+ DeviceRole["WindSensor"] = "wind-sensor";
6482
+ /** Rain accumulation or rate (weather-station `rain-sensor` cap). */
6483
+ DeviceRole["RainSensor"] = "rain-sensor";
6484
+ /** UV index (weather-station `uv-sensor` cap). */
6485
+ DeviceRole["UvSensor"] = "uv-sensor";
6486
+ /** Solar irradiance W/m² (weather-station `solar-radiation-sensor` cap).
6487
+ * Distinct from AmbientLightSensor (lux). */
6488
+ DeviceRole["SolarRadiationSensor"] = "solar-radiation-sensor";
6489
+ /** Soil moisture % (garden/weather `soil-moisture-sensor` cap). */
6490
+ DeviceRole["SoilMoistureSensor"] = "soil-moisture-sensor";
6480
6491
  DeviceRole["PowerSensor"] = "power-sensor";
6481
6492
  DeviceRole["EnergySensor"] = "energy-sensor";
6482
6493
  DeviceRole["VoltageSensor"] = "voltage-sensor";
@@ -8995,18 +9006,47 @@ object({
8995
9006
  lastUpdated: number$1().nullable()
8996
9007
  });
8997
9008
  DeviceType.Image;
9009
+ /**
9010
+ * Robotic lawn-mower cap. Models HA `lawn_mower.*` entities — anything
9011
+ * with a mowing lifecycle plus a dock action.
9012
+ *
9013
+ * Activity follows HA's canonical lawn-mower lifecycle: `idle` /
9014
+ * `mowing` / `paused` / `docked` / `error`. `batteryLevel` (0..100) is
9015
+ * nullable — some mowers don't report a battery percentage.
9016
+ *
9017
+ * `startMowing` begins a mowing run, `pause` halts it in place, and
9018
+ * `dock` sends the mower back to its charging station.
9019
+ */
9020
+ var LawnMowerActivitySchema = _enum([
9021
+ "idle",
9022
+ "mowing",
9023
+ "paused",
9024
+ "docked",
9025
+ "error"
9026
+ ]);
9027
+ /** Severity of the current device/error code — info (status), warning, error. */
9028
+ var DeviceCodeSeveritySchema = _enum([
9029
+ "info",
9030
+ "warning",
9031
+ "error"
9032
+ ]);
8998
9033
  object({
8999
9034
  /** Lifecycle activity of the mower. */
9000
- activity: _enum([
9001
- "idle",
9002
- "mowing",
9003
- "paused",
9004
- "docked",
9005
- "error"
9006
- ]),
9035
+ activity: LawnMowerActivitySchema,
9007
9036
  /** 0..100 battery percentage. Null when the device has no battery
9008
9037
  * reading. */
9009
9038
  batteryLevel: number$1().min(0).max(100).nullable(),
9039
+ /** 0..100 mowing-completion percentage of the current task, or null when no
9040
+ * task is active / progress is unavailable. */
9041
+ progressPercent: number$1().min(0).max(100).nullable(),
9042
+ /** Current device/event code (dynamic — mostly status, sometimes an error),
9043
+ * or null when unknown. */
9044
+ currentCode: number$1().nullable(),
9045
+ /** Human label for {@link currentCode}, or null when undecodable. */
9046
+ currentCodeLabel: string().nullable(),
9047
+ /** Severity of {@link currentCode}. `error` (and often `warning`) warrants UI
9048
+ * attention; `info` is normal status. */
9049
+ severity: DeviceCodeSeveritySchema,
9010
9050
  /** Ms epoch when the slice was last updated. */
9011
9051
  lastChangedAt: number$1()
9012
9052
  });
@@ -10581,6 +10621,7 @@ var VacuumStateSchema = _enum([
10581
10621
  "paused",
10582
10622
  "returning",
10583
10623
  "docked",
10624
+ "drying",
10584
10625
  "error"
10585
10626
  ]);
10586
10627
  /**
@@ -10619,6 +10660,12 @@ object({
10619
10660
  detergent: TankStatusSchema.nullable(),
10620
10661
  /** Dust bin. Null when the hardware has no dust bin. */
10621
10662
  dustBin: TankStatusSchema.nullable(),
10663
+ /** 0..100 cleaning-completion percentage of the current task, or null. */
10664
+ progressPercent: number$1().min(0).max(100).nullable(),
10665
+ /** Current error code (0 / null = no error). */
10666
+ errorCode: number$1().nullable(),
10667
+ /** Human label for {@link errorCode}, or null when none / undecodable. */
10668
+ errorLabel: string().nullable(),
10622
10669
  /** Ms epoch when the slice was last updated. */
10623
10670
  lastChangedAt: number$1()
10624
10671
  });
@@ -12060,17 +12107,32 @@ var ReleaseInputSchema = object({
12060
12107
  * the parent cascades into every accessory. */
12061
12108
  camDeviceId: number$1().int().nonnegative()
12062
12109
  });
12063
- var ResyncInputSchema = object({
12064
- /** Parent CamStack device id of an adopted device. The provider resolves its
12065
- * source (integration/broker + native id) and re-aligns the device's
12066
- * structural spec (type/role/capabilities/units) with the live mapping,
12067
- * rebuilding any child whose class changed while preserving operator edits. */
12068
- camDeviceId: number$1().int().nonnegative() });
12110
+ var ResyncInputSchema = object({
12111
+ /** Parent CamStack device id of an adopted device. The provider resolves its
12112
+ * source (integration/broker + native id) and re-aligns the device's
12113
+ * structural spec (type/role/capabilities/units) with the live mapping,
12114
+ * rebuilding any child whose class changed while preserving operator edits. */
12115
+ camDeviceId: number$1().int().nonnegative(),
12116
+ /** "Resync from zero" (#19). When true, the kernel PURGES every accessory
12117
+ * child of `camDeviceId` BEFORE the provider re-derives the device, so the
12118
+ * children are rebuilt fresh from source — correct names, coords, and units —
12119
+ * instead of being preserved by the incremental reconcile. Use to recover from
12120
+ * legacy generic/placeholder names that the normal name-precedence keeps frozen
12121
+ * (the operator's explicit reset). Push-driven integrations (no-op resync)
12122
+ * rebuild on their next snapshot; pull/command integrations rebuild in `resync`.
12123
+ * Operator edits on the PARENT (its name, layout, primary-child pick) survive —
12124
+ * only the children are torn down. Omitted/false ⇒ the normal incremental
12125
+ * re-sync that preserves children. */
12126
+ resetToSource: boolean().optional()
12127
+ });
12069
12128
  var ResyncResultSchema = object({
12070
12129
  /** True when the persisted spec actually changed (children may have been rebuilt). */
12071
12130
  changed: boolean(),
12072
12131
  /** Number of child devices rebuilt into a new class by this re-sync. */
12073
- rebuiltChildren: number$1().int().nonnegative()
12132
+ rebuiltChildren: number$1().int().nonnegative(),
12133
+ /** Number of accessory children torn down by a `resetToSource` purge before the
12134
+ * provider re-derived the device. 0/absent for a normal incremental re-sync. */
12135
+ removedChildren: number$1().int().nonnegative().optional()
12074
12136
  });
12075
12137
  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, {
12076
12138
  kind: "mutation",
@@ -13794,6 +13856,11 @@ var DeviceMetaSchema = object({
13794
13856
  addonId: string(),
13795
13857
  type: string(),
13796
13858
  name: string(),
13859
+ /** True once an operator explicitly renamed the device via `setName`. Drives
13860
+ * reconcile name-precedence (preserve operator name vs adopt fresh provider
13861
+ * name). Absent ⇒ treated as user-named (PRESERVE) for legacy rows. See
13862
+ * `DeviceMeta.userNamed`. */
13863
+ userNamed: boolean().optional(),
13797
13864
  location: string().nullable(),
13798
13865
  disabled: boolean(),
13799
13866
  parentDeviceId: number$1().nullable(),
@@ -14104,6 +14171,9 @@ method(object({
14104
14171
  }), method(ReleaseInputSchema.extend({ addonId: string() }), _void(), {
14105
14172
  kind: "mutation",
14106
14173
  auth: "admin"
14174
+ }), method(ResyncInputSchema, ResyncResultSchema, {
14175
+ kind: "mutation",
14176
+ auth: "admin"
14107
14177
  }), method(object({
14108
14178
  deviceId: number$1(),
14109
14179
  key: string(),
@@ -17866,6 +17936,12 @@ Object.freeze({
17866
17936
  addonId: null,
17867
17937
  access: "create"
17868
17938
  },
17939
+ "deviceManager.adoptionResync": {
17940
+ capName: "device-manager",
17941
+ capScope: "system",
17942
+ addonId: null,
17943
+ access: "create"
17944
+ },
17869
17945
  "deviceManager.allocateDeviceId": {
17870
17946
  capName: "device-manager",
17871
17947
  capScope: "system",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-export-ha-mqtt",
3
- "version": "1.1.6",
3
+ "version": "1.1.8",
4
4
  "description": "HomeAssistant MQTT discovery exporter for CamStack devices. Publishes discovery topics so HA auto-creates entities for exposed cameras/switches/intercoms/sensors.",
5
5
  "keywords": [
6
6
  "camstack",