@camstack/addon-provider-bosch 0.1.55 → 0.1.56

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.
@@ -23844,19 +23844,43 @@ var DEVICE_TEMPLATE_CATALOGUE_CATEGORIES = [
23844
23844
  "loop",
23845
23845
  "variable"
23846
23846
  ];
23847
+ var DEVICE_TEMPLATE_PARAM_TYPES = [
23848
+ "string",
23849
+ "number",
23850
+ "boolean"
23851
+ ];
23852
+ /**
23853
+ * Where the values a parameter takes come from, when a fixed set makes sense.
23854
+ * `units-of-field` is the units in the dimension of the piped field's unit;
23855
+ * `choices` is a named list (a time pattern); `range` is the numbers
23856
+ * `min…max` by `step`. An absent source means free input.
23857
+ */
23858
+ var deviceTemplateParamValuesSchemaValue = discriminatedUnion("kind", [
23859
+ object({ kind: literal("units-of-field") }),
23860
+ object({
23861
+ kind: literal("choices"),
23862
+ options: array(object({
23863
+ value: string(),
23864
+ labelKey: string().min(1)
23865
+ })).min(1)
23866
+ }),
23867
+ object({
23868
+ kind: literal("range"),
23869
+ min: number$1(),
23870
+ max: number$1(),
23871
+ step: number$1().positive()
23872
+ })
23873
+ ]);
23847
23874
  var deviceTemplateParamSchema = object({
23848
23875
  name: string().min(1),
23849
- type: _enum([
23850
- "string",
23851
- "number",
23852
- "boolean"
23853
- ]),
23876
+ type: _enum(DEVICE_TEMPLATE_PARAM_TYPES),
23854
23877
  optional: boolean(),
23855
23878
  default: union([
23856
23879
  string(),
23857
23880
  number$1(),
23858
23881
  boolean()
23859
- ]).optional()
23882
+ ]).optional(),
23883
+ values: deviceTemplateParamValuesSchemaValue.optional()
23860
23884
  });
