@camstack/addon-import-alexa 0.2.161 → 0.2.163

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.mjs CHANGED
@@ -5626,7 +5626,7 @@ var ZodIssueCode = {
5626
5626
  var ZodFirstPartyTypeKind;
5627
5627
  ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {});
5628
5628
  //#endregion
5629
- //#region ../types/dist/sleep-DFaVPxfm.mjs
5629
+ //#region ../types/dist/sleep-Crlmu_tO.mjs
5630
5630
  /**
5631
5631
  * The audio chunk plane's byte format, and the ONE expansion from a coded
5632
5632
  * window to float samples (D455).
@@ -9146,11 +9146,11 @@ var CAP_NAMES = Object.freeze([
9146
9146
  Object.freeze({
9147
9147
  "air-quality-sensor": [
9148
9148
  {
9149
- "path": "co2Ppm",
9149
+ "path": "co2",
9150
9150
  "valueType": "number"
9151
9151
  },
9152
9152
  {
9153
- "path": "vocPpb",
9153
+ "path": "voc",
9154
9154
  "valueType": "number"
9155
9155
  },
9156
9156
  {
@@ -9200,7 +9200,7 @@ Object.freeze({
9200
9200
  }
9201
9201
  ],
9202
9202
  "ambient-light-sensor": [{
9203
- "path": "lux",
9203
+ "path": "illuminance",
9204
9204
  "valueType": "number"
9205
9205
  }],
9206
9206
  "audio-metrics": [
@@ -9261,7 +9261,7 @@ Object.freeze({
9261
9261
  ],
9262
9262
  "battery": [
9263
9263
  {
9264
- "path": "percentage",
9264
+ "path": "level",
9265
9265
  "valueType": "number"
9266
9266
  },
9267
9267
  {
@@ -9283,7 +9283,7 @@ Object.freeze({
9283
9283
  "valueType": "number"
9284
9284
  },
9285
9285
  {
9286
- "path": "volts",
9286
+ "path": "voltage",
9287
9287
  "valueType": "number"
9288
9288
  },
9289
9289
  {
@@ -9304,7 +9304,7 @@ Object.freeze({
9304
9304
  "valueType": "boolean"
9305
9305
  }],
9306
9306
  "brightness": [{
9307
- "path": "percentage",
9307
+ "path": "level",
9308
9308
  "valueType": "number"
9309
9309
  }],
9310
9310
  "broker": [{
@@ -9505,7 +9505,7 @@ Object.freeze({
9505
9505
  "valueType": "number"
9506
9506
  },
9507
9507
  {
9508
- "path": "mireds",
9508
+ "path": "colorTemperature",
9509
9509
  "valueType": "number"
9510
9510
  }
9511
9511
  ],
@@ -9684,15 +9684,15 @@ Object.freeze({
9684
9684
  "valueType": "string"
9685
9685
  },
9686
9686
  {
9687
- "path": "remainingSeconds",
9687
+ "path": "remaining",
9688
9688
  "valueType": "number"
9689
9689
  },
9690
9690
  {
9691
- "path": "delayedStartSeconds",
9691
+ "path": "delayedStart",
9692
9692
  "valueType": "number"
9693
9693
  },
9694
9694
  {
9695
- "path": "progressPercent",
9695
+ "path": "progress",
9696
9696
  "valueType": "number"
9697
9697
  },
9698
9698
  {
@@ -9806,7 +9806,7 @@ Object.freeze({
9806
9806
  ],
9807
9807
  "fan-control": [
9808
9808
  {
9809
- "path": "percentage",
9809
+ "path": "speed",
9810
9810
  "valueType": "number"
9811
9811
  },
9812
9812
  {
@@ -9906,7 +9906,7 @@ Object.freeze({
9906
9906
  }
9907
9907
  ],
9908
9908
  "humidity-sensor": [{
9909
- "path": "percent",
9909
+ "path": "humidity",
9910
9910
  "valueType": "number"
9911
9911
  }],
9912
9912
  "image": [{
@@ -10016,7 +10016,7 @@ Object.freeze({
10016
10016
  "valueType": "number"
10017
10017
  },
10018
10018
  {
10019
- "path": "progressPercent",
10019
+ "path": "progress",
10020
10020
  "valueType": "number"
10021
10021
  },
10022
10022
  {
@@ -10095,11 +10095,11 @@ Object.freeze({
10095
10095
  "valueType": "string"
10096
10096
  },
10097
10097
  {
10098
- "path": "positionMs",
10098
+ "path": "position",
10099
10099
  "valueType": "number"
10100
10100
  },
10101
10101
  {
10102
- "path": "durationMs",
10102
+ "path": "duration",
10103
10103
  "valueType": "number"
10104
10104
  },
10105
10105
  {
@@ -10201,11 +10201,11 @@ Object.freeze({
10201
10201
  ]
10202
10202
  },
10203
10203
  {
10204
- "path": "signalPercent",
10204
+ "path": "signal",
10205
10205
  "valueType": "number"
10206
10206
  },
10207
10207
  {
10208
- "path": "rssiDbm",
10208
+ "path": "rssi",
10209
10209
  "valueType": "number"
10210
10210
  },
10211
10211
  {
@@ -10336,23 +10336,23 @@ Object.freeze({
10336
10336
  ],
10337
10337
  "power-meter": [
10338
10338
  {
10339
- "path": "watts",
10339
+ "path": "power",
10340
10340
  "valueType": "number"
10341
10341
  },
10342
10342
  {
10343
- "path": "kwhTotal",
10343
+ "path": "energy",
10344
10344
  "valueType": "number"
10345
10345
  },
10346
10346
  {
10347
- "path": "volts",
10347
+ "path": "voltage",
10348
10348
  "valueType": "number"
10349
10349
  },
10350
10350
  {
10351
- "path": "amps",
10351
+ "path": "current",
10352
10352
  "valueType": "number"
10353
10353
  },
10354
10354
  {
10355
- "path": "va",
10355
+ "path": "apparentPower",
10356
10356
  "valueType": "number"
10357
10357
  },
10358
10358
  {
@@ -10380,14 +10380,10 @@ Object.freeze({
10380
10380
  {
10381
10381
  "path": "gps.accuracyMeters",
10382
10382
  "valueType": "number"
10383
- },
10384
- {
10385
- "path": "batteryPercent",
10386
- "valueType": "number"
10387
10383
  }
10388
10384
  ],
10389
10385
  "pressure-sensor": [{
10390
- "path": "hpa",
10386
+ "path": "pressure",
10391
10387
  "valueType": "number"
10392
10388
  }],
10393
10389
  "privacy-mask": [{
@@ -10701,7 +10697,7 @@ Object.freeze({
10701
10697
  "valueType": "boolean"
10702
10698
  }],
10703
10699
  "temperature-sensor": [{
10704
- "path": "celsius",
10700
+ "path": "temperature",
10705
10701
  "valueType": "number"
10706
10702
  }],
10707
10703
  "update": [
@@ -10749,7 +10745,7 @@ Object.freeze({
10749
10745
  "valueType": "string"
10750
10746
  },
10751
10747
  {
10752
- "path": "progressPercent",
10748
+ "path": "progress",
10753
10749
  "valueType": "number"
10754
10750
  },
10755
10751
  {
@@ -11234,7 +11230,7 @@ function errMsg(err) {
11234
11230
  return String(err);
11235
11231
  }
11236
11232
  //#endregion
11237
- //#region ../types/dist/composition-Bb8iwHEJ.mjs
11233
+ //#region ../types/dist/composition-CZImLpOI.mjs
11238
11234
  /**
11239
11235
  * The ffmpeg build every CamStack node downloads, per platform and arch.
11240
11236
  *
@@ -19172,7 +19168,7 @@ var CompositionEventPlanSchema = object({
19172
19168
  stateField: string(),
19173
19169
  fieldKey: string()
19174
19170
  });
19175
- /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.celsius`. */
19171
+ /** One refusal, named (D391). `path` points into the composition, e.g. `features[0].fields.temperature`. */
19176
19172
  var CompositionProblemSchema = object({
19177
19173
  code: _enum([
19178
19174
  "reserved-variant",
@@ -19491,7 +19487,7 @@ var GROUP_TEMPLATES = [
19491
19487
  summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
19492
19488
  role: DeviceRole.TemperatureSensor,
19493
19489
  outputCap: "temperature-sensor",
19494
- outputField: "celsius",
19490
+ outputField: "temperature",
19495
19491
  quantity: "temperature",
19496
19492
  defaultAggregate: "mean",
19497
19493
  empty: "null",
@@ -19502,7 +19498,7 @@ var GROUP_TEMPLATES = [
19502
19498
  summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
19503
19499
  role: DeviceRole.HumiditySensor,
19504
19500
  outputCap: "humidity-sensor",
19505
- outputField: "percent",
19501
+ outputField: "humidity",
19506
19502
  quantity: "humidity",
19507
19503
  defaultAggregate: "mean",
19508
19504
  empty: "null",
@@ -19513,7 +19509,7 @@ var GROUP_TEMPLATES = [
19513
19509
  summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
19514
19510
  role: DeviceRole.PressureSensor,
19515
19511
  outputCap: "pressure-sensor",
19516
- outputField: "hpa",
19512
+ outputField: "pressure",
19517
19513
  quantity: "pressure",
19518
19514
  defaultAggregate: "mean",
19519
19515
  empty: "null",
@@ -19524,7 +19520,7 @@ var GROUP_TEMPLATES = [
19524
19520
  summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
19525
19521
  role: DeviceRole.AmbientLightSensor,
19526
19522
  outputCap: "ambient-light-sensor",
19527
- outputField: "lux",
19523
+ outputField: "illuminance",
19528
19524
  quantity: "illuminance",
19529
19525
  defaultAggregate: "mean",
19530
19526
  empty: "null",
@@ -19535,7 +19531,7 @@ var GROUP_TEMPLATES = [
19535
19531
  summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
19536
19532
  role: DeviceRole.PowerSensor,
19537
19533
  outputCap: "power-meter",
19538
- outputField: "watts",
19534
+ outputField: "power",
19539
19535
  quantity: "power",
19540
19536
  defaultAggregate: "sum",
19541
19537
  empty: "omit",
@@ -19546,7 +19542,7 @@ var GROUP_TEMPLATES = [
19546
19542
  summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
19547
19543
  role: DeviceRole.EnergySensor,
19548
19544
  outputCap: "power-meter",
19549
- outputField: "kwhTotal",
19545
+ outputField: "energy",
19550
19546
  quantity: "energy",
19551
19547
  defaultAggregate: "sum",
19552
19548
  empty: "omit",
@@ -19557,7 +19553,7 @@ var GROUP_TEMPLATES = [
19557
19553
  summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
19558
19554
  role: DeviceRole.BatterySensor,
19559
19555
  outputCap: "battery",
19560
- outputField: "percentage",
19556
+ outputField: "level",
19561
19557
  quantity: "percentage",
19562
19558
  defaultAggregate: "mean",
19563
19559
  empty: "null",
@@ -58036,9 +58032,9 @@ method(object({ nodeId: string().optional() }).optional(), array(AddonListItemSc
58036
58032
  */
58037
58033
  var AirQualitySensorStatusSchema = object({
58038
58034
  /** Carbon dioxide concentration in ppm. */
58039
- co2Ppm: number().min(0).optional().meta(readingMeta("concentration-volume")),
58035
+ co2: number().min(0).optional().meta(readingMeta("concentration-volume")),
58040
58036
  /** Total volatile organic compounds in ppb. */
58041
- vocPpb: number().min(0).optional().meta(readingMeta("concentration-ppb")),
58037
+ voc: number().min(0).optional().meta(readingMeta("concentration-ppb")),
58042
58038
  /** Particulate matter ≤ 2.5 μm in µg/m³. */
58043
58039
  pm25: number().min(0).optional().meta(readingMeta("concentration-mass")),
58044
58040
  /** Particulate matter ≤ 10 μm in µg/m³. */
@@ -58071,12 +58067,12 @@ var airQualitySensorCapability = {
58071
58067
  * History (D850): recorded series.
58072
58068
  */
58073
58069
  history: { fields: {
58074
- co2Ppm: {
58070
+ co2: {
58075
58071
  kind: "gauge",
58076
58072
  unit: "ppm",
58077
58073
  deadband: 5
58078
58074
  },
58079
- vocPpb: {
58075
+ voc: {
58080
58076
  kind: "gauge",
58081
58077
  unit: "ppb",
58082
58078
  deadband: 5
@@ -58107,7 +58103,7 @@ var airQualitySensorCapability = {
58107
58103
  */
58108
58104
  var AmbientLightSensorStatusSchema = object({
58109
58105
  /** Current illuminance in lux (lx). `null` when the sample was refused (D393). */
58110
- lux: number().min(0).nullable().meta(readingMeta("illuminance", {
58106
+ illuminance: number().min(0).nullable().meta(readingMeta("illuminance", {
58111
58107
  precision: 0,
58112
58108
  label: "Illuminance"
58113
58109
  })),
@@ -58136,7 +58132,7 @@ var ambientLightSensorCapability = {
58136
58132
  /**
58137
58133
  * History (D850): recorded series. Wide range, so a RELATIVE deadband (10 %).
58138
58134
  */
58139
- history: { fields: { lux: {
58135
+ history: { fields: { illuminance: {
58140
58136
  kind: "gauge",
58141
58137
  unit: "lx",
58142
58138
  deadbandPct: 10,
@@ -58449,7 +58445,7 @@ var BatteryStatusSchema = object({
58449
58445
  * Consumers must SKIP a null rather than coerce it — `battery-band` already
58450
58446
  * declines to band a non-finite reading, which is the correct shape.
58451
58447
  */
58452
- percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
58448
+ level: number().min(0).max(100).nullable().meta(readingMeta("percentage", { label: "Charge" })),
58453
58449
  /**
58454
58450
  * Charging source. `'dc'` covers wall/USB adapters; `'solar'` is
58455
58451
  * Reolink-specific for the Solar Panel 2 accessory (will become
@@ -58459,7 +58455,7 @@ var BatteryStatusSchema = object({
58459
58455
  * `'unknown'` is the absence of an answer: the provider has not read the
58460
58456
  * power fields yet, or the firmware reported neither. Before it existed,
58461
58457
  * two unreadable fields produced `'none'`, and a camera nobody had reached
58462
- * was drawn "on battery alone" — the same D315 defect `percentage` closed
58458
+ * was drawn "on battery alone" — the same D315 defect `level` closed
58463
58459
  * by going nullable. Consumers SKIP it (no charger state published, no
58464
58460
  * glyph, no HomeKit ChargingState) rather than coerce it either way.
58465
58461
  */
@@ -58483,7 +58479,7 @@ var BatteryStatusSchema = object({
58483
58479
  * that only report charge. A second reading on this cap, not a second
58484
58480
  * `numeric-sensor` on the same device.
58485
58481
  */
58486
- volts: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
58482
+ voltage: number().nullable().optional().meta(readingMeta("voltage", { label: "Voltage" })),
58487
58483
  /**
58488
58484
  * Ms epoch of the last time the device PROVED it was reachable — a
58489
58485
  * completed firmware round-trip, an observed wake, or an inbound push
@@ -58517,7 +58513,7 @@ var BatteryStatusSchema = object({
58517
58513
  /**
58518
58514
  * True when the source is a BINARY low-battery indicator (HA
58519
58515
  * `binary_sensor` device_class=battery / `LOW_BAT`) that has no real
58520
- * charge level — `percentage` is then a coarse stand-in (100 = normal,
58516
+ * charge level — `level` is then a coarse stand-in (100 = normal,
58521
58517
  * sub-threshold = low). UI MUST render "Normal"/"Low" instead of a
58522
58518
  * misleading exact percentage. Absent/false → genuine 0–100 % reading.
58523
58519
  */
@@ -58537,15 +58533,15 @@ var BATTERY_DEVICE_TYPES = [
58537
58533
  var batteryCustomize = {
58538
58534
  version: 1,
58539
58535
  targets: [{
58540
- id: "percentage",
58536
+ id: "level",
58541
58537
  cardinality: "scalar",
58542
58538
  vocabulary: {
58543
58539
  cap: "battery",
58544
- stateField: "percentage"
58540
+ stateField: "level"
58545
58541
  },
58546
58542
  deviceTypes: BATTERY_DEVICE_TYPES,
58547
58543
  apply: "add",
58548
- path: "percentage",
58544
+ path: "level",
58549
58545
  sources: [{
58550
58546
  kind: "field",
58551
58547
  valueKinds: ["number", "string"],
@@ -58639,7 +58635,7 @@ onStatusChanged: { data: object({
58639
58635
  schema: BatteryStatusSchema,
58640
58636
  kind: "push",
58641
58637
  empty: {
58642
- percentage: null,
58638
+ level: null,
58643
58639
  charging: "unknown",
58644
58640
  sleeping: false,
58645
58641
  lastUpdated: 0
@@ -58666,11 +58662,11 @@ onStatusChanged: { data: object({
58666
58662
  * History (D850): recorded series. The generic capture replaces the `battery` series of `pipeline-analytics:stats-5m`.
58667
58663
  */
58668
58664
  history: { fields: {
58669
- percentage: {
58665
+ level: {
58670
58666
  kind: "gauge",
58671
58667
  unit: "%"
58672
58668
  },
58673
- volts: {
58669
+ voltage: {
58674
58670
  kind: "gauge",
58675
58671
  unit: "V"
58676
58672
  }
@@ -58730,14 +58726,14 @@ var binaryCapability = {
58730
58726
  * controls to this single-method surface.
58731
58727
  *
58732
58728
  * The cap is intentionally minimal: a single `setBrightness({deviceId,
58733
- * percentage})` mutation plus the auto-injected `getStatus`. Drivers
58729
+ * level})` mutation plus the auto-injected `getStatus`. Drivers
58734
58730
  * that expose richer controls (color temperature, scenes, schedules)
58735
58731
  * should surface those via the device's `getSettingsUISchema()`
58736
58732
  * instead of bloating this cap.
58737
58733
  */
58738
58734
  var BrightnessStatusSchema = object({
58739
58735
  /** Current level as 0..100 inclusive. Firmware-reported. */
58740
- percentage: number().min(0).max(100).meta(readingMeta("percentage")),
58736
+ level: number().min(0).max(100).meta(readingMeta("percentage")),
58741
58737
  /** Ms epoch of the last operator-driven change. Useful for UI freshness. */
58742
58738
  lastChangedAt: number()
58743
58739
  });
@@ -58749,7 +58745,7 @@ var brightnessCapability = {
58749
58745
  deviceTypes: [DeviceType.Light],
58750
58746
  methods: { setBrightness: method(object({
58751
58747
  deviceId: number().int().nonnegative(),
58752
- percentage: number().min(0).max(100)
58748
+ level: number().min(0).max(100)
58753
58749
  }), _void(), {
58754
58750
  kind: "mutation",
58755
58751
  auth: "protected"
@@ -58762,7 +58758,7 @@ var brightnessCapability = {
58762
58758
  */
58763
58759
  onBrightnessChanged: { data: object({
58764
58760
  deviceId: number(),
58765
- percentage: number().min(0).max(100),
58761
+ level: number().min(0).max(100),
58766
58762
  lastChangedAt: number()
58767
58763
  }) } },
58768
58764
  status: {
@@ -58785,7 +58781,7 @@ onBrightnessChanged: { data: object({
58785
58781
  /**
58786
58782
  * History (D850): recorded series. Actuator tier: level keeps every change.
58787
58783
  */
58788
- history: { fields: { percentage: {
58784
+ history: { fields: { level: {
58789
58785
  kind: "gauge",
58790
58786
  unit: "%",
58791
58787
  minIntervalMs: 0
@@ -59399,11 +59395,11 @@ var ColorInputSchema = discriminatedUnion("mode", [
59399
59395
  }),
59400
59396
  object({
59401
59397
  mode: literal("mired"),
59402
- mireds: number().int().min(50).max(1e3)
59398
+ colorTemperature: number().int().min(50).max(1e3)
59403
59399
  })
59404
59400
  ]);
59405
59401
  var ColorStatusSchema = object({
59406
- /** Active color mode — which of `rgb` / `hsv` / `mireds` reflects
59402
+ /** Active color mode — which of `rgb` / `hsv` / `colorTemperature` reflects
59407
59403
  * the bulb's current state. */
59408
59404
  mode: _enum([
59409
59405
  "rgb",
@@ -59415,7 +59411,7 @@ var ColorStatusSchema = object({
59415
59411
  /** Populated when `mode === 'hsv'`. */
59416
59412
  hsv: HsvTripletSchema.optional(),
59417
59413
  /** Populated when `mode === 'mired'`. */
59418
- mireds: number().int().optional().meta(readingMeta("colour-temperature")),
59414
+ colorTemperature: number().int().optional().meta(readingMeta("colour-temperature")),
59419
59415
  /** Ms epoch of the last operator-driven change. */
59420
59416
  lastChangedAt: number()
59421
59417
  });
@@ -59447,7 +59443,7 @@ onColorChanged: { data: object({
59447
59443
  ]),
59448
59444
  rgb: RgbTripletSchema.optional(),
59449
59445
  hsv: HsvTripletSchema.optional(),
59450
- mireds: number().int().optional(),
59446
+ colorTemperature: number().int().optional(),
59451
59447
  lastChangedAt: number()
59452
59448
  }) } },
59453
59449
  status: {
@@ -60324,11 +60320,11 @@ var DishwasherStatusSchema = object({
60324
60320
  /** Feature keys of the programs the appliance currently offers — drives the UI selector. */
60325
60321
  availablePrograms: array(string()),
60326
60322
  /** Seconds remaining on the active cycle, or null when not running / not known. */
60327
- remainingSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
60323
+ remaining: number().int().nonnegative().nullable().meta(readingMeta("duration")),
60328
60324
  /** Seconds the delayed start is set to (time until the cycle starts), or null. */
60329
- delayedStartSeconds: number().int().nonnegative().nullable().meta(readingMeta("duration")),
60325
+ delayedStart: number().int().nonnegative().nullable().meta(readingMeta("duration")),
60330
60326
  /** Cycle completion 0..100, or null when not applicable. */
60331
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
60327
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
60332
60328
  /** True when the door is reported open; null when the door state is not known. */
60333
60329
  doorOpen: boolean().nullable(),
60334
60330
  /** True when the door is latched (locked) during a cycle; null when not reported. */
@@ -60547,14 +60543,14 @@ var dishwasherCapability = {
60547
60543
  runtimeState: DishwasherStatusSchema,
60548
60544
  durability: "session",
60549
60545
  history: { fields: {
60550
- progressPercent: {
60546
+ progress: {
60551
60547
  kind: "gauge",
60552
60548
  unit: "%",
60553
60549
  deadband: 2
60554
60550
  },
60555
60551
  state: { kind: "enum" },
60556
60552
  operationState: { kind: "enum" },
60557
- remainingSeconds: {
60553
+ remaining: {
60558
60554
  kind: "gauge",
60559
60555
  unit: "s",
60560
60556
  minIntervalMs: 6e4
@@ -61145,7 +61141,7 @@ var FanDirectionSchema = _enum(["forward", "reverse"]);
61145
61141
  var FanControlStatusSchema = object({
61146
61142
  /** Active speed as 0..100 inclusive. Null when the device has no
61147
61143
  * speed surface (single-speed fan). */
61148
- percentage: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
61144
+ speed: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
61149
61145
  /** Speed granularity the device accepts (HA `percentage_step`, e.g. 25 for
61150
61146
  * a 4-speed fan). Absent when unknown — the UI then falls back to step 1. */
61151
61147
  percentageStep: number().positive().optional().meta(readingMeta("percentage")),
@@ -61172,7 +61168,7 @@ var fanControlCapability = {
61172
61168
  methods: {
61173
61169
  setPercentage: method(object({
61174
61170
  deviceId: number().int().nonnegative(),
61175
- percentage: number().min(0).max(100)
61171
+ speed: number().min(0).max(100)
61176
61172
  }), _void(), {
61177
61173
  kind: "mutation",
61178
61174
  auth: "protected"
@@ -61205,7 +61201,7 @@ var fanControlCapability = {
61205
61201
  },
61206
61202
  /**
61207
61203
  * Runtime-state slice — mirrored by the kernel. UI fan speed
61208
- * sliders read `percentage` for live updates.
61204
+ * sliders read `speed` for live updates.
61209
61205
  */
61210
61206
  runtimeState: FanControlStatusSchema,
61211
61207
  /**
@@ -61219,7 +61215,7 @@ var fanControlCapability = {
61219
61215
  * History (D850): recorded series. Actuator tier: speed keeps every change.
61220
61216
  */
61221
61217
  history: { fields: {
61222
- percentage: {
61218
+ speed: {
61223
61219
  kind: "gauge",
61224
61220
  unit: "%",
61225
61221
  minIntervalMs: 0
@@ -61664,7 +61660,7 @@ var humidifierCapability = {
61664
61660
  */
61665
61661
  var HumiditySensorStatusSchema = object({
61666
61662
  /** Current relative humidity, 0..100. `null` when the sample was refused (D393). */
61667
- percent: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
61663
+ humidity: number().min(0).max(100).nullable().meta(readingMeta("humidity", {
61668
61664
  precision: 0,
61669
61665
  label: "Humidity"
61670
61666
  })),
@@ -61693,7 +61689,7 @@ var humiditySensorCapability = {
61693
61689
  /**
61694
61690
  * History (D850): recorded series.
61695
61691
  */
61696
- history: { fields: { percent: {
61692
+ history: { fields: { humidity: {
61697
61693
  kind: "gauge",
61698
61694
  unit: "%",
61699
61695
  deadband: .5
@@ -62333,7 +62329,7 @@ var LawnMowerControlStatusSchema = object({
62333
62329
  batteryLevel: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
62334
62330
  /** 0..100 mowing-completion percentage of the current task, or null when no
62335
62331
  * task is active / progress is unavailable. */
62336
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
62332
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
62337
62333
  /** Current device/event code (dynamic — mostly status, sometimes an error),
62338
62334
  * or null when unknown. */
62339
62335
  currentCode: number().nullable().meta(readingMeta("none")),
@@ -62833,7 +62829,7 @@ var lockControlCapability = {
62833
62829
  volatileStateFields: ["lastChangedAt"]
62834
62830
  };
62835
62831
  /**
62836
- * A monotonic total between resets (D944). Energy uses `power-meter.kwhTotal`
62832
+ * A monotonic total between resets (D944). Energy uses `power-meter.energy`
62837
62833
  * so dashboards keep one series; every other instantaneous reading lands here.
62838
62834
  * `value` is the time integral in the source quantity's accumulated base
62839
62835
  * (base-unit seconds, or kWh on the power meter). `null` is a gap, never zero.
@@ -62927,10 +62923,10 @@ var MediaPlayerStatusSchema = object({
62927
62923
  currentMedia: MediaInfoSchema.nullable(),
62928
62924
  /** Current playback position in ms. Null when not seekable or
62929
62925
  * nothing is playing. Pair with `DeviceFeature.MediaPlayerSeek`. */
62930
- positionMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
62926
+ position: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
62931
62927
  /** Total duration of the current media in ms. Null when unknown
62932
62928
  * (live stream) or nothing is playing. */
62933
- durationMs: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
62929
+ duration: number().int().nonnegative().nullable().meta(readingMeta("duration-ms")),
62934
62930
  /** Shuffle toggle. Null when no shuffle surface.
62935
62931
  * Pair with `DeviceFeature.MediaPlayerShuffle`. */
62936
62932
  shuffle: boolean().nullable(),
@@ -62969,7 +62965,7 @@ var mediaPlayerCapability = {
62969
62965
  }),
62970
62966
  seek: method(object({
62971
62967
  deviceId: number().int().nonnegative(),
62972
- positionMs: number().int().nonnegative()
62968
+ position: number().int().nonnegative()
62973
62969
  }), _void(), {
62974
62970
  kind: "mutation",
62975
62971
  auth: "protected"
@@ -63041,7 +63037,7 @@ var mediaPlayerCapability = {
63041
63037
  /**
63042
63038
  * History (D850): volume (a level an operator or an automation sets; the
63043
63039
  * default 10 s floor folds a slider drag into its end value) and mute.
63044
- * `positionMs` is not recorded: it moves continuously while playing.
63040
+ * `position` is not recorded: it moves continuously while playing.
63045
63041
  */
63046
63042
  history: { fields: {
63047
63043
  volumeLevel: {
@@ -64003,9 +63999,9 @@ var NetworkLinkStatusSchema = object({
64003
63999
  * one whose reading has not landed must not be drawn at 0 %. Consumers
64004
64000
  * SKIP a null rather than coerce it.
64005
64001
  */
64006
- signalPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
64002
+ signal: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
64007
64003
  /** Raw received signal strength in dBm, when the firmware reports one. */
64008
- rssiDbm: number().optional().meta(readingMeta("signal-level")),
64004
+ rssi: number().optional().meta(readingMeta("signal-level")),
64009
64005
  /** Network name of a wireless link, when the firmware reports it. */
64010
64006
  ssid: string().optional(),
64011
64007
  /** Ms epoch of the last observation. Lets consumers reason about freshness. */
@@ -64041,7 +64037,7 @@ onStatusChanged: { data: object({
64041
64037
  kind: "push",
64042
64038
  empty: {
64043
64039
  type: "unknown",
64044
- signalPercent: null,
64040
+ signal: null,
64045
64041
  lastUpdated: 0
64046
64042
  }
64047
64043
  },
@@ -64064,13 +64060,13 @@ onStatusChanged: { data: object({
64064
64060
  * History (D850): recorded series.
64065
64061
  */
64066
64062
  history: { fields: {
64067
- signalPercent: {
64063
+ signal: {
64068
64064
  kind: "gauge",
64069
64065
  unit: "%",
64070
64066
  deadband: 3,
64071
64067
  minIntervalMs: 6e4
64072
64068
  },
64073
- rssiDbm: {
64069
+ rssi: {
64074
64070
  kind: "gauge",
64075
64071
  unit: "dBm",
64076
64072
  deadband: 2,
@@ -65390,16 +65386,16 @@ method(_void(), PlatformCapabilitiesSchema), method(_void(), HardwareInfoSchema)
65390
65386
  * in real-world devices.
65391
65387
  */
65392
65388
  var PowerMeterStatusSchema = object({
65393
- /** Instantaneous power draw in watts. */
65394
- watts: number().optional().meta(readingMeta("power", { label: "Power" })),
65389
+ /** Instantaneous power draw (watts). */
65390
+ power: number().optional().meta(readingMeta("power", { label: "Power" })),
65395
65391
  /** Cumulative energy in kilowatt-hours since the meter was reset. */
65396
- kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
65397
- /** Voltage in volts. */
65398
- volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
65392
+ energy: number().optional().meta(readingMeta("energy", { label: "Energy" })),
65393
+ /** Voltage (volts). */
65394
+ voltage: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
65399
65395
  /** Current in amperes. */
65400
- amps: number().optional().meta(readingMeta("current", { label: "Current" })),
65396
+ current: number().optional().meta(readingMeta("current", { label: "Current" })),
65401
65397
  /** Apparent power in volt-amperes. */
65402
- va: number().optional().meta(readingMeta("apparent-power")),
65398
+ apparentPower: number().optional().meta(readingMeta("apparent-power")),
65403
65399
  /** Power factor (0..1) if reported. */
65404
65400
  powerFactor: number().min(0).max(1).optional().meta(readingMeta("ratio")),
65405
65401
  /** Ms epoch when the slice was last updated. */
@@ -65457,14 +65453,14 @@ function powerTarget(id, unit) {
65457
65453
  advancedExpression: true
65458
65454
  };
65459
65455
  }
65460
- /** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
65456
+ /** "Power and energy" extension: power, energy, voltage and current from other devices (D951). */
65461
65457
  var powerMeterCustomize = {
65462
65458
  version: 1,
65463
65459
  targets: [
65464
- powerTarget("watts", "W"),
65465
- powerTarget("kwhTotal", "kWh"),
65466
- powerTarget("volts", "V"),
65467
- powerTarget("amps", "A")
65460
+ powerTarget("power", "W"),
65461
+ powerTarget("energy", "kWh"),
65462
+ powerTarget("voltage", "V"),
65463
+ powerTarget("current", "A")
65468
65464
  ]
65469
65465
  };
65470
65466
  var powerMeterCapability = {
@@ -65480,41 +65476,41 @@ var powerMeterCapability = {
65480
65476
  },
65481
65477
  runtimeState: PowerMeterStatusSchema,
65482
65478
  /**
65483
- * Runtime-state durability: **restored** — as `numeric-sensor`; `kwhTotal` is an accumulator whose restored value is the baseline.
65479
+ * Runtime-state durability: **restored** — as `numeric-sensor`; `energy` is an accumulator whose restored value is the baseline.
65484
65480
  *
65485
65481
  * See `RuntimeStateDurability`. Enforced by
65486
65482
  * `scripts/check-runtime-state-durability.ts`.
65487
65483
  */
65488
65484
  durability: "restored",
65489
65485
  /**
65490
- * History (D850): recorded series. Gauges are floored at 30 s; `kwhTotal` is the one monotonic meter (counter).
65486
+ * History (D850): recorded series. Gauges are floored at 30 s; `energy` is the one monotonic meter (counter).
65491
65487
  */
65492
65488
  history: { fields: {
65493
- watts: {
65489
+ power: {
65494
65490
  kind: "gauge",
65495
65491
  unit: "W",
65496
65492
  deadband: 1,
65497
65493
  minIntervalMs: 3e4
65498
65494
  },
65499
- kwhTotal: {
65495
+ energy: {
65500
65496
  kind: "counter",
65501
65497
  unit: "kWh",
65502
65498
  deadband: .01,
65503
65499
  minIntervalMs: 6e4
65504
65500
  },
65505
- volts: {
65501
+ voltage: {
65506
65502
  kind: "gauge",
65507
65503
  unit: "V",
65508
65504
  deadband: 1,
65509
65505
  minIntervalMs: 3e4
65510
65506
  },
65511
- amps: {
65507
+ current: {
65512
65508
  kind: "gauge",
65513
65509
  unit: "A",
65514
65510
  deadband: .05,
65515
65511
  minIntervalMs: 3e4
65516
65512
  },
65517
- va: {
65513
+ apparentPower: {
65518
65514
  kind: "gauge",
65519
65515
  unit: "VA",
65520
65516
  deadband: 1,
@@ -65564,9 +65560,6 @@ var PresenceStatusSchema = object({
65564
65560
  location: string().nullable(),
65565
65561
  /** GPS coordinates when available. Null otherwise. */
65566
65562
  gps: GpsLocationSchema.nullable(),
65567
- /** Optional battery level of the tracking device (0..100). Null
65568
- * when not reported. */
65569
- batteryPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
65570
65563
  /** Ms epoch when the slice was last updated. */
65571
65564
  lastChangedAt: number()
65572
65565
  });
@@ -65595,14 +65588,7 @@ var presenceCapability = {
65595
65588
  * `scripts/check-runtime-state-durability.ts`.
65596
65589
  */
65597
65590
  durability: "restored",
65598
- /**
65599
- * History (D850): recorded series.
65600
- */
65601
- history: { fields: { batteryPercent: {
65602
- kind: "gauge",
65603
- unit: "%",
65604
- deadband: 1
65605
- } } },
65591
+ history: "none",
65606
65592
  /** Clock fields: written, but excluded from the compare that decides
65607
65593
  * whether persisting is worth a SQLite commit. */
65608
65594
  volatileStateFields: ["lastChangedAt"]
@@ -65617,7 +65603,7 @@ var presenceCapability = {
65617
65603
  */
65618
65604
  var PressureSensorStatusSchema = object({
65619
65605
  /** Current pressure in hPa. `null` when the sample was refused (D393). */
65620
- hpa: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
65606
+ pressure: number().nullable().meta(readingMeta("pressure", { precision: 0 })),
65621
65607
  /** Ms epoch when the slice was last updated. */
65622
65608
  lastFetchedAt: number()
65623
65609
  });
@@ -65643,7 +65629,7 @@ var pressureSensorCapability = {
65643
65629
  /**
65644
65630
  * History (D850): recorded series.
65645
65631
  */
65646
- history: { fields: { hpa: {
65632
+ history: { fields: { pressure: {
65647
65633
  kind: "gauge",
65648
65634
  unit: "hPa",
65649
65635
  deadband: .1
@@ -69342,7 +69328,7 @@ var tamperCapability = {
69342
69328
  */
69343
69329
  var TemperatureSensorStatusSchema = object({
69344
69330
  /** Current temperature in Celsius. `null` when the sample was refused (D393). */
69345
- celsius: number().nullable().meta(readingMeta("temperature", {
69331
+ temperature: number().nullable().meta(readingMeta("temperature", {
69346
69332
  precision: 1,
69347
69333
  label: "Temperature"
69348
69334
  })),
@@ -69371,7 +69357,7 @@ var temperatureSensorCapability = {
69371
69357
  /**
69372
69358
  * History (D850): recorded series.
69373
69359
  */
69374
- history: { fields: { celsius: {
69360
+ history: { fields: { temperature: {
69375
69361
  kind: "gauge",
69376
69362
  unit: "°C",
69377
69363
  deadband: .1
@@ -69668,7 +69654,7 @@ var VacuumControlStatusSchema = object({
69668
69654
  /** Speed tokens the hardware accepts — drives the UI selector. */
69669
69655
  availableFanSpeeds: array(string()),
69670
69656
  /** 0..100 cleaning-completion percentage of the current task, or null. */
69671
- progressPercent: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
69657
+ progress: number().min(0).max(100).nullable().meta(readingMeta("percentage")),
69672
69658
  /** Current error code (0 / null = no error). */
69673
69659
  errorCode: number().nullable().meta(readingMeta("none")),
69674
69660
  /** Human label for {@link errorCode}, or null when none / undecodable. */
@@ -71322,7 +71308,7 @@ var BaseDevice = class {
71322
71308
  * `device-local-state.ts`. Drivers access via:
71323
71309
  *
71324
71310
  * `this.state.battery.sleeping = true` // patches the battery slice
71325
- * `const pct = this.state.battery.percentage` // reads the battery slice
71311
+ * `const pct = this.state.battery.level` // reads the battery slice
71326
71312
  * `this.state.deviceStatus.online = true` // mirrors `markOnline(true)`
71327
71313
  *
71328
71314
  * Adding a new cap with `runtimeState:` automatically extends this
@@ -71362,7 +71348,7 @@ var BaseDevice = class {
71362
71348
  * shape; drivers don't redeclare it, they just write through.
71363
71349
  *
71364
71350
  * Read: `this.runtimeState.getCapState('battery')` →
71365
- * `{percentage, charging, sleeping, lastUpdated}` for any
71351
+ * `{level, charging, sleeping, lastUpdated}` for any
71366
71352
  * provider that registers `batteryCapability`.
71367
71353
  * Write: `this.runtimeState.setCapState('battery', { … })`.
71368
71354
  *
@@ -82565,7 +82551,7 @@ var ACTUATOR_CAP_VOCABULARY = {
82565
82551
  label: t("Full brightness", "Luminosità massima"),
82566
82552
  phrase: t("Set {device} to full brightness", "Porta {device} alla massima luminosità"),
82567
82553
  icon: "sun",
82568
- args: { percentage: 100 }
82554
+ args: { level: 100 }
82569
82555
  },
82570
82556
  {
82571
82557
  id: "brightness.half",
@@ -82573,7 +82559,7 @@ var ACTUATOR_CAP_VOCABULARY = {
82573
82559
  label: t("Half brightness", "Luminosità a metà"),
82574
82560
  phrase: t("Dim {device} to half", "Abbassa {device} a metà luminosità"),
82575
82561
  icon: "sun-dim",
82576
- args: { percentage: 50 }
82562
+ args: { level: 50 }
82577
82563
  },
82578
82564
  {
82579
82565
  id: "brightness.off",
@@ -82581,16 +82567,16 @@ var ACTUATOR_CAP_VOCABULARY = {
82581
82567
  label: t("Brightness off", "Luminosità a zero"),
82582
82568
  phrase: t("Dim {device} to zero", "Abbassa {device} a zero"),
82583
82569
  icon: "lightbulb-off",
82584
- args: { percentage: 0 }
82570
+ args: { level: 0 }
82585
82571
  },
82586
82572
  {
82587
82573
  id: "brightness.set",
82588
82574
  method: "setBrightness",
82589
82575
  label: t("Set brightness", "Imposta la luminosità"),
82590
- phrase: t("Set the brightness of {device} to {percentage}", "Imposta la luminosità di {device} a {percentage}"),
82576
+ phrase: t("Set the brightness of {device} to {level}", "Imposta la luminosità di {device} a {level}"),
82591
82577
  icon: "sun-medium",
82592
82578
  openArgs: [{
82593
- key: "percentage",
82579
+ key: "level",
82594
82580
  label: PERCENT,
82595
82581
  offer: {
82596
82582
  kind: "number",
@@ -82604,13 +82590,13 @@ var ACTUATOR_CAP_VOCABULARY = {
82604
82590
  ],
82605
82591
  state: [{
82606
82592
  kind: "numeric",
82607
- field: "percentage",
82593
+ field: "level",
82608
82594
  quantity: t("the brightness", "la luminosità"),
82609
82595
  label: t("Brightness", "Luminosità"),
82610
82596
  unit: "%",
82611
82597
  icon: "sun"
82612
82598
  }],
82613
- events: { onBrightnessChanged: { notOperatorFacing: "the `percentage` state trigger reads the same change" } }
82599
+ events: { onBrightnessChanged: { notOperatorFacing: "the `level` state trigger reads the same change" } }
82614
82600
  },
82615
82601
  color: {
82616
82602
  scope: "device",
@@ -82624,7 +82610,7 @@ var ACTUATOR_CAP_VOCABULARY = {
82624
82610
  icon: "sun",
82625
82611
  args: { color: {
82626
82612
  mode: "mired",
82627
- mireds: 370
82613
+ colorTemperature: 370
82628
82614
  } }
82629
82615
  },
82630
82616
  {
@@ -82635,7 +82621,7 @@ var ACTUATOR_CAP_VOCABULARY = {
82635
82621
  icon: "snowflake",
82636
82622
  args: { color: {
82637
82623
  mode: "mired",
82638
- mireds: 200
82624
+ colorTemperature: 200
82639
82625
  } }
82640
82626
  },
82641
82627
  {
@@ -83249,7 +83235,7 @@ var ACTUATOR_CAP_VOCABULARY = {
83249
83235
  label: t("Fan off", "Ventilatore spento"),
83250
83236
  phrase: t("Stop {device}", "Ferma {device}"),
83251
83237
  icon: "power-off",
83252
- args: { percentage: 0 }
83238
+ args: { speed: 0 }
83253
83239
  },
83254
83240
  {
83255
83241
  id: "fan.full",
@@ -83257,16 +83243,16 @@ var ACTUATOR_CAP_VOCABULARY = {
83257
83243
  label: t("Fan full", "Ventilatore al massimo"),
83258
83244
  phrase: t("Run {device} at full speed", "Porta {device} alla massima velocità"),
83259
83245
  icon: "fan",
83260
- args: { percentage: 100 }
83246
+ args: { speed: 100 }
83261
83247
  },
83262
83248
  {
83263
83249
  id: "fan.speed",
83264
83250
  method: "setPercentage",
83265
83251
  label: t("Set speed", "Imposta la velocità"),
83266
- phrase: t("Set the speed of {device} to {percentage}", "Imposta la velocità di {device} al {percentage}"),
83252
+ phrase: t("Set the speed of {device} to {speed}", "Imposta la velocità di {device} al {speed}"),
83267
83253
  icon: "fan",
83268
83254
  openArgs: [{
83269
- key: "percentage",
83255
+ key: "speed",
83270
83256
  label: t("Speed", "Velocità"),
83271
83257
  offer: {
83272
83258
  kind: "number",
@@ -83328,7 +83314,7 @@ var ACTUATOR_CAP_VOCABULARY = {
83328
83314
  ],
83329
83315
  state: [{
83330
83316
  kind: "numeric",
83331
- field: "percentage",
83317
+ field: "speed",
83332
83318
  quantity: t("the speed", "la velocità"),
83333
83319
  label: t("Speed", "Velocità"),
83334
83320
  unit: "%",
@@ -84126,7 +84112,7 @@ var APPLIANCE_CAP_VOCABULARY = {
84126
84112
  },
84127
84113
  {
84128
84114
  kind: "numeric",
84129
- field: "progressPercent",
84115
+ field: "progress",
84130
84116
  quantity: t("the cycle progress", "l’avanzamento del lavaggio"),
84131
84117
  label: t("Progress", "Avanzamento"),
84132
84118
  unit: "%",
@@ -84484,10 +84470,10 @@ var APPLIANCE_CAP_VOCABULARY = {
84484
84470
  id: "media.seek",
84485
84471
  method: "seek",
84486
84472
  label: t("Seek", "Vai al punto"),
84487
- phrase: t("Move {device} to {positionMs}", "Porta {device} al punto {positionMs}"),
84473
+ phrase: t("Move {device} to {position}", "Porta {device} al punto {position}"),
84488
84474
  icon: "fast-forward",
84489
84475
  openArgs: [{
84490
- key: "positionMs",
84476
+ key: "position",
84491
84477
  label: t("Position", "Posizione"),
84492
84478
  offer: {
84493
84479
  kind: "number",
@@ -85536,7 +85522,7 @@ var SENSOR_CAP_VOCABULARY = {
85536
85522
  state: [
85537
85523
  {
85538
85524
  kind: "numeric",
85539
- field: "co2Ppm",
85525
+ field: "co2",
85540
85526
  quantity: t("the CO₂", "la CO₂"),
85541
85527
  label: t("CO₂", "CO₂"),
85542
85528
  unit: "ppm",
@@ -85544,7 +85530,7 @@ var SENSOR_CAP_VOCABULARY = {
85544
85530
  },
85545
85531
  {
85546
85532
  kind: "numeric",
85547
- field: "vocPpb",
85533
+ field: "voc",
85548
85534
  quantity: t("the VOC level", "il livello di COV"),
85549
85535
  label: t("VOC", "COV"),
85550
85536
  unit: "ppb",
@@ -85580,7 +85566,7 @@ var SENSOR_CAP_VOCABULARY = {
85580
85566
  noun: t("Light level", "Luminosità ambiente"),
85581
85567
  state: [{
85582
85568
  kind: "numeric",
85583
- field: "lux",
85569
+ field: "illuminance",
85584
85570
  quantity: t("the light level", "la luminosità"),
85585
85571
  label: t("Illuminance", "Illuminamento"),
85586
85572
  unit: "lx",
@@ -85783,7 +85769,7 @@ var SENSOR_CAP_VOCABULARY = {
85783
85769
  noun: t("Humidity", "Umidità"),
85784
85770
  state: [{
85785
85771
  kind: "numeric",
85786
- field: "percent",
85772
+ field: "humidity",
85787
85773
  quantity: t("the humidity", "l’umidità"),
85788
85774
  label: t("Humidity", "Umidità"),
85789
85775
  unit: "%",
@@ -85831,7 +85817,7 @@ var SENSOR_CAP_VOCABULARY = {
85831
85817
  state: [
85832
85818
  {
85833
85819
  kind: "numeric",
85834
- field: "watts",
85820
+ field: "power",
85835
85821
  quantity: t("the power draw", "il consumo"),
85836
85822
  label: t("Power", "Potenza"),
85837
85823
  unit: "W",
@@ -85839,7 +85825,7 @@ var SENSOR_CAP_VOCABULARY = {
85839
85825
  },
85840
85826
  {
85841
85827
  kind: "numeric",
85842
- field: "kwhTotal",
85828
+ field: "energy",
85843
85829
  quantity: t("the energy used", "l’energia consumata"),
85844
85830
  label: t("Energy", "Energia"),
85845
85831
  unit: "kWh",
@@ -85847,7 +85833,7 @@ var SENSOR_CAP_VOCABULARY = {
85847
85833
  },
85848
85834
  {
85849
85835
  kind: "numeric",
85850
- field: "volts",
85836
+ field: "voltage",
85851
85837
  quantity: t("the voltage", "la tensione"),
85852
85838
  label: t("Voltage", "Tensione"),
85853
85839
  unit: "V",
@@ -85855,7 +85841,7 @@ var SENSOR_CAP_VOCABULARY = {
85855
85841
  },
85856
85842
  {
85857
85843
  kind: "numeric",
85858
- field: "amps",
85844
+ field: "current",
85859
85845
  quantity: t("the current", "la corrente"),
85860
85846
  label: t("Current", "Corrente"),
85861
85847
  unit: "A",
@@ -85872,13 +85858,6 @@ var SENSOR_CAP_VOCABULARY = {
85872
85858
  label: t("Where", "Posizione"),
85873
85859
  phrase: t("When {device} is at {value}", "Quando {device} è in {value}"),
85874
85860
  icon: "map-pin"
85875
- }, {
85876
- kind: "numeric",
85877
- field: "batteryPercent",
85878
- quantity: t("the phone battery", "la batteria del telefono"),
85879
- label: t("Battery", "Batteria"),
85880
- unit: "%",
85881
- icon: "battery"
85882
85861
  }]
85883
85862
  },
85884
85863
  "pressure-sensor": {
@@ -85886,7 +85865,7 @@ var SENSOR_CAP_VOCABULARY = {
85886
85865
  noun: t("Pressure", "Pressione"),
85887
85866
  state: [{
85888
85867
  kind: "numeric",
85889
- field: "hpa",
85868
+ field: "pressure",
85890
85869
  quantity: t("the pressure", "la pressione"),
85891
85870
  label: t("Pressure", "Pressione"),
85892
85871
  unit: "hPa",
@@ -85922,7 +85901,7 @@ var SENSOR_CAP_VOCABULARY = {
85922
85901
  noun: t("Temperature", "Temperatura"),
85923
85902
  state: [{
85924
85903
  kind: "numeric",
85925
- field: "celsius",
85904
+ field: "temperature",
85926
85905
  quantity: t("the temperature", "la temperatura"),
85927
85906
  label: t("Temperature", "Temperatura"),
85928
85907
  unit: "°C",
@@ -85993,7 +85972,7 @@ var SENSOR_CAP_VOCABULARY = {
85993
85972
  state: [
85994
85973
  {
85995
85974
  kind: "numeric",
85996
- field: "percentage",
85975
+ field: "level",
85997
85976
  quantity: t("the battery level", "il livello della batteria"),
85998
85977
  label: t("Battery", "Batteria"),
85999
85978
  unit: "%",
@@ -86035,7 +86014,7 @@ var SENSOR_CAP_VOCABULARY = {
86035
86014
  icon: "battery-charging"
86036
86015
  }
86037
86016
  ],
86038
- events: { onStatusChanged: { notOperatorFacing: "the percentage / sleeping / charging state triggers each read one field of this change" } },
86017
+ events: { onStatusChanged: { notOperatorFacing: "the level / sleeping / charging state triggers each read one field of this change" } },
86039
86018
  extraEvents: [{
86040
86019
  category: EventCategory.DeviceAwake,
86041
86020
  label: t("Woke up", "Risvegliato"),
@@ -86053,7 +86032,7 @@ var SENSOR_CAP_VOCABULARY = {
86053
86032
  noun: t("Network link", "Collegamento di rete"),
86054
86033
  state: [{
86055
86034
  kind: "numeric",
86056
- field: "signalPercent",
86035
+ field: "signal",
86057
86036
  quantity: t("the signal strength", "l’intensità del segnale"),
86058
86037
  label: t("Signal", "Segnale"),
86059
86038
  unit: "%",
@@ -132765,6 +132744,40 @@ var ALEXA_API_USER_AGENT_POSTFIX = `AlexaRemote/${{
132765
132744
  readmeFilename: "readme.md"
132766
132745
  }.version}`;
132767
132746
  //#endregion
132747
+ //#region src/alexa-proxy-trace.ts
132748
+ /**
132749
+ * Sanitised one-line trace of the alexa-cookie2 proxy's own log lines.
132750
+ *
132751
+ * alexa-cookie2 logs every step it takes (routing, upstream request, redirect),
132752
+ * but its lines also carry headers, cookies and query values. This keeps only
132753
+ * what diagnoses a failed login: the method, the path or upstream host, and the
132754
+ * redirect target — always WITHOUT a query string or fragment. Any line that is
132755
+ * not one of the known step lines yields `null` and is never traced.
132756
+ */
132757
+ var ROUTER_RE = /^Router: (\S+) \/ ([A-Z]+) \//;
132758
+ var PROXY_REQUEST_RE = /^Alexa-Cookie: Proxy-Request: ([A-Z]+) (\S+)$/;
132759
+ var PROXY_RESPONSE_RE = /^Alexa-Cookie: Proxy Response from Host: (\S+)$/;
132760
+ var REDIRECT_ORIGINAL_RE = /^Redirect: Original Location ----> (\S+)$/;
132761
+ var REDIRECT_FINAL_RE = /^Redirect: Final Location ----> (\S+)$/;
132762
+ /** Cut a URL or path at its query string or fragment. */
132763
+ function stripQuery(target) {
132764
+ const cut = target.search(/[?#]/);
132765
+ return cut === -1 ? target : target.slice(0, cut);
132766
+ }
132767
+ function sanitizeProxyTraceLine(line) {
132768
+ const router = ROUTER_RE.exec(line);
132769
+ if (router !== null) return `router ${router[2]} ${stripQuery(router[1] ?? "")}`;
132770
+ const request = PROXY_REQUEST_RE.exec(line);
132771
+ if (request !== null) return `proxy-request ${request[1]} ${stripQuery(request[2] ?? "")}`;
132772
+ const response = PROXY_RESPONSE_RE.exec(line);
132773
+ if (response !== null) return `proxy-response host=${response[1]}`;
132774
+ const original = REDIRECT_ORIGINAL_RE.exec(line);
132775
+ if (original !== null) return `redirect-original ${stripQuery(original[1] ?? "")}`;
132776
+ const final = REDIRECT_FINAL_RE.exec(line);
132777
+ if (final !== null) return `redirect-final ${stripQuery(final[1] ?? "")}`;
132778
+ return null;
132779
+ }
132780
+ //#endregion
132768
132781
  //#region src/alexa-proxy-login.ts
132769
132782
  /**
132770
132783
  * INTERACTIVE Amazon login via `alexa-remote2`'s built-in proxy auth mode, behind the
@@ -132875,6 +132888,11 @@ var AlexaProxyLoginSession = class {
132875
132888
  apiUserAgentPostfix: ALEXA_API_USER_AGENT_POSTFIX,
132876
132889
  logger: (...args) => {
132877
132890
  const line = args.map(String).join(" ");
132891
+ const trace = sanitizeProxyTraceLine(line);
132892
+ if (trace !== null) {
132893
+ this.#logger.info(`alexa proxy-login: ${trace}`, { meta: { sessionId: this.#opts.sessionId } });
132894
+ return;
132895
+ }
132878
132896
  if (SECRET_LINE_RE.test(line)) return;
132879
132897
  this.#logger.debug("alexa proxy-login", { meta: {
132880
132898
  sessionId: this.#opts.sessionId,
@@ -132936,7 +132954,10 @@ var AlexaProxyLoginSession = class {
132936
132954
  if (isProxyReadyError(err)) {
132937
132955
  if (this.#phase === "starting") {
132938
132956
  this.#phase = "awaiting-login";
132939
- this.#logger.info("alexa proxy-login: proxy ready — awaiting Amazon login", { meta: { sessionId: this.#opts.sessionId } });
132957
+ this.#logger.info("alexa proxy-login: proxy ready — awaiting Amazon login", { meta: {
132958
+ sessionId: this.#opts.sessionId,
132959
+ amazonDomain: this.#opts.amazonDomain
132960
+ } });
132940
132961
  }
132941
132962
  return;
132942
132963
  }
@@ -134768,7 +134789,7 @@ var KNOWN_CAPS = new Set([
134768
134789
  * {@link alexaAccounts}; each `getStatus` prefers the latest decoded live value
134769
134790
  * (via `alexa-state-to-cap`) and falls back to the runtime/cold slice when a
134770
134791
  * property hasn't been polled yet — e.g. PowerController.powerState 'ON' →
134771
- * switch.on, BrightnessController.brightness 0..100 → brightness.percentage,
134792
+ * switch.on, BrightnessController.brightness 0..100 → brightness.level,
134772
134793
  * ContactSensor.detectionState 'DETECTED' → contact.entryOpen.
134773
134794
  *
134774
134795
  * TODO(caps): 'climate-control' (ThermostatController), 'control'
@@ -134852,7 +134873,7 @@ var AlexaDevice = class extends BaseDevice {
134852
134873
  }
134853
134874
  registerBrightness() {
134854
134875
  const COLD = {
134855
- percentage: 0,
134876
+ level: 0,
134856
134877
  lastChangedAt: 0
134857
134878
  };
134858
134879
  this.ctx.registerNativeCap(brightnessCapability, {
@@ -134861,14 +134882,14 @@ var AlexaDevice = class extends BaseDevice {
134861
134882
  const live = decodePercentage(this.liveState("Alexa.BrightnessController", "brightness"));
134862
134883
  return live === null ? cached : {
134863
134884
  ...cached,
134864
- percentage: live
134885
+ level: live
134865
134886
  };
134866
134887
  },
134867
- setBrightness: async ({ percentage }) => {
134888
+ setBrightness: async ({ level: percentage }) => {
134868
134889
  const brightness = Math.round(Math.max(0, Math.min(100, percentage)));
134869
134890
  await this.command("Alexa.BrightnessController", "SetBrightness", { brightness });
134870
134891
  this.runtimeState.setCapState("brightness", {
134871
- percentage,
134892
+ level: percentage,
134872
134893
  lastChangedAt: Date.now()
134873
134894
  });
134874
134895
  }
@@ -135022,7 +135043,7 @@ var AlexaDevice = class extends BaseDevice {
135022
135043
  }
135023
135044
  registerTemperatureSensor() {
135024
135045
  const COLD = {
135025
- celsius: 0,
135046
+ temperature: 0,
135026
135047
  lastFetchedAt: 0
135027
135048
  };
135028
135049
  this.ctx.registerNativeCap(temperatureSensorCapability, { getStatus: async () => {
@@ -135030,14 +135051,14 @@ var AlexaDevice = class extends BaseDevice {
135030
135051
  const live = decodeTemperatureCelsius(this.liveState("Alexa.TemperatureSensor", "temperature"));
135031
135052
  return live === null ? cached : {
135032
135053
  ...cached,
135033
- celsius: live
135054
+ temperature: live
135034
135055
  };
135035
135056
  } });
135036
135057
  this.runtimeState.setCapState("temperature-sensor", COLD);
135037
135058
  }
135038
135059
  registerHumiditySensor() {
135039
135060
  const COLD = {
135040
- percent: 0,
135061
+ humidity: 0,
135041
135062
  lastFetchedAt: 0
135042
135063
  };
135043
135064
  this.ctx.registerNativeCap(humiditySensorCapability, { getStatus: async () => {
@@ -135045,7 +135066,7 @@ var AlexaDevice = class extends BaseDevice {
135045
135066
  const live = decodeHumidityPercent(this.liveState("Alexa.HumiditySensor", "humidity"));
135046
135067
  return live === null ? cached : {
135047
135068
  ...cached,
135048
- percent: live
135069
+ humidity: live
135049
135070
  };
135050
135071
  } });
135051
135072
  this.runtimeState.setCapState("humidity-sensor", COLD);