@camstack/addon-provider-homeassistant 1.2.621 → 1.2.622

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.
@@ -9194,7 +9194,7 @@ function errMsg(err) {
9194
9194
  return String(err);
9195
9195
  }
9196
9196
  //#endregion
9197
- //#region ../types/dist/composition-xz-ud5EQ.mjs
9197
+ //#region ../types/dist/composition-BJ8iAZb3.mjs
9198
9198
  /**
9199
9199
  * The ffmpeg build every CamStack node downloads, per platform and arch.
9200
9200
  *
@@ -9254,7 +9254,7 @@ portable("linux64"), portable("linuxarm64"), portable("macarm64"), portable("mac
9254
9254
  * ONE table for everyone who asks "is this device HIGH?": the
9255
9255
  * recorder's `RecordingTriggers.sensorDeviceIds` trigger, the post-analysis
9256
9256
  * sensor markers, the orchestrator's camera-sensors bridge and
9257
- * the sources of a composite doorbell (`doorbellFeatureSources`, D671).
9257
+ * the sources of a pulse (`compilePulseOverride`, D936).
9258
9258
  * A second copy would diverge at the first cap added, and the symptom — "the
9259
9259
  * sensor rings the doorbell but does not record" — is exactly D62.
9260
9260
  *
@@ -55248,20 +55248,68 @@ var BatteryStatusSchema = object({
55248
55248
  */
55249
55249
  binary: boolean().optional()
55250
55250
  });