23861
23885
  object({
23862
23886
  name: string().min(1),
@@ -23866,8 +23890,8 @@ object({
23866
23890
  descriptionKey: string().min(1),
23867
23891
  exampleKey: string().min(1)
23868
23892
  });
23869
- function param(name, type, optional, fallback) {
23870
- return fallback === void 0 ? {
23893
+ function param(name, type, optional, fallback, values) {
23894
+ const base = fallback === void 0 ? {
23871
23895
  name,
23872
23896
  type,
23873
23897
  optional
@@ -23877,6 +23901,10 @@ function param(name, type, optional, fallback) {
23877
23901
  optional,
23878
23902
  default: fallback
23879
23903
  };
23904
+ return values === void 0 ? base : {
23905
+ ...base,
23906
+ values
23907
+ };
23880
23908
  }
23881
23909
  function entry(name, kind, category, params) {
23882
23910
  return {
@@ -23888,12 +23916,71 @@ function entry(name, kind, category, params) {
23888
23916
  exampleKey: `uiLibrary.deviceTemplateCatalogue.${name}.example`
23889
23917
  };
23890
23918
  }
23891
- var DIGITS = param("digits", "number", true, 0);
23919
+ var DIGITS = param("digits", "number", true, 0, {
23920
+ kind: "range",
23921
+ min: 0,
23922
+ max: 4,
23923
+ step: 1
23924
+ });
23925
+ var UNITS_OF_FIELD = { kind: "units-of-field" };
23926
+ /** Named time patterns: the engine's tokens are `YYYY MM DD HH mm ss`. */
23927
+ var TIME_PATTERNS = [
23928
+ [
23929
+ "hm",
23930
+ "HH:mm",
23931
+ "Hours and minutes (14:05)",
23932
+ "Ore e minuti (14:05)"
23933
+ ],
23934
+ [
23935
+ "hms",
23936
+ "HH:mm:ss",
23937
+ "Hours, minutes, seconds (14:05:09)",
23938
+ "Ore, minuti, secondi (14:05:09)"
23939
+ ],
23940
+ [
23941
+ "dm",
23942
+ "DD/MM",
23943
+ "Day and month (31/12)",
23944
+ "Giorno e mese (31/12)"
23945
+ ],
23946
+ [
23947
+ "dmy",
23948
+ "DD/MM/YYYY",
23949
+ "Day, month, year (31/12/2026)",
23950
+ "Giorno, mese, anno (31/12/2026)"
23951
+ ],
23952
+ [
23953
+ "dmyhm",
23954
+ "DD/MM/YYYY HH:mm",
23955
+ "Date and time (31/12/2026 14:05)",
23956
+ "Data e ora (31/12/2026 14:05)"
23957
+ ],
23958
+ [
23959
+ "iso",
23960
+ "YYYY-MM-DD",
23961
+ "ISO date (2026-12-31)",
23962
+ "Data ISO (2026-12-31)"
23963
+ ],
23964
+ [
23965
+ "isohms",
23966
+ "YYYY-MM-DD HH:mm:ss",
23967
+ "ISO date and time (2026-12-31 14:05:09)",
23968
+ "Data e ora ISO (2026-12-31 14:05:09)"
23969
+ ]
23970
+ ];
23971
+ var TIME_PATTERN_KEY = (id) => `uiLibrary.deviceTemplateCatalogue.choice.time.${id}`;
23972
+ var TIME_PATTERN_VALUES = {
23973
+ kind: "choices",
23974
+ options: TIME_PATTERNS.map(([id, pattern]) => ({
23975
+ value: pattern,
23976
+ labelKey: TIME_PATTERN_KEY(id)
23977
+ }))
23978
+ };
23892
23979
  var FALLBACK_TEXT = param("fallback", "string", false);
23893
23980
  var FALSY = param("falsy", "boolean", true, false);
23894
23981
  /** Every name the engine allows, in the order operators meet them. */
23895
23982
  var DEVICE_TEMPLATE_CATALOGUE = [
23896
- entry("unit", "filter", "unit", [param("symbol", "string", false), param("from", "string", true)]),
23983
+ entry("unit", "filter", "unit", [param("symbol", "string", false, void 0, UNITS_OF_FIELD), param("from", "string", true, void 0, UNITS_OF_FIELD)]),
23897
23984
  entry("round", "filter", "number", [DIGITS]),
23898
23985
  entry("trunc", "filter", "number", [DIGITS]),
23899
23986
  entry("onoff", "filter", "state", []),
@@ -23929,7 +24016,7 @@ var DEVICE_TEMPLATE_CATALOGUE = [
23929
24016
  param("killwords", "boolean", true, false),
23930
24017
  param("end", "string", true, "…")
23931
24018
  ]),
23932
- entry("time", "filter", "time", [param("pattern", "string", false)]),
24019
+ entry("time", "filter", "time", [param("pattern", "string", false, void 0, TIME_PATTERN_VALUES)]),
23933
24020
  entry("range", "global", "loop", [
23934
24021
  param("stop", "number", false),
23935
24022
  param("start", "number", true, 0),
@@ -24097,6 +24184,10 @@ function buildText() {
24097
24184
  it: row.example[1]
24098
24185
  };
24099
24186
  }
24187
+ for (const [id, , en, it] of TIME_PATTERNS) out[TIME_PATTERN_KEY(id)] = {
24188
+ en,
24189
+ it
24190
+ };
24100
24191
  return out;
24101
24192
  }
24102
24193
  buildText();
@@ -24271,6 +24362,18 @@ var RequiredAddonUpdateSchema = object({
24271
24362
  /** What this node has; `null` when the addon is not installed. */
24272
24363
  installed: string().nullable()
24273
24364
  });
24365
+ /**
24366
+ * The admin page of an integration: `/integrations/<addonId>`, with the instance named in
24367
+ * `?instance=<integrationId>`. The one builder of that address — an addon that links to its own
24368
+ * integration page (an alert action, a notification) uses this instead of spelling the route.
24369
+ */
24370
+ /** The query parameter that names the instance on the integration page. */
24371
+ var INTEGRATION_INSTANCE_PARAM = "instance";
24372
+ /** `/integrations/<addonId>`, with `?instance=<integrationId>` when an instance is given. */
24373
+ function integrationPageHref(addonId, integrationId) {
24374
+ const base = `/integrations/${encodeURIComponent(addonId)}`;
24375
+ return integrationId === void 0 || integrationId.length === 0 ? base : `${base}?${INTEGRATION_INSTANCE_PARAM}=${encodeURIComponent(integrationId)}`;
24376
+ }
24274
24377
  var SESSION_LOST_ALERT_CATEGORY = "integration.session-lost";
24275
24378
  var SESSION_EPISODE_KEY = "session-lost";
24276
24379
  var REASON_TEXT = {
@@ -24294,7 +24397,7 @@ function buildSessionLostAlert(input) {
24294
24397
  message: `${input.integrationName} lost its ${input.providerName} session: ${REASON_TEXT[input.reason]}.`,
24295
24398
  action: input.action ?? {
24296
24399
  label: "Open integration",
24297
- href: `/integrations/${encodeURIComponent(input.integrationId)}`
24400
+ href: input.addonId !== void 0 ? integrationPageHref(input.addonId, input.integrationId) : "/integrations"
24298
24401
  },
24299
24402
  status: "active",
24300
24403
  read: false,
@@ -24413,6 +24516,8 @@ var SessionHealthTracker = class {
24413
24516
  integrationId,
24414
24517
  integrationName: entry.info.integrationName,
24415
24518
  reason: entry.info.reason,
24519
+ ...this.#opts.addonId !== void 0 ? { addonId: this.#opts.addonId } : {},
24520
+ ...this.#opts.severity !== void 0 ? { severity: this.#opts.severity } : {},
24416
24521
  ...entry.info.action !== void 0 ? { action: entry.info.action } : {}
24417
24522
  }));
24418
24523
  entry.phase = "alerted";
@@ -52471,11 +52576,13 @@ var airQualitySensorCapability = {
52471
52576
  deadband: 5
52472
52577
  },
52473
52578
  pm25: {
52579
+ group: "particulates",
52474
52580
  kind: "gauge",
52475
52581
  unit: "µg/m³",
52476
52582
  deadband: 1
52477
52583
  },
52478
52584
  pm10: {
52585
+ group: "particulates",
52479
52586
  kind: "gauge",
52480
52587
  unit: "µg/m³",
52481
52588
  deadband: 1
@@ -56441,33 +56548,41 @@ var climateControlCapability = {
56441
56548
  /**
56442
56549
  * History (D850): recorded series. Celsius by contract; setpoints keep every change (`minIntervalMs: 0`).
56443
56550
  */
56444
- history: { fields: {
56445
- currentTemp: {
56446
- kind: "gauge",
56447
- unit: "°C",
56448
- deadband: .1
56449
- },
56450
- currentHumidity: {
56451
- kind: "gauge",
56452
- unit: "%",
56453
- deadband: .5
56454
- },
56455
- target: {
56456
- kind: "gauge",
56457
- unit: "°C",
56458
- minIntervalMs: 0
56459
- },
56460
- targetHigh: {
56461
- kind: "gauge",
56462
- unit: "°C",
56463
- minIntervalMs: 0
56464
- },
56465
- targetLow: {
56466
- kind: "gauge",
56467
- unit: "°C",
56468
- minIntervalMs: 0
56551
+ history: {
56552
+ primary: "currentTemp",
56553
+ priority: 70,
56554
+ fields: {
56555
+ currentTemp: {
56556
+ group: "temperature",
56557
+ kind: "gauge",
56558
+ unit: "°C",
56559
+ deadband: .1
56560
+ },
56561
+ currentHumidity: {
56562
+ kind: "gauge",
56563
+ unit: "%",
56564
+ deadband: .5
56565
+ },
56566
+ target: {
56567
+ group: "temperature",
56568
+ kind: "gauge",
56569
+ unit: "°C",
56570
+ minIntervalMs: 0
56571
+ },
56572
+ targetHigh: {
56573
+ group: "target-range",
56574
+ kind: "gauge",
56575
+ unit: "°C",
56576
+ minIntervalMs: 0
56577
+ },
56578
+ targetLow: {
56579
+ group: "target-range",
56580
+ kind: "gauge",
56581
+ unit: "°C",
56582
+ minIntervalMs: 0
56583
+ }
56469
56584
  }
56470
- } },
56585
+ },
56471
56586
  vocabulary: {
56472
56587
  noun: t("Climate", "Clima"),
56473
56588
  order: 1070,
@@ -59124,6 +59239,36 @@ function actuator(input) {
59124
59239
  }
59125
59240
  new Map(GROUP_TEMPLATES.map((template) => [template.id, template]));
59126
59241
  DeviceType.Camera;
59242
+ /**
59243
+ * The series a device card trends, per cap (`history.primary` + `history.priority`):
59244
+ * 6 caps. The card shows the primary of the enabled cap with the highest priority.
59245
+ */
59246
+ var HISTORY_PRIMARY = {
59247
+ "climate-control": {
59248
+ field: "currentTemp",
59249
+ priority: 70
59250
+ },
59251
+ "energy-system": {
59252
+ field: "house.powerW",
59253
+ priority: 50
59254
+ },
59255
+ "humidity-sensor": {
59256
+ field: "humidity",
59257
+ priority: 90
59258
+ },
59259
+ "power-meter": {
59260
+ field: "power",
59261
+ priority: 80
59262
+ },
59263
+ "temperature-sensor": {
59264
+ field: "temperature",
59265
+ priority: 100
59266
+ },
59267
+ "weather-station": {
59268
+ field: "temperature",
59269
+ priority: 60
59270
+ }
59271
+ };
59127
59272
  DeviceFeature.LightColorRgb, DeviceFeature.LightColorHsv, DeviceFeature.LightColorMired;
59128
59273
  var PowerSourceRefusalReasonSchema = _enum([
59129
59274
  "no-power-source",
@@ -64331,91 +64476,100 @@ var energySystemCapability = {
64331
64476
  * have is null and records nothing. Day totals are not recorded: they are the
64332
64477
  * counters' difference over the day.
64333
64478
  */
64334
- history: { fields: {
64335
- "solar.powerW": {
64336
- kind: "gauge",
64337
- unit: "W",
64338
- deadband: 50,
64339
- displayName: "Solar power"
64340
- },
64341
- "solar.energyKwh": {
64342
- kind: "counter",
64343
- unit: "kWh",
64344
- displayName: "Solar energy"
64345
- },
64346
- "grid.powerW": {
64347
- kind: "gauge",
64348
- unit: "W",
64349
- deadband: 50,
64350
- displayName: "Grid power"
64351
- },
64352
- "grid.importKwh": {
64353
- kind: "counter",
64354
- unit: "kWh",
64355
- displayName: "Grid import"
64356
- },
64357
- "grid.exportKwh": {
64358
- kind: "counter",
64359
- unit: "kWh",
64360
- displayName: "Grid export"
64361
- },
64362
- "house.powerW": {
64363
- kind: "gauge",
64364
- unit: "W",
64365
- deadband: 50,
64366
- displayName: "House power"
64367
- },
64368
- "house.energyKwh": {
64369
- kind: "counter",
64370
- unit: "kWh",
64371
- displayName: "House energy"
64372
- },
64373
- "heatPump.powerW": {
64374
- kind: "gauge",
64375
- unit: "W",
64376
- deadband: 50,
64377
- displayName: "Heat pump power"
64378
- },
64379
- "heatPump.energyKwh": {
64380
- kind: "counter",
64381
- unit: "kWh",
64382
- displayName: "Heat pump energy"
64383
- },
64384
- "storage.stateOfChargePct": {
64385
- kind: "gauge",
64386
- unit: "%",
64387
- deadband: 1,
64388
- displayName: "Storage charge"
64389
- },
64390
- "storage.storedKwh": {
64391
- kind: "gauge",
64392
- unit: "kWh",
64393
- deadband: .05,
64394
- displayName: "Stored energy"
64395
- },
64396
- "storage.powerW": {
64397
- kind: "gauge",
64398
- unit: "W",
64399
- deadband: 50,
64400
- displayName: "Storage power"
64401
- },
64402
- "storage.chargedKwh": {
64403
- kind: "counter",
64404
- unit: "kWh",
64405
- displayName: "Storage charged"
64406
- },
64407
- "storage.dischargedKwh": {
64408
- kind: "counter",
64409
- unit: "kWh",
64410
- displayName: "Storage discharged"
64411
- },
64412
- "storage.healthPct": {
64413
- kind: "gauge",
64414
- unit: "%",
64415
- deadband: 1,
64416
- displayName: "Storage health"
64479
+ history: {
64480
+ primary: "house.powerW",
64481
+ priority: 50,
64482
+ fields: {
64483
+ "solar.powerW": {
64484
+ group: "power-flow",
64485
+ kind: "gauge",
64486
+ unit: "W",
64487
+ deadband: 50,
64488
+ displayName: "Solar power"
64489
+ },
64490
+ "solar.energyKwh": {
64491
+ kind: "counter",
64492
+ unit: "kWh",
64493
+ displayName: "Solar energy"
64494
+ },
64495
+ "grid.powerW": {
64496
+ group: "power-flow",
64497
+ kind: "gauge",
64498
+ unit: "W",
64499
+ deadband: 50,
64500
+ displayName: "Grid power"
64501
+ },
64502
+ "grid.importKwh": {
64503
+ kind: "counter",
64504
+ unit: "kWh",
64505
+ displayName: "Grid import"
64506
+ },
64507
+ "grid.exportKwh": {
64508
+ kind: "counter",
64509
+ unit: "kWh",
64510
+ displayName: "Grid export"
64511
+ },
64512
+ "house.powerW": {
64513
+ group: "power-flow",
64514
+ kind: "gauge",
64515
+ unit: "W",
64516
+ deadband: 50,
64517
+ displayName: "House power"
64518
+ },
64519
+ "house.energyKwh": {
64520
+ kind: "counter",
64521
+ unit: "kWh",
64522
+ displayName: "House energy"
64523
+ },
64524
+ "heatPump.powerW": {
64525
+ group: "power-flow",
64526
+ kind: "gauge",
64527
+ unit: "W",
64528
+ deadband: 50,
64529
+ displayName: "Heat pump power"
64530
+ },
64531
+ "heatPump.energyKwh": {
64532
+ kind: "counter",
64533
+ unit: "kWh",
64534
+ displayName: "Heat pump energy"
64535
+ },
64536
+ "storage.stateOfChargePct": {
64537
+ kind: "gauge",
64538
+ unit: "%",
64539
+ deadband: 1,
64540
+ displayName: "Storage charge"
64541
+ },
64542
+ "storage.storedKwh": {
64543
+ kind: "gauge",
64544
+ unit: "kWh",
64545
+ deadband: .05,
64546
+ displayName: "Stored energy"
64547
+ },
64548
+ "storage.powerW": {
64549
+ group: "power-flow",
64550
+ kind: "gauge",
64551
+ unit: "W",
64552
+ deadband: 50,
64553
+ displayName: "Storage power"
64554
+ },
64555
+ "storage.chargedKwh": {
64556
+ kind: "counter",
64557
+ unit: "kWh",
64558
+ displayName: "Storage charged"
64559
+ },
64560
+ "storage.dischargedKwh": {
64561
+ kind: "counter",
64562
+ unit: "kWh",
64563
+ displayName: "Storage discharged"
64564
+ },
64565
+ "storage.healthPct": {
64566
+ kind: "gauge",
64567
+ unit: "%",
64568
+ deadband: 1,
64569
+ displayName: "Storage health"
64570
+ }
64417
64571
  }
64418
- } },
64572
+ },
64419
64573
  volatileStateFields: ["lastFetchedAt"],
64420
64574
  vocabulary: {
64421
64575
  noun: t("Energy system", "Sistema energetico"),
@@ -66494,12 +66648,14 @@ var heatPumpStatusCapability = {
66494
66648
  history: {
66495
66649
  fields: {
66496
66650
  "power.thermalW": {
66651
+ group: "power",
66497
66652
  kind: "gauge",
66498
66653
  unit: "W",
66499
66654
  deadband: 50,
66500
66655
  displayName: "Thermal power"
66501
66656
  },
66502
66657
  "power.electricalW": {
66658
+ group: "power",
66503
66659
  kind: "gauge",
66504
66660
  unit: "W",
66505
66661
  deadband: 50,
@@ -66512,12 +66668,14 @@ var heatPumpStatusCapability = {
66512
66668
  displayName: "Compressor"
66513
66669
  },
66514
66670
  "temperatures.supply": {
66671
+ group: "loop",
66515
66672
  kind: "gauge",
66516
66673
  unit: "°C",
66517
66674
  deadband: .5,
66518
66675
  displayName: "Supply"
66519
66676
  },
66520
66677
  "temperatures.return": {
66678
+ group: "loop",
66521
66679
  kind: "gauge",
66522
66680
  unit: "°C",
66523
66681
  deadband: .5,
@@ -66839,6 +66997,17 @@ var StateLookSchema = object({
66839
66997
  background: _enum(HERO_BACKGROUNDS),
66840
66998
  animation: HeroAnimationSchema
66841
66999
  });
67000
+ /**
67001
+ * Which history series a device card trends. Each cap declares its own
67002
+ * (`history.primary` + `history.priority`, projected into `HISTORY_PRIMARY`);
67003
+ * a device shows the primary of the ENABLED cap with the highest priority that
67004
+ * has data, falling back to the next.
67005
+ */
67006
+ /** The history series key of a cap's declared primary field; `null` when it declares none. */
67007
+ function primarySeriesKey(cap) {
67008
+ const primary = HISTORY_PRIMARY[cap];
67009
+ return primary === void 0 ? null : `cap:${cap}.${primary.field}`;
67010
+ }
66842
67011
  /** A string in both languages, as the cap vocabulary writes it (D920): no `t()` in the model. */
66843
67012
  var HeroTextSchema = object({
66844
67013
  en: string(),
@@ -66930,7 +67099,7 @@ function temperatureMeasurement(celsius, since) {
66930
67099
  tone: BAND_TONE[band],
66931
67100
  since,
66932
67101
  sinceKind: "updated",
66933
- historyKey: "cap:temperature-sensor.temperature"
67102
+ historyKey: primarySeriesKey("temperature-sensor")
66934
67103
  };
66935
67104
  }
66936
67105
  function humidityMeasurement(percent, since) {
@@ -66951,7 +67120,7 @@ function humidityMeasurement(percent, since) {
66951
67120
  tone: dry || humid ? "warning" : "info",
66952
67121
  since,
66953
67122
  sinceKind: "updated",
66954
- historyKey: "cap:humidity-sensor.humidity"
67123
+ historyKey: primarySeriesKey("humidity-sensor")
66955
67124
  };
66956
67125
  }
66957
67126
  function textMeasurement(text, since) {
@@ -66976,19 +67145,19 @@ var QUANTITY_FACE = {
66976
67145
  icon: "thermometer",
66977
67146
  unit: "°C",
66978
67147
  sinceKind: "updated",
66979
- historyKey: "cap:temperature-sensor.temperature"
67148
+ historyKey: primarySeriesKey("temperature-sensor")
66980
67149
  },
66981
67150
  humidity: {
66982
67151
  icon: "droplets",
66983
67152
  unit: "%",
66984
67153
  sinceKind: "updated",
66985
- historyKey: "cap:humidity-sensor.humidity"
67154
+ historyKey: primarySeriesKey("humidity-sensor")
66986
67155
  },
66987
67156
  power: {
66988
67157
  icon: "zap",
66989
67158
  unit: "W",
66990
67159
  sinceKind: "updated",
66991
- historyKey: "cap:power-meter.power"
67160
+ historyKey: primarySeriesKey("power-meter")
66992
67161
  },
66993
67162
  contact: {
66994
67163
  icon: null,
@@ -67753,11 +67922,15 @@ var humiditySensorCapability = {
67753
67922
  /**
67754
67923
  * History (D850): recorded series.
67755
67924
  */
67756
- history: { fields: { humidity: {
67757
- kind: "gauge",
67758
- unit: "%",
67759
- deadband: .5
67760
- } } },
67925
+ history: {
67926
+ primary: "humidity",
67927
+ priority: 90,
67928
+ fields: { humidity: {
67929
+ kind: "gauge",
67930
+ unit: "%",
67931
+ deadband: .5
67932
+ } }
67933
+ },
67761
67934
  /** Clock fields: written, but excluded from the compare that decides
67762
67935
  * whether persisting is worth a SQLite commit. */
67763
67936
  volatileStateFields: ["lastFetchedAt"],
@@ -84058,44 +84231,48 @@ var powerMeterCapability = {
84058
84231
  /**
84059
84232
  * History (D850): recorded series. Gauges are floored at 30 s; `energy` is the one monotonic meter (counter).
84060
84233
  */
84061
- history: { fields: {
84062
- power: {
84063
- kind: "gauge",
84064
- unit: "W",
84065
- deadband: 1,
84066
- minIntervalMs: 3e4
84067
- },
84068
- energy: {
84069
- kind: "counter",
84070
- unit: "kWh",
84071
- deadband: .01,
84072
- minIntervalMs: 6e4
84073
- },
84074
- voltage: {
84075
- kind: "gauge",
84076
- unit: "V",
84077
- deadband: 1,
84078
- minIntervalMs: 3e4
84079
- },
84080
- current: {
84081
- kind: "gauge",
84082
- unit: "A",
84083
- deadband: .05,
84084
- minIntervalMs: 3e4
84085
- },
84086
- apparentPower: {
84087
- kind: "gauge",
84088
- unit: "VA",
84089
- deadband: 1,
84090
- minIntervalMs: 3e4
84091
- },
84092
- powerFactor: {
84093
- kind: "gauge",
84094
- unit: "ratio",
84095
- deadband: .01,
84096
- minIntervalMs: 6e4
84234
+ history: {
84235
+ primary: "power",
84236
+ priority: 80,
84237
+ fields: {
84238
+ power: {
84239
+ kind: "gauge",
84240
+ unit: "W",
84241
+ deadband: 1,
84242
+ minIntervalMs: 3e4
84243
+ },
84244
+ energy: {
84245
+ kind: "counter",
84246
+ unit: "kWh",
84247
+ deadband: .01,
84248
+ minIntervalMs: 6e4
84249
+ },
84250
+ voltage: {
84251
+ kind: "gauge",
84252
+ unit: "V",
84253
+ deadband: 1,
84254
+ minIntervalMs: 3e4
84255
+ },
84256
+ current: {
84257
+ kind: "gauge",
84258
+ unit: "A",
84259
+ deadband: .05,
84260
+ minIntervalMs: 3e4
84261
+ },
84262
+ apparentPower: {
84263
+ kind: "gauge",
84264
+ unit: "VA",
84265
+ deadband: 1,
84266
+ minIntervalMs: 3e4
84267
+ },
84268
+ powerFactor: {
84269
+ kind: "gauge",
84270
+ unit: "ratio",
84271
+ deadband: .01,
84272
+ minIntervalMs: 6e4
84273
+ }
84097
84274
  }
84098
- } },
84275
+ },
84099
84276
  /** Clock fields: written, but excluded from the compare that decides
84100
84277
  * whether persisting is worth a SQLite commit. */
84101
84278
  volatileStateFields: ["lastFetchedAt"],
@@ -90042,18 +90219,22 @@ var streamParamsCapability = {
90042
90219
  */
90043
90220
  history: { fields: {
90044
90221
  "main.bitrate": {
90222
+ group: "bitrate",
90045
90223
  kind: "gauge",
90046
90224
  unit: "kbps"
90047
90225
  },
90048
90226
  "main.framerate": {
90227
+ group: "framerate",
90049
90228
  kind: "gauge",
90050
90229
  unit: "fps"
90051
90230
  },
90052
90231
  "sub.bitrate": {
90232
+ group: "bitrate",
90053
90233
  kind: "gauge",
90054
90234
  unit: "kbps"
90055
90235
  },
90056
90236
  "sub.framerate": {
90237
+ group: "framerate",
90057
90238
  kind: "gauge",
90058
90239
  unit: "fps"
90059
90240
  }
@@ -91136,11 +91317,15 @@ var temperatureSensorCapability = {
91136
91317
  /**
91137
91318
  * History (D850): recorded series.
91138
91319
  */
91139
- history: { fields: { temperature: {
91140
- kind: "gauge",
91141
- unit: "°C",
91142
- deadband: .1
91143
- } } },
91320
+ history: {
91321
+ primary: "temperature",
91322
+ priority: 100,
91323
+ fields: { temperature: {
91324
+ kind: "gauge",
91325
+ unit: "°C",
91326
+ deadband: .1
91327
+ } }
91328
+ },
91144
91329
  /** Clock fields: written, but excluded from the compare that decides
91145
91330
  * whether persisting is worth a SQLite commit. */
91146
91331
  volatileStateFields: ["lastFetchedAt"],
@@ -93490,11 +93675,13 @@ var waterHeaterCapability = {
93490
93675
  */
93491
93676
  history: { fields: {
93492
93677
  currentTemp: {
93678
+ group: "temperature",
93493
93679
  kind: "gauge",
93494
93680
  unit: "°C",
93495
93681
  deadband: .5
93496
93682
  },
93497
93683
  targetTemp: {
93684
+ group: "temperature",
93498
93685
  kind: "gauge",
93499
93686
  unit: "°C",
93500
93687
  minIntervalMs: 0
@@ -93785,108 +93972,120 @@ var weatherStationCapability = {
93785
93972
  * reset (event, day, week, month, year) and the sliding 24 h total are
93786
93973
  * levels, so `gauge`; `counter` is for a monotonic meter only.
93787
93974
  */
93788
- history: { fields: {
93789
- temperature: {
93790
- kind: "gauge",
93791
- unit: "°C",
93792
- deadband: .1
93793
- },
93794
- humidity: {
93795
- kind: "gauge",
93796
- unit: "%",
93797
- deadband: 1
93798
- },
93799
- pressure: {
93800
- kind: "gauge",
93801
- unit: "hPa",
93802
- deadband: .2
93803
- },
93804
- windSpeed: {
93805
- kind: "gauge",
93806
- unit: "m/s",
93807
- deadband: .2
93808
- },
93809
- windGust: {
93810
- kind: "gauge",
93811
- unit: "m/s",
93812
- deadband: .2
93813
- },
93814
- windBearing: {
93815
- kind: "gauge",
93816
- unit: "°",
93817
- deadband: 5
93818
- },
93819
- rainRate: {
93820
- kind: "gauge",
93821
- unit: "mm/h",
93822
- deadband: .1
93823
- },
93824
- rainDaily: {
93825
- kind: "gauge",
93826
- unit: "mm",
93827
- deadband: .1
93828
- },
93829
- rainEvent: {
93830
- kind: "gauge",
93831
- unit: "mm",
93832
- deadband: .1
93833
- },
93834
- uv: {
93835
- kind: "gauge",
93836
- unit: "index",
93837
- deadband: .1
93838
- },
93839
- solarRadiation: {
93840
- kind: "gauge",
93841
- unit: "W/m²",
93842
- deadband: 5
93843
- },
93844
- dewPoint: {
93845
- kind: "gauge",
93846
- unit: "°C",
93847
- deadband: .1
93848
- },
93849
- feelsLike: {
93850
- kind: "gauge",
93851
- unit: "°C",
93852
- deadband: .1
93853
- },
93854
- vpd: {
93855
- kind: "gauge",
93856
- unit: "kPa",
93857
- deadband: .05
93858
- },
93859
- windGustMax: {
93860
- kind: "gauge",
93861
- unit: "m/s",
93862
- deadband: .2
93863
- },
93864
- windBearingAvg: {
93865
- kind: "gauge",
93866
- unit: "°",
93867
- deadband: 5
93868
- },
93869
- rain24h: {
93870
- kind: "gauge",
93871
- unit: "mm",
93872
- deadband: .1
93873
- },
93874
- rainWeekly: {
93875
- kind: "gauge",
93876
- unit: "mm",
93877
- deadband: .1
93878
- },
93879
- rainMonthly: {
93880
- kind: "gauge",
93881
- unit: "mm",
93882
- deadband: .1
93883
- },
93884
- rainYearly: {
93885
- kind: "gauge",
93886
- unit: "mm",
93887
- deadband: .1
93975
+ history: {
93976
+ primary: "temperature",
93977
+ priority: 60,
93978
+ fields: {
93979
+ temperature: {
93980
+ group: "temperature",
93981
+ kind: "gauge",
93982
+ unit: "°C",
93983
+ deadband: .1
93984
+ },
93985
+ humidity: {
93986
+ kind: "gauge",
93987
+ unit: "%",
93988
+ deadband: 1
93989
+ },
93990
+ pressure: {
93991
+ kind: "gauge",
93992
+ unit: "hPa",
93993
+ deadband: .2
93994
+ },
93995
+ windSpeed: {
93996
+ group: "wind-speed",
93997
+ kind: "gauge",
93998
+ unit: "m/s",
93999
+ deadband: .2
94000
+ },
94001
+ windGust: {
94002
+ group: "wind-speed",
94003
+ kind: "gauge",
94004
+ unit: "m/s",
94005
+ deadband: .2
94006
+ },
94007
+ windBearing: {
94008
+ group: "wind-bearing",
94009
+ kind: "gauge",
94010
+ unit: "°",
94011
+ deadband: 5
94012
+ },
94013
+ rainRate: {
94014
+ kind: "gauge",
94015
+ unit: "mm/h",
94016
+ deadband: .1
94017
+ },
94018
+ rainDaily: {
94019
+ kind: "gauge",
94020
+ unit: "mm",
94021
+ deadband: .1
94022
+ },
94023
+ rainEvent: {
94024
+ kind: "gauge",
94025
+ unit: "mm",
94026
+ deadband: .1
94027
+ },
94028
+ uv: {
94029
+ kind: "gauge",
94030
+ unit: "index",
94031
+ deadband: .1
94032
+ },
94033
+ solarRadiation: {
94034
+ kind: "gauge",
94035
+ unit: "W/m²",
94036
+ deadband: 5
94037
+ },
94038
+ dewPoint: {
94039
+ group: "temperature",
94040
+ kind: "gauge",
94041
+ unit: "°C",
94042
+ deadband: .1
94043
+ },
94044
+ feelsLike: {
94045
+ group: "temperature",
94046
+ kind: "gauge",
94047
+ unit: "°C",
94048
+ deadband: .1
94049
+ },
94050
+ vpd: {
94051
+ kind: "gauge",
94052
+ unit: "kPa",
94053
+ deadband: .05
94054
+ },
94055
+ windGustMax: {
94056
+ group: "wind-speed",
94057
+ kind: "gauge",
94058
+ unit: "m/s",
94059
+ deadband: .2
94060
+ },
94061
+ windBearingAvg: {
94062
+ group: "wind-bearing",
94063
+ kind: "gauge",
94064
+ unit: "°",
94065
+ deadband: 5
94066
+ },
94067
+ rain24h: {
94068
+ kind: "gauge",
94069
+ unit: "mm",
94070
+ deadband: .1
94071
+ },
94072
+ rainWeekly: {
94073
+ kind: "gauge",
94074
+ unit: "mm",
94075
+ deadband: .1
94076
+ },
94077
+ rainMonthly: {
94078
+ kind: "gauge",
94079
+ unit: "mm",
94080
+ deadband: .1
94081
+ },
94082
+ rainYearly: {
94083
+ kind: "gauge",
94084
+ unit: "mm",
94085
+ deadband: .1
94086
+ }
93888
94087
  }
93889
- } },
94088
+ },
93890
94089
  customize: weatherStationCustomize,
93891
94090
  /** The poll clock is written but is no reason to commit a row. */
93892
94091
  volatileStateFields: ["lastFetchedAt"],
@@ -115044,4 +115243,4 @@ function keepBodyKeys(provider, keys) {
115044
115243
  };
115045
115244
  }
115046
115245
  //#endregion
115047
- export { union as $, runningFromDishwasherOperation as A, entryBody as B, ingestReading as C, powerMeterCapability as D, plainEventVocabulary as E, RecordIntegrationInstances as F, _null as G, isSecretMarkerLike as H, createEvent as I, literal as J, array as K, customAction as L, switchCapability as M, temperatureSensorCapability as N, quantityFromUnit as O, waterHeaterCapability as P, string as Q, defineCustomActions as R, heatingValveCapability as S, numericSensorCapability as T, rowsDepsOver as U, isSecretMarker as V, _enum as W, object as X, number$1 as Y, record as Z, enumSensorCapability as _, BaseDevice as a, heatPumpControlCapability as b, RUNNING_STATE_COLD as c, binaryCapability as d, unknown as et, climateControlCapability as f, dishwasherCapability as g, deviceAdoptionCapability as h, testBoschInstance as i, EventCategory as it, runningStateCapability as j, registerPowerSwitch as k, SessionHealthTracker as l, defaultIntegrationName as m, boschRowsPorts as n, DeviceType as nt, BaseDeviceProvider as o, consumablesCapability as p, boolean as q, keepBodyKeys as r, errMsg as rt, DishwasherOperationStateSchema as s, boschRowsMigration as t, DeviceRole as tt, batteryCapability as u, eventEmitterCapability as v, integrationInstancesCapability as w, heatPumpStatusCapability as x, gatewayDeviceName as y, defineEntryKind as z };
115246
+ export { literal as $, registerPowerSwitch as A, defineCustomActions as B, ingestReading as C, plainEventVocabulary as D, numericSensorCapability as E, waterHeaterCapability as F, isSecretMarkerLike as G, entryBody as H, RecordIntegrationInstances as I, _enum as J, rowsDepsOver as K, SECRET_CLEAR as L, runningStateCapability as M, switchCapability as N, powerMeterCapability as O, temperatureSensorCapability as P, custom as Q, createEvent as R, heatingValveCapability as S, integrationPageHref as T, isSecretFieldView as U, defineEntryKind as V, isSecretMarker as W, array as X, _null as Y, boolean as Z, enumSensorCapability as _, BaseDevice as a, unknown as at, heatPumpControlCapability as b, RUNNING_STATE_COLD as c, errMsg as ct, binaryCapability as d, number$1 as et, climateControlCapability as f, dishwasherCapability as g, deviceAdoptionCapability as h, testBoschInstance as i, union as it, runningFromDishwasherOperation as j, quantityFromUnit as k, SessionHealthTracker as l, EventCategory as lt, defaultIntegrationName as m, boschRowsPorts as n, record as nt, BaseDeviceProvider as o, DeviceRole as ot, consumablesCapability as p, toSecretFieldView as q, keepBodyKeys as r, string as rt, DishwasherOperationStateSchema as s, DeviceType as st, boschRowsMigration as t, object as tt, batteryCapability as u, eventEmitterCapability as v, integrationInstancesCapability as w, heatPumpStatusCapability as x, gatewayDeviceName as y, customAction as z };