55251
+ var BATTERY_DEVICE_TYPES = [
55252
+ DeviceType.Camera,
55253
+ DeviceType.Sensor,
55254
+ DeviceType.Button,
55255
+ DeviceType.Switch,
55256
+ DeviceType.PetFeeder,
55257
+ DeviceType.Container,
55258
+ DeviceType.Thermostat
55259
+ ];
55260
+ /** Generic Customize target for the percentage reading (D936). */
55261
+ var batteryCustomize = {
55262
+ version: 1,
55263
+ targets: [{
55264
+ id: "percentage",
55265
+ cardinality: "scalar",
55266
+ vocabulary: {
55267
+ cap: "battery",
55268
+ stateField: "percentage"
55269
+ },
55270
+ deviceTypes: BATTERY_DEVICE_TYPES,
55271
+ apply: "add-or-replace",
55272
+ path: "percentage",
55273
+ sources: [{
55274
+ kind: "field",
55275
+ valueKinds: ["number", "string"],
55276
+ transforms: [{ kind: "identity" }, {
55277
+ kind: "linear",
55278
+ defaultScale: 1,
55279
+ defaultOffset: 0,
55280
+ clampMin: 0,
55281
+ clampMax: 100
55282
+ }]
55283
+ }],
55284
+ companions: [
55285
+ {
55286
+ kind: "constant",
55287
+ path: "charging",
55288
+ value: "unknown",
55289
+ when: "add"
55290
+ },
55291
+ {
55292
+ kind: "constant",
55293
+ path: "sleeping",
55294
+ value: false,
55295
+ when: "add"
55296
+ },
55297
+ {
55298
+ kind: "clock",
55299
+ path: "lastUpdated",
55300
+ when: "add"
55301
+ }
55302
+ ],
55303
+ sourceReport: { status: "assignment-status" },
55304
+ advancedExpression: true
55305
+ }]
55306
+ };
55251
55307
  var batteryCapability = {
55252
55308
  name: "battery",
55253
55309
  scope: "device",
55254
55310
  deviceNative: true,
55255
55311
  mode: "singleton",
55256
- deviceTypes: [
55257
- DeviceType.Camera,
55258
- DeviceType.Sensor,
55259
- DeviceType.Button,
55260
- DeviceType.Switch,
55261
- DeviceType.PetFeeder,
55262
- DeviceType.Container,
55263
- DeviceType.Thermostat
55264
- ],
55312
+ deviceTypes: BATTERY_DEVICE_TYPES,
55265
55313
  methods: {
55266
55314
  /**
55267
55315
  * Explicitly wake the camera from low-power sleep ahead of a
@@ -55345,6 +55393,7 @@ onStatusChanged: { data: object({
55345
55393
  kind: "gauge",
55346
55394
  unit: "%"
55347
55395
  } } },
55396
+ customize: batteryCustomize,
55348
55397
  /** Clock fields: written, but excluded from the compare that decides
55349
55398
  * whether persisting is worth a SQLite commit. */
55350
55399
  volatileStateFields: ["lastUpdated"]
@@ -56346,6 +56395,106 @@ var ConsumablesStatusSchema = object({
56346
56395
  items: array(ConsumableItemSchema),
56347
56396
  lastChangedAt: number()
56348
56397
  });
56398
+ /** Synthesize seed for a link-built status (no native provider).
56399
+ *
56400
+ * ⚠ NO LIVE CALLER since 2026-08-08 (device-links deleted; see
56401
+ * `CapabilityStatusSchema.empty`). The wiring guidance below was written for
56402
+ * exactly the case the operator is asking about again — a Dreame's HA
56403
+ * consumable-life sensors — so it is kept for that conversation, not because
56404
+ * anything reads it today. */
56405
+ var EMPTY_STATUS = {
56406
+ items: [],
56407
+ lastChangedAt: 0
56408
+ };
56409
+ /** Seed for a NEW link-built consumable item. `key`/`label` are overwritten
56410
+ * with the link's `itemKey` (see `status.itemArray`), so the placeholder
56411
+ * empty strings never survive into a validated item. Link-built items are
56412
+ * not resettable — there is no native provider to receive `reset()`.
56413
+ *
56414
+ * Wiring guidance (HA vacuum consumable-life sensors):
56415
+ * - a percent-remaining source (`numeric-sensor`, unit '%') → `level` via
56416
+ * `identity` (or `linear` scale 1 offset 0 clamp [0,100] to be safe);
56417
+ * - an hours-remaining source (e.g. Dreame 'Main Brush Time Left', unit 'h')
56418
+ * → `level` via `linear` with scale = 100 / max-hours for that item
56419
+ * (e.g. main brush 300 h → scale 0.3333) + clamp [0,100];
56420
+ * - a discrete source (`enum-sensor`, e.g. mop pad 'installed') → `status`
56421
+ * via `enum-map` (e.g. { installed: 'ok', missing: 'replace' }).
56422
+ * A numeric→'replace' THRESHOLD (level < 10 → 'replace') is NOT expressible
56423
+ * with the current transform kinds — leave `status` null (valid) until the
56424
+ * expression transform lands. */
56425
+ /** Generic Customize target for one consumable item (D936). Native rows stay read-only. */
56426
+ var consumablesCustomize = {
56427
+ version: 1,
56428
+ targets: [{
56429
+ id: "items",
56430
+ cardinality: "keyedArray",
56431
+ vocabulary: { cap: "consumables" },
56432
+ deviceTypes: Object.values(DeviceType),
56433
+ apply: "add",
56434
+ path: "items",
56435
+ keyField: "key",
56436
+ labelField: "label",
56437
+ itemSchema: ConsumableItemSchema,
56438
+ nativeItems: "read-only",
56439
+ sourceReport: { status: "assignment-status" },
56440
+ fields: [
56441
+ {
56442
+ path: "level",
56443
+ sources: [{
56444
+ kind: "numeric",
56445
+ transforms: [{ kind: "identity" }, {
56446
+ kind: "linear",
56447
+ defaultScale: 1,
56448
+ defaultOffset: 0,
56449
+ clampMin: 0,
56450
+ clampMax: 100
56451
+ }]
56452
+ }]
56453
+ },
56454
+ {
56455
+ path: "remaining.value",
56456
+ sources: [{
56457
+ kind: "numeric",
56458
+ transforms: [{ kind: "identity" }]
56459
+ }],
56460
+ literals: [{
56461
+ path: "remaining.unit",
56462
+ values: [...ConsumableRemainingUnitSchema.options]
56463
+ }]
56464
+ },
56465
+ {
56466
+ path: "status",
56467
+ sources: [{
56468
+ kind: "enum",
56469
+ transforms: [{
56470
+ kind: "enum-map",
56471
+ outputValues: [...ConsumableStatusSchema.options],
56472
+ unmapped: null
56473
+ }]
56474
+ }]
56475
+ }
56476
+ ],
56477
+ traits: [{
56478
+ path: "kind",
56479
+ values: [...ConsumableKindSchema.options],
56480
+ defaultValue: "wear"
56481
+ }, {
56482
+ path: "form",
56483
+ values: [...ConsumableFormSchema.options],
56484
+ defaultValue: "part"
56485
+ }],
56486
+ companions: [{
56487
+ kind: "clock",
56488
+ path: "lastChangedAt",
56489
+ when: "add"
56490
+ }, {
56491
+ kind: "clock",
56492
+ path: "lastFetchedAt",
56493
+ when: "add"
56494
+ }],
56495
+ advancedExpression: true
56496
+ }]
56497
+ };
56349
56498
  var consumablesCapability = {
56350
56499
  name: "consumables",
56351
56500
  scope: "device",
@@ -56383,10 +56532,7 @@ reset: method(object({
56383
56532
  status: {
56384
56533
  schema: ConsumablesStatusSchema,
56385
56534
  kind: "push",
56386
- empty: {
56387
- items: [],
56388
- lastChangedAt: 0
56389
- },
56535
+ empty: EMPTY_STATUS,
56390
56536
  itemArray: {
56391
56537
  path: "items",
56392
56538
  keyField: "key",
@@ -56422,6 +56568,7 @@ reset: method(object({
56422
56568
  * brush's remaining life and a dishwasher's salt are each recorded the moment
56423
56569
  * their provider reports them; an item that appears later gets its series.
56424
56570
  */
56571
+ customize: consumablesCustomize,
56425
56572
  history: {
56426
56573
  fields: {},
56427
56574
  items: {
@@ -57164,6 +57311,36 @@ var dishwasherCapability = {
57164
57311
  powerOn: { kind: "boolean" }
57165
57312
  } }
57166
57313
  };
57314
+ /** Pulse override: a rising edge advances `lastPressedAt` and the press count. */
57315
+ var doorbellCustomize = {
57316
+ version: 1,
57317
+ targets: [{
57318
+ id: "pressed",
57319
+ cardinality: "event",
57320
+ shape: "pulse",
57321
+ vocabulary: {
57322
+ cap: "doorbell",
57323
+ eventName: "onPressed"
57324
+ },
57325
+ deviceTypes: [DeviceType.Camera],
57326
+ apply: "add",
57327
+ applyAuthority: { kind: "composition-claim" },
57328
+ eventName: "onPressed",
57329
+ edges: ["rising"],
57330
+ timestampPath: "lastPressedAt",
57331
+ counterPath: "pressCountSinceStart",
57332
+ highWater: "composer-advance",
57333
+ combine: "any",
57334
+ debounce: {
57335
+ kind: "rising-edge",
57336
+ defaultDebounceMs: 2e3,
57337
+ changedAtRequired: true
57338
+ },
57339
+ sources: [{ kind: "binary" }, { kind: "switch" }],
57340
+ sourceReport: { status: "assignment-status" },
57341
+ advancedExpression: true
57342
+ }]
57343
+ };
57167
57344
  var DoorbellStatusSchema = object({
57168
57345
  /** Ms epoch of the last press. null = never observed since this provider started. */
57169
57346
  lastPressedAt: number().nullable(),
@@ -57230,7 +57407,8 @@ onPressed: {
57230
57407
  /**
57231
57408
  * History (D850): none — `pressCountSinceStart` resets with the addon, so it is not a monotonic meter; presses live in the events ledger.
57232
57409
  */
57233
- history: "none"
57410
+ history: "none",
57411
+ customize: doorbellCustomize
57234
57412
  };
57235
57413
  /**
57236
57414
  * Enum-state sensor — a string value picked from a finite option set.
@@ -59626,6 +59804,38 @@ authKey: string().optional() }), object({
59626
59804
  /** Human-readable error when `ok: false`. */
59627
59805
  error: string().optional()
59628
59806
  }), { kind: "mutation" });
59807
+ /** Span override: start on a rising edge, end on a fall or this timeout. */
59808
+ var motionCustomize = {
59809
+ version: 1,
59810
+ targets: [{
59811
+ id: "detected",
59812
+ cardinality: "event",
59813
+ shape: "span",
59814
+ vocabulary: {
59815
+ cap: "motion",
59816
+ eventName: "onMotionChanged"
59817
+ },
59818
+ deviceTypes: [DeviceType.Camera],
59819
+ apply: "replace",
59820
+ applyAuthority: {
59821
+ kind: "camera-sensors",
59822
+ timeoutField: "motionCooldownMs"
59823
+ },
59824
+ eventName: "onMotionChanged",
59825
+ start: "rising-edge",
59826
+ end: "falling-edge-or-timeout",
59827
+ timeoutMs: 3e4,
59828
+ combine: "any",
59829
+ sourceModes: [
59830
+ "in-addition",
59831
+ "confirm",
59832
+ "replace"
59833
+ ],
59834
+ sources: [{ kind: "binary" }, { kind: "switch" }],
59835
+ sourceReport: { status: "assignment-status" },
59836
+ advancedExpression: false
59837
+ }]
59838
+ };
59629
59839
  var MotionStatusSchema = object({
59630
59840
  detected: boolean(),
59631
59841
  /** Ms epoch of the last detected-true observation. Null if never detected. */
@@ -59765,7 +59975,8 @@ onMotionChanged: { data: MotionOnMotionChangedDataSchema } },
59765
59975
  history: { fields: { detected: {
59766
59976
  kind: "boolean",
59767
59977
  excludeDeviceTypes: [DeviceType.Camera]
59768
- } } }
59978
+ } } },
59979
+ customize: motionCustomize
59769
59980
  };
59770
59981
  /**
59771
59982
  * Motion-trigger toggle for accessory devices.
@@ -62491,6 +62702,16 @@ var ptzAutotrackCapability = {
62491
62702
  */
62492
62703
  history: "none"
62493
62704
  };
62705
+ var RUNNING_POWER_START_DELAY_MS = 3e4;
62706
+ var RUNNING_POWER_STOP_DELAY_MS = 18e4;
62707
+ /** Before any provider reading — all fields unknown (D933). */
62708
+ var RUNNING_STATE_COLD = {
62709
+ running: null,
62710
+ since: null,
62711
+ source: "native",
62712
+ phase: null,
62713
+ lastFetchedAt: null
62714
+ };
62494
62715
  var RunningStateSourceSchema = _enum(["native", "assigned"]);
62495
62716
  var RunningStateStatusSchema = object({
62496
62717
  /** null = unknown — never coerced to false (D393). */
@@ -62499,19 +62720,100 @@ var RunningStateStatusSchema = object({
62499
62720
  since: number().nullable(),
62500
62721
  source: RunningStateSourceSchema,
62501
62722
  phase: string().nullable(),
62502
- lastFetchedAt: number()
62723
+ /** null until a reading has been published (D393). */
62724
+ lastFetchedAt: number().nullable()
62503
62725
  });
62504
62726
  var RunningFlipEventDataSchema = object({
62505
62727
  deviceId: number(),
62506
62728
  since: number().nullable(),
62507
62729
  phase: string().nullable()
62508
62730
  });
62731
+ var RUNNING_DEVICE_TYPES = Object.values(DeviceType);
62732
+ /** Generic Customize target for the running boolean (D936). */
62733
+ var runningCustomize = {
62734
+ version: 1,
62735
+ targets: [{
62736
+ id: "running",
62737
+ cardinality: "scalar",
62738
+ vocabulary: {
62739
+ cap: "running-state",
62740
+ stateField: "running"
62741
+ },
62742
+ deviceTypes: [
62743
+ DeviceType.Dishwasher,
62744
+ DeviceType.Vacuum,
62745
+ DeviceType.LawnMower,
62746
+ DeviceType.MediaPlayer,
62747
+ DeviceType.WaterHeater,
62748
+ DeviceType.Humidifier,
62749
+ DeviceType.Fan,
62750
+ DeviceType.Climate,
62751
+ DeviceType.Thermostat,
62752
+ DeviceType.PetFeeder
62753
+ ],
62754
+ apply: "add-or-replace",
62755
+ path: "running",
62756
+ sources: [
62757
+ {
62758
+ kind: "switch",
62759
+ transforms: [{ kind: "identity" }]
62760
+ },
62761
+ {
62762
+ kind: "binary",
62763
+ transforms: [{ kind: "identity" }, { kind: "invert" }]
62764
+ },
62765
+ {
62766
+ kind: "numeric",
62767
+ requiredUnit: "W",
62768
+ transforms: [{
62769
+ kind: "threshold",
62770
+ comparison: "gte",
62771
+ defaultThreshold: 5,
62772
+ defaultStartDwellMs: RUNNING_POWER_START_DELAY_MS,
62773
+ defaultStopDwellMs: RUNNING_POWER_STOP_DELAY_MS,
62774
+ thresholdUnit: "W"
62775
+ }]
62776
+ }
62777
+ ],
62778
+ companions: [
62779
+ {
62780
+ kind: "constant",
62781
+ path: "source",
62782
+ value: "assigned",
62783
+ when: "always"
62784
+ },
62785
+ {
62786
+ kind: "constant",
62787
+ path: "phase",
62788
+ value: null,
62789
+ when: "always"
62790
+ },
62791
+ {
62792
+ kind: "clock",
62793
+ path: "lastFetchedAt",
62794
+ when: "always"
62795
+ },
62796
+ {
62797
+ kind: "transition-time",
62798
+ path: "since",
62799
+ sourceChangedAt: "prefer"
62800
+ }
62801
+ ],
62802
+ sourceReport: {
62803
+ status: "assignment-status",
62804
+ runtimeField: "source",
62805
+ nativeValue: "native",
62806
+ assignedValue: "assigned"
62807
+ },
62808
+ advancedExpression: true
62809
+ }]
62810
+ };
62509
62811
  var runningStateCapability = {
62510
62812
  name: "running-state",
62511
62813
  scope: "device",
62512
62814
  deviceNative: true,
62513
62815
  mode: "singleton",
62514
- deviceTypes: Object.values(DeviceType),
62816
+ deviceTypes: RUNNING_DEVICE_TYPES,
62515
62817
  methods: {},
62516
62818
  events: {
62517
62819
  onStarted: { data: RunningFlipEventDataSchema },
@@ -62524,7 +62826,8 @@ var runningStateCapability = {
62524
62826
  runtimeState: RunningStateStatusSchema,
62525
62827
  durability: "restored",
62526
62828
  history: { fields: { running: { kind: "boolean" } } },
62527
- volatileStateFields: ["lastFetchedAt"]
62829
+ volatileStateFields: ["lastFetchedAt"],
62830
+ customize: runningCustomize
62528
62831
  };
62529
62832
  DeviceType.Camera, DeviceType.Sensor, DeviceType.Switch, method(object({ deviceId: number().int().nonnegative() }), object({ success: literal(true) }), {
62530
62833
  kind: "mutation",
@@ -67156,37 +67459,42 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
67156
67459
  kind: "mutation",
67157
67460
  auth: "admin"
67158
67461
  });
67159
- function resolveSince(running, previous, sinceMs) {
67462
+ function resolveSince(running, previous, transitionAtMs, bootstrapSinceMs) {
67160
67463
  if (running === null) return null;
67161
- if ((previous?.running ?? null) !== running) return sinceMs;
67162
- return previous?.since ?? sinceMs;
67464
+ const prevRunning = previous?.running ?? null;
67465
+ if (prevRunning === null) return bootstrapSinceMs;
67466
+ if (prevRunning !== running) return transitionAtMs;
67467
+ return previous?.since ?? null;
67163
67468
  }
67164
- function nativeSlice(running, phase, previous, sinceMs, now) {
67469
+ function nativeSlice(running, phase, previous, transitionAtMs, fetchedAt, bootstrapSinceMs) {
67165
67470
  return {
67166
67471
  running,
67167
- since: resolveSince(running, previous, sinceMs),
67472
+ since: resolveSince(running, previous, transitionAtMs, bootstrapSinceMs),
67168
67473
  source: "native",
67169
67474
  phase: running === null ? null : phase,
67170
- lastFetchedAt: now
67475
+ lastFetchedAt: fetchedAt
67171
67476
  };
67172
67477
  }
67173
- function runningFromVacuumState(state, previous, now) {
67174
- if (state === null) return nativeSlice(null, null, previous, now, now);
67175
- if (state === "cleaning" || state === "returning" || state === "drying") return nativeSlice(true, state, previous, now, now);
67176
- if (state === "paused") return nativeSlice(false, "paused", previous, now, now);
67177
- return nativeSlice(false, state, previous, now, now);
67478
+ function runningFromVacuumState(state, previous, fetchedAt, transitionAt) {
67479
+ const transitionAtMs = transitionAt ?? fetchedAt;
67480
+ if (state === null) return nativeSlice(null, null, previous, transitionAtMs, fetchedAt, null);
67481
+ if (state === "cleaning" || state === "returning" || state === "drying") return nativeSlice(true, state, previous, transitionAtMs, fetchedAt, null);
67482
+ if (state === "paused") return nativeSlice(false, "paused", previous, transitionAtMs, fetchedAt, null);
67483
+ return nativeSlice(false, state, previous, transitionAtMs, fetchedAt, null);
67178
67484
  }
67179
- function runningFromLawnMower(activity, previous, now) {
67180
- if (activity === null) return nativeSlice(null, null, previous, now, now);
67181
- if (activity === "mowing") return nativeSlice(true, activity, previous, now, now);
67182
- if (activity === "paused") return nativeSlice(false, "paused", previous, now, now);
67183
- return nativeSlice(false, activity, previous, now, now);
67485
+ function runningFromLawnMower(activity, previous, fetchedAt, transitionAt) {
67486
+ const transitionAtMs = transitionAt ?? fetchedAt;
67487
+ if (activity === null) return nativeSlice(null, null, previous, transitionAtMs, fetchedAt, null);
67488
+ if (activity === "mowing") return nativeSlice(true, activity, previous, transitionAtMs, fetchedAt, null);
67489
+ if (activity === "paused") return nativeSlice(false, "paused", previous, transitionAtMs, fetchedAt, null);
67490
+ return nativeSlice(false, activity, previous, transitionAtMs, fetchedAt, null);
67184
67491
  }
67185
- function runningFromMediaPlayer(state, previous, now) {
67186
- if (state === null) return nativeSlice(null, null, previous, now, now);
67187
- if (state === "playing" || state === "buffering") return nativeSlice(true, state, previous, now, now);
67188
- if (state === "paused") return nativeSlice(false, "paused", previous, now, now);
67189
- return nativeSlice(false, state, previous, now, now);
67492
+ function runningFromMediaPlayer(state, previous, fetchedAt, transitionAt) {
67493
+ const transitionAtMs = transitionAt ?? fetchedAt;
67494
+ if (state === null) return nativeSlice(null, null, previous, transitionAtMs, fetchedAt, null);
67495
+ if (state === "playing" || state === "buffering") return nativeSlice(true, state, previous, transitionAtMs, fetchedAt, null);
67496
+ if (state === "paused") return nativeSlice(false, "paused", previous, transitionAtMs, fetchedAt, null);
67497
+ return nativeSlice(false, state, previous, transitionAtMs, fetchedAt, null);
67190
67498
  }
67191
67499
  SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
67192
67500
  Object.freeze({
@@ -85072,6 +85380,96 @@ Object.freeze({
85072
85380
  "smtp-provider": "email"
85073
85381
  });
85074
85382
  DeviceType.Camera;
85383
+ DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Camera, DeviceType.Camera, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
85384
+ /**
85385
+ * A saved Customize assignment (D936). The schema is the type: callers use
85386
+ * `z.infer`, they do not restate the shape.
85387
+ */
85388
+ var OverrideSourceSchema = object({
85389
+ addonId: string().min(1),
85390
+ stableId: string().min(1),
85391
+ cap: string().min(1),
85392
+ fieldPath: string().min(1)
85393
+ });
85394
+ var CustomizeTransformDraftSchema = discriminatedUnion("kind", [
85395
+ object({ kind: literal("identity") }),
85396
+ object({ kind: literal("invert") }),
85397
+ object({
85398
+ kind: literal("threshold"),
85399
+ comparison: _enum(["gte", "lte"]),
85400
+ threshold: number(),
85401
+ startDwellMs: number().nonnegative(),
85402
+ stopDwellMs: number().nonnegative()
85403
+ }),
85404
+ object({
85405
+ kind: literal("linear"),
85406
+ scale: number(),
85407
+ offset: number(),
85408
+ clampMin: number().optional(),
85409
+ clampMax: number().optional()
85410
+ }),
85411
+ object({
85412
+ kind: literal("enum-map"),
85413
+ mapping: record(string(), string().nullable())
85414
+ }),
85415
+ object({ kind: literal("number") })
85416
+ ]);
85417
+ var ScalarOverrideDraftSchema = object({
85418
+ kind: literal("scalar"),
85419
+ cap: string().min(1),
85420
+ targetId: string().min(1),
85421
+ source: OverrideSourceSchema,
85422
+ transform: CustomizeTransformDraftSchema
85423
+ });
85424
+ var KeyedArrayOverrideDraftSchema = object({
85425
+ kind: literal("keyedArray"),
85426
+ cap: string().min(1),
85427
+ targetId: string().min(1),
85428
+ key: string().min(1),
85429
+ label: string().min(1),
85430
+ fieldPath: string().min(1),
85431
+ source: OverrideSourceSchema,
85432
+ transform: CustomizeTransformDraftSchema
85433
+ });
85434
+ var PulseOverrideDraftSchema = object({
85435
+ kind: literal("pulse"),
85436
+ cap: string().min(1),
85437
+ targetId: string().min(1),
85438
+ enabled: boolean(),
85439
+ debounceMs: number().nonnegative(),
85440
+ sources: array(OverrideSourceSchema).min(1)
85441
+ });
85442
+ var SpanSourceDraftSchema = OverrideSourceSchema.extend({ mode: _enum([
85443
+ "in-addition",
85444
+ "confirm",
85445
+ "replace"
85446
+ ]).optional() });
85447
+ discriminatedUnion("kind", [
85448
+ ScalarOverrideDraftSchema,
85449
+ KeyedArrayOverrideDraftSchema,
85450
+ PulseOverrideDraftSchema,
85451
+ object({
85452
+ kind: literal("span"),
85453
+ cap: string().min(1),
85454
+ targetId: string().min(1),
85455
+ timeoutMs: number().nonnegative(),
85456
+ cooldownMs: number().nonnegative().optional(),
85457
+ sources: array(SpanSourceDraftSchema)
85458
+ })
85459
+ ]);
85460
+ object({
85461
+ targetId: string().min(1),
85462
+ configured: boolean(),
85463
+ source: _enum(["native", "assigned"]),
85464
+ state: _enum([
85465
+ "active",
85466
+ "stale",
85467
+ "released",
85468
+ "unavailable"
85469
+ ]),
85470
+ reason: string().nullable()
85471
+ });
85472
+ String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
85075
85473
  var G711_SCALE_CORRECTION_DB = {
85076
85474
  PCMU: 20 * Math.log10(4),
85077
85475
  PCMA: 20 * Math.log10(8)
@@ -86525,4 +86923,4 @@ function bestLocationMatch(externalName, existing, threshold = .8) {
86525
86923
  var MB = 1024 * 1024;
86526
86924
  1024 * MB, 3072 * MB;
86527
86925
  //#endregion
86528
- export { motionCapability as $, carbonMonoxideCapability as A, RecordSecretUnavailableError as At, deviceAdoptionCapability as B, literal as Bt, binaryCapability as C, waterHeaterCapability as Ct, buildDeviceAdminUrl as D, DeviceType as Dt, buildAddonRouteProvider as E, DeviceRole as Et, consumableKindOf as F, nodePin as Ft, floodCapability as G, union as Gt, enumSensorCapability as H, object as Ht, contactCapability as I, _enum as It, humiditySensorCapability as J, EventCategory as Jt, gasCapability as K, unknown as Kt, controlCapability as L, array as Lt, colorCapability as M, defineEntryKind as Mt, connectivityCapability as N, defineRecordKinds as Nt, buttonCapability as O, errMsg as Ot, consumableFormOf as P, entryBody as Pt, mediaPlayerCapability as Q, coverCapability as R, boolean as Rt, bestLocationMatch as S, vibrationCapability as St, brokerCapability as T, DeviceFeature as Tt, eventEmitterCapability as U, record as Ut, deviceExportCapability as V, number as Vt, fanControlCapability as W, string as Wt, lawnMowerControlCapability as X, imageCapability as Y, lockControlCapability as Z, airQualitySensorCapability as _, tamperCapability as _t, COCO_TO_MACRO as a, parseAdminBase as at, automationControlCapability as b, vacuumControlCapability as bt, ConsumableItemSchema as c, presenceCapability as ct, FanDirectionSchema as d, runningFromMediaPlayer as dt, normalizeUnit as et, HvacModeSchema as f, runningFromVacuumState as ft, addonRoutesCapability as g, switchCapability as gt, accessoriesCapability as h, smokeCapability as ht, CAMERA_SWITCH_ORDER as i, oauthIntegrationCapability as it, climateControlCapability as j, createEvent as jt, calendarSourceCapability as k, BaseAddon as kt, ConsumableStatusSchema as l, pressureSensorCapability as lt, TargetSchema as m, scriptRunnerCapability as mt, BaseDevice as n, notifierCapability as nt, CameraSwitchIdSchema as o, powerMeterCapability as ot, MediaPlayerRepeatSchema as p, runningStateCapability as pt, humidifierCapability as q, url as qt, BaseDeviceProvider as r, numericSensorCapability as rt, ConsumableFormSchema as s, prepareNotification as st, AlarmArmModeSchema as t, notificationOutputCapability as tt, EnumSensorDateTimeFormatSchema as u, runningFromLawnMower as ut, alarmPanelCapability as v, temperatureSensorCapability as vt, brightnessCapability as w, weatherCapability as wt, batteryCapability as x, valveCapability as xt, ambientLightSensorCapability as y, updateCapability as yt, deviceAdminLinkCapability as z, discriminatedUnion as zt };
86926
+ export { mediaPlayerCapability as $, calendarSourceCapability as A, BaseAddon as At, deviceAdminLinkCapability as B, discriminatedUnion as Bt, bestLocationMatch as C, vibrationCapability as Ct, buildAddonRouteProvider as D, DeviceRole as Dt, brokerCapability as E, DeviceFeature as Et, consumableFormOf as F, entryBody as Ft, fanControlCapability as G, string as Gt, deviceExportCapability as H, number as Ht, consumableKindOf as I, nodePin as It, humidifierCapability as J, url as Jt, floodCapability as K, union as Kt, contactCapability as L, _enum as Lt, climateControlCapability as M, createEvent as Mt, colorCapability as N, defineEntryKind as Nt, buildDeviceAdminUrl as O, DeviceType as Ot, connectivityCapability as P, defineRecordKinds as Pt, lockControlCapability as Q, controlCapability as R, array as Rt, batteryCapability as S, valveCapability as St, brightnessCapability as T, weatherCapability as Tt, enumSensorCapability as U, object as Ut, deviceAdoptionCapability as V, literal as Vt, eventEmitterCapability as W, record as Wt, imageCapability as X, humiditySensorCapability as Y, EventCategory as Yt, lawnMowerControlCapability as Z, addonRoutesCapability as _, switchCapability as _t, COCO_TO_MACRO as a, oauthIntegrationCapability as at, ambientLightSensorCapability as b, updateCapability as bt, ConsumableItemSchema as c, prepareNotification as ct, FanDirectionSchema as d, runningFromLawnMower as dt, motionCapability as et, HvacModeSchema as f, runningFromMediaPlayer as ft, accessoriesCapability as g, smokeCapability as gt, TargetSchema as h, scriptRunnerCapability as ht, CAMERA_SWITCH_ORDER as i, numericSensorCapability as it, carbonMonoxideCapability as j, RecordSecretUnavailableError as jt, buttonCapability as k, errMsg as kt, ConsumableStatusSchema as l, presenceCapability as lt, RUNNING_STATE_COLD as m, runningStateCapability as mt, BaseDevice as n, notificationOutputCapability as nt, CameraSwitchIdSchema as o, parseAdminBase as ot, MediaPlayerRepeatSchema as p, runningFromVacuumState as pt, gasCapability as q, unknown as qt, BaseDeviceProvider as r, notifierCapability as rt, ConsumableFormSchema as s, powerMeterCapability as st, AlarmArmModeSchema as t, normalizeUnit as tt, EnumSensorDateTimeFormatSchema as u, pressureSensorCapability as ut, airQualitySensorCapability as v, tamperCapability as vt, binaryCapability as w, waterHeaterCapability as wt, automationControlCapability as x, vacuumControlCapability as xt, alarmPanelCapability as y, temperatureSensorCapability as yt, coverCapability as z, boolean as zt };
@@ -24,7 +24,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
24
24
  enumerable: true
25
25
  }) : target, mod));
26
26
  //#endregion
27
- const require_dist = require("../dist-DdSdlgON.js");
27
+ const require_dist = require("../dist-33tQA0eu.js");
28
28
  let node_crypto = require("node:crypto");
29
29
  require("node:zlib");
30
30
  let node_fs = require("node:fs");
@@ -1,4 +1,4 @@
1
- import { E as buildAddonRouteProvider, F as consumableKindOf, Ft as nodePin, Ht as object, Jt as EventCategory, Kt as unknown, Lt as array, P as consumableFormOf, V as deviceExportCapability, Wt as string, a as COCO_TO_MACRO, c as ConsumableItemSchema, d as FanDirectionSchema, f as HvacModeSchema, g as addonRoutesCapability, i as CAMERA_SWITCH_ORDER, it as oauthIntegrationCapability, kt as BaseAddon, l as ConsumableStatusSchema, o as CameraSwitchIdSchema, p as MediaPlayerRepeatSchema, s as ConsumableFormSchema, t as AlarmArmModeSchema } from "../dist-BvE3GGAV.mjs";
1
+ import { At as BaseAddon, D as buildAddonRouteProvider, F as consumableFormOf, Gt as string, H as deviceExportCapability, I as consumableKindOf, It as nodePin, Rt as array, Ut as object, Yt as EventCategory, _ as addonRoutesCapability, a as COCO_TO_MACRO, at as oauthIntegrationCapability, c as ConsumableItemSchema, d as FanDirectionSchema, f as HvacModeSchema, i as CAMERA_SWITCH_ORDER, l as ConsumableStatusSchema, o as CameraSwitchIdSchema, p as MediaPlayerRepeatSchema, qt as unknown, s as ConsumableFormSchema, t as AlarmArmModeSchema } from "../dist-C6zA8__P.mjs";
2
2
  import { createHmac, timingSafeEqual } from "node:crypto";
3
3
  import "node:zlib";
4
4
  import "node:fs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@camstack/addon-provider-homeassistant",
3
- "version": "1.2.621",
3
+ "version": "1.2.622",
4
4
  "description": "Home Assistant device provider addon for CamStack",
5
5
  "keywords": [
6
6
  "camstack",