@camstack/server 1.2.869 → 1.2.870

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.
Files changed (90) hide show
  1. package/CHANGELOG.md +6 -2
  2. package/dist/api/trpc/generated-cap-mounts.js +2 -1
  3. package/dist/api/trpc/generated-cap-routers.js +15 -1
  4. package/package.json +12 -19
  5. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.js +1 -1
  6. package/system/dist/builtins/addon-pages-aggregator/addon-pages-aggregator.addon.mjs +1 -1
  7. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.js +1 -1
  8. package/system/dist/builtins/addon-widgets-aggregator/addon-widgets-aggregator.addon.mjs +1 -1
  9. package/system/dist/builtins/alerts/alerts.addon.js +1 -1
  10. package/system/dist/builtins/alerts/alerts.addon.mjs +1 -1
  11. package/system/dist/builtins/autotrack/index.js +1 -1
  12. package/system/dist/builtins/autotrack/index.mjs +1 -1
  13. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.js +2 -2
  14. package/system/dist/builtins/backup-orchestrator/backup-orchestrator.addon.mjs +2 -2
  15. package/system/dist/builtins/calendars/calendars.addon.js +1 -1
  16. package/system/dist/builtins/calendars/calendars.addon.mjs +1 -1
  17. package/system/dist/builtins/camera-grid/index.js +1 -1
  18. package/system/dist/builtins/camera-grid/index.mjs +1 -1
  19. package/system/dist/builtins/composer/composer.addon.js +4 -4
  20. package/system/dist/builtins/composer/composer.addon.mjs +4 -4
  21. package/system/dist/builtins/console-logging/index.js +1 -1
  22. package/system/dist/builtins/console-logging/index.mjs +1 -1
  23. package/system/dist/builtins/core-blocks/core-blocks.addon.js +9 -4
  24. package/system/dist/builtins/core-blocks/core-blocks.addon.mjs +9 -4
  25. package/system/dist/builtins/core-blocks/remote-service.d.ts +5 -1
  26. package/system/dist/builtins/device-history/device-history.addon.js +2 -2
  27. package/system/dist/builtins/device-history/device-history.addon.mjs +2 -2
  28. package/system/dist/builtins/device-manager/device-manager.addon.js +2 -2
  29. package/system/dist/builtins/device-manager/device-manager.addon.mjs +2 -2
  30. package/system/dist/builtins/hub-forwarder/index.js +1 -1
  31. package/system/dist/builtins/hub-forwarder/index.mjs +1 -1
  32. package/system/dist/builtins/keychain/index.js +4 -4
  33. package/system/dist/builtins/keychain/index.mjs +4 -4
  34. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.js +1 -1
  35. package/system/dist/builtins/liveness-monitor/liveness-monitor.addon.mjs +1 -1
  36. package/system/dist/builtins/local-auth/local-auth.addon.js +2 -2
  37. package/system/dist/builtins/local-auth/local-auth.addon.mjs +2 -2
  38. package/system/dist/builtins/local-network/local-network.addon.js +3 -3
  39. package/system/dist/builtins/local-network/local-network.addon.mjs +3 -3
  40. package/system/dist/builtins/loki-logging/index.js +1 -1
  41. package/system/dist/builtins/loki-logging/index.mjs +1 -1
  42. package/system/dist/builtins/native-metrics/native-metrics.addon.js +1 -1
  43. package/system/dist/builtins/native-metrics/native-metrics.addon.mjs +1 -1
  44. package/system/dist/builtins/platform-probe/index.js +1 -1
  45. package/system/dist/builtins/platform-probe/index.mjs +1 -1
  46. package/system/dist/builtins/record-entries/index.js +1 -1
  47. package/system/dist/builtins/record-entries/index.mjs +1 -1
  48. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.js +1 -1
  49. package/system/dist/builtins/remote-access-orchestrator/remote-access-orchestrator.addon.mjs +1 -1
  50. package/system/dist/builtins/snapshot/index.js +1 -1
  51. package/system/dist/builtins/snapshot/index.mjs +1 -1
  52. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.js +1 -1
  53. package/system/dist/builtins/sqlite-storage/filesystem-storage.addon.mjs +1 -1
  54. package/system/dist/builtins/sqlite-storage/index.js +1 -1
  55. package/system/dist/builtins/sqlite-storage/index.mjs +1 -1
  56. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.js +3 -3
  57. package/system/dist/builtins/sqlite-storage/sqlite-settings.addon.mjs +3 -3
  58. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.js +1 -1
  59. package/system/dist/builtins/storage-orchestrator/storage-orchestrator.addon.mjs +1 -1
  60. package/system/dist/builtins/system-config/system-config.addon.js +3 -3
  61. package/system/dist/builtins/system-config/system-config.addon.mjs +3 -3
  62. package/system/dist/builtins/winston-logging/index.js +1 -1
  63. package/system/dist/builtins/winston-logging/index.mjs +1 -1
  64. package/system/dist/{capture-engine-hLbiQm2r.mjs → capture-engine-4BFlpvJV.mjs} +1 -1
  65. package/system/dist/{capture-engine-Bwhwpy3T.js → capture-engine-DvcUjBD4.js} +1 -1
  66. package/system/dist/{composition-sources-DqGVEx12.js → composition-sources-CWKwokvg.js} +1 -1
  67. package/system/dist/{composition-sources-CXd5ydxk.mjs → composition-sources-DU-LtoTH.mjs} +1 -1
  68. package/system/dist/{constants-hVovxKZz.js → constants-BHEbtnlN.js} +1 -1
  69. package/system/dist/{constants-BxOTlPMv.mjs → constants-C7shrFbd.mjs} +1 -1
  70. package/system/dist/{device-ca-1vqFIP_t.js → device-ca-CRIb8o13.js} +1 -1
  71. package/system/dist/{device-ca-B-yM5jiy.mjs → device-ca-DN7M71Qy.mjs} +1 -1
  72. package/system/dist/{dist-D1LOSOS0.mjs → dist-C_8yolmP.mjs} +347 -17
  73. package/system/dist/{dist-uTbt3Yxy.js → dist-Co_TBjrT.js} +347 -17
  74. package/system/dist/file-host-worker.js +1 -1
  75. package/system/dist/file-host-worker.mjs +1 -1
  76. package/system/dist/{hub-identity-Dx3Jbhnp.mjs → hub-identity-BoelHayw.mjs} +1 -1
  77. package/system/dist/{hub-identity-TBo0Xrxk.js → hub-identity-D6YKdl9L.js} +1 -1
  78. package/system/dist/{hub-mdns-ciao-C0xzb8jM.js → hub-mdns-ciao-C7vrLh6K.js} +2 -2
  79. package/system/dist/{hub-mdns-ciao-Br5Vlcf0.mjs → hub-mdns-ciao-CFIA6g7n.mjs} +2 -2
  80. package/system/dist/index.js +8 -8
  81. package/system/dist/index.mjs +8 -8
  82. package/system/dist/{legacy-integration-rows-door-c8pHSqwA.js → legacy-integration-rows-door-D3JEzzQB.js} +1 -1
  83. package/system/dist/{legacy-integration-rows-door-CqsM5HcW.mjs → legacy-integration-rows-door-uKx33PTT.mjs} +1 -1
  84. package/system/dist/{rename-composition-block-DNgRnLHV.js → rename-composition-block-Bqk6u7Q6.js} +1 -1
  85. package/system/dist/{rename-composition-block-Bbu4W1mg.mjs → rename-composition-block-CvevOCur.mjs} +1 -1
  86. package/system/dist/{restore-archive-DcS4GDfw.mjs → restore-archive-BZ45H1RA.mjs} +1 -1
  87. package/system/dist/{restore-archive-D48JPP0d.js → restore-archive-eHXLFCxW.js} +1 -1
  88. package/system/dist/{wal-maintenance-D3s8jnax.js → wal-maintenance-BHFm-B-H.js} +0 -0
  89. package/system/dist/{wal-maintenance-BoxO0tlN.mjs → wal-maintenance-D80Zkary.mjs} +0 -0
  90. package/system/package.json +1 -1
@@ -824,7 +824,7 @@ var EventCategory = /* @__PURE__ */ function(EventCategory) {
824
824
  return EventCategory;
825
825
  }({});
826
826
  //#endregion
827
- //#region ../types/dist/composed-stable-id-COP6zOXx.mjs
827
+ //#region ../types/dist/composed-stable-id-RvQIEpqg.mjs
828
828
  /**
829
829
  import { errMsg } from '@camstack/types'
830
830
  * Extract a human-readable message from an unknown error value.
@@ -906,6 +906,9 @@ var DeviceType = /* @__PURE__ */ function(DeviceType) {
906
906
  /** Weather provider (HA `weather.*`). Tier-3, low MVP priority.
907
907
  * `weather` cap. */
908
908
  DeviceType["Weather"] = "weather";
909
+ /** A physical weather station (Ecowitt outdoor array). `weather-station`
910
+ * cap. Distinct from {@link Weather}, which is a forecast provider. */
911
+ DeviceType["WeatherStation"] = "weather-station";
909
912
  /** Robot vacuum (HA `vacuum.*`). Tier-3. `vacuum-control` cap. */
910
913
  DeviceType["Vacuum"] = "vacuum";
911
914
  /** Robotic lawn mower (HA `lawn_mower.*`). Tier-3.
@@ -1271,7 +1274,7 @@ var DeviceRole = /* @__PURE__ */ function(DeviceRole) {
1271
1274
  */
1272
1275
  var COMPOSED_DEVICE_STABLE_ID_PREFIX = "composed-";
1273
1276
  //#endregion
1274
- //#region ../types/dist/sleep-DEd_klYQ.mjs
1277
+ //#region ../types/dist/sleep-DbhT0DWV.mjs
1275
1278
  /**
1276
1279
  * The audio chunk plane's byte format, and the ONE expansion from a coded
1277
1280
  * window to float samples (D455).
@@ -14638,6 +14641,183 @@ var CAP_VOCABULARY_BY_NAME = {
14638
14641
  }
14639
14642
  ]
14640
14643
  },
14644
+ "weather-station": {
14645
+ scope: "device",
14646
+ noun: {
14647
+ en: "Weather station",
14648
+ it: "Stazione meteo"
14649
+ },
14650
+ state: [
14651
+ {
14652
+ kind: "numeric",
14653
+ field: "temperature",
14654
+ quantity: {
14655
+ en: "the outdoor temperature",
14656
+ it: "la temperatura esterna"
14657
+ },
14658
+ label: {
14659
+ en: "Temperature",
14660
+ it: "Temperatura"
14661
+ },
14662
+ unit: "°C",
14663
+ icon: "thermometer"
14664
+ },
14665
+ {
14666
+ kind: "numeric",
14667
+ field: "humidity",
14668
+ quantity: {
14669
+ en: "the outdoor humidity",
14670
+ it: "l’umidità esterna"
14671
+ },
14672
+ label: {
14673
+ en: "Humidity",
14674
+ it: "Umidità"
14675
+ },
14676
+ unit: "%",
14677
+ icon: "droplets"
14678
+ },
14679
+ {
14680
+ kind: "numeric",
14681
+ field: "pressure",
14682
+ quantity: {
14683
+ en: "the air pressure",
14684
+ it: "la pressione atmosferica"
14685
+ },
14686
+ label: {
14687
+ en: "Pressure",
14688
+ it: "Pressione"
14689
+ },
14690
+ unit: "hPa",
14691
+ icon: "gauge"
14692
+ },
14693
+ {
14694
+ kind: "numeric",
14695
+ field: "windSpeed",
14696
+ quantity: {
14697
+ en: "the wind speed",
14698
+ it: "la velocità del vento"
14699
+ },
14700
+ label: {
14701
+ en: "Wind",
14702
+ it: "Vento"
14703
+ },
14704
+ unit: "m/s",
14705
+ icon: "wind"
14706
+ },
14707
+ {
14708
+ kind: "numeric",
14709
+ field: "windGust",
14710
+ quantity: {
14711
+ en: "the wind gust",
14712
+ it: "la raffica di vento"
14713
+ },
14714
+ label: {
14715
+ en: "Gust",
14716
+ it: "Raffica"
14717
+ },
14718
+ unit: "m/s",
14719
+ icon: "wind"
14720
+ },
14721
+ {
14722
+ kind: "numeric",
14723
+ field: "windBearing",
14724
+ quantity: {
14725
+ en: "the wind bearing",
14726
+ it: "la direzione del vento"
14727
+ },
14728
+ label: {
14729
+ en: "Wind bearing",
14730
+ it: "Direzione del vento"
14731
+ },
14732
+ unit: "°",
14733
+ icon: "wind"
14734
+ },
14735
+ {
14736
+ kind: "numeric",
14737
+ field: "rainRate",
14738
+ quantity: {
14739
+ en: "the rain rate",
14740
+ it: "l’intensità della pioggia"
14741
+ },
14742
+ label: {
14743
+ en: "Rain rate",
14744
+ it: "Intensità pioggia"
14745
+ },
14746
+ unit: "mm/h",
14747
+ icon: "droplets"
14748
+ },
14749
+ {
14750
+ kind: "numeric",
14751
+ field: "rainDaily",
14752
+ quantity: {
14753
+ en: "the rain today",
14754
+ it: "la pioggia di oggi"
14755
+ },
14756
+ label: {
14757
+ en: "Rain today",
14758
+ it: "Pioggia oggi"
14759
+ },
14760
+ unit: "mm",
14761
+ icon: "droplets"
14762
+ },
14763
+ {
14764
+ kind: "numeric",
14765
+ field: "rainEvent",
14766
+ quantity: {
14767
+ en: "the rain this event",
14768
+ it: "la pioggia di questo evento"
14769
+ },
14770
+ label: {
14771
+ en: "Rain event",
14772
+ it: "Evento di pioggia"
14773
+ },
14774
+ unit: "mm",
14775
+ icon: "droplets"
14776
+ },
14777
+ {
14778
+ kind: "numeric",
14779
+ field: "uv",
14780
+ quantity: {
14781
+ en: "the UV index",
14782
+ it: "l’indice UV"
14783
+ },
14784
+ label: {
14785
+ en: "UV",
14786
+ it: "UV"
14787
+ },
14788
+ unit: "",
14789
+ icon: "cloud-sun"
14790
+ },
14791
+ {
14792
+ kind: "numeric",
14793
+ field: "solarRadiation",
14794
+ quantity: {
14795
+ en: "the solar radiation",
14796
+ it: "la radiazione solare"
14797
+ },
14798
+ label: {
14799
+ en: "Solar",
14800
+ it: "Sole"
14801
+ },
14802
+ unit: "W/m²",
14803
+ icon: "cloud-sun"
14804
+ },
14805
+ {
14806
+ kind: "numeric",
14807
+ field: "dewPoint",
14808
+ quantity: {
14809
+ en: "the dew point",
14810
+ it: "il punto di rugiada"
14811
+ },
14812
+ label: {
14813
+ en: "Dew point",
14814
+ it: "Punto di rugiada"
14815
+ },
14816
+ unit: "°C",
14817
+ icon: "thermometer"
14818
+ }
14819
+ ]
14820
+ },
14641
14821
  "battery": {
14642
14822
  scope: "device",
14643
14823
  noun: {
@@ -16026,6 +16206,7 @@ var CAP_NAMES = Object.freeze([
16026
16206
  "viewer-ui",
16027
16207
  "water-heater",
16028
16208
  "weather",
16209
+ "weather-station",
16029
16210
  "webrtc-session",
16030
16211
  "zone-analytics",
16031
16212
  "zone-rules",
@@ -18004,6 +18185,56 @@ Object.freeze({
18004
18185
  "valueType": "number"
18005
18186
  }
18006
18187
  ],
18188
+ "weather-station": [
18189
+ {
18190
+ "path": "temperature",
18191
+ "valueType": "number"
18192
+ },
18193
+ {
18194
+ "path": "humidity",
18195
+ "valueType": "number"
18196
+ },
18197
+ {
18198
+ "path": "pressure",
18199
+ "valueType": "number"
18200
+ },
18201
+ {
18202
+ "path": "windSpeed",
18203
+ "valueType": "number"
18204
+ },
18205
+ {
18206
+ "path": "windGust",
18207
+ "valueType": "number"
18208
+ },
18209
+ {
18210
+ "path": "windBearing",
18211
+ "valueType": "number"
18212
+ },
18213
+ {
18214
+ "path": "rainRate",
18215
+ "valueType": "number"
18216
+ },
18217
+ {
18218
+ "path": "rainDaily",
18219
+ "valueType": "number"
18220
+ },
18221
+ {
18222
+ "path": "rainEvent",
18223
+ "valueType": "number"
18224
+ },
18225
+ {
18226
+ "path": "uv",
18227
+ "valueType": "number"
18228
+ },
18229
+ {
18230
+ "path": "solarRadiation",
18231
+ "valueType": "number"
18232
+ },
18233
+ {
18234
+ "path": "dewPoint",
18235
+ "valueType": "number"
18236
+ }
18237
+ ],
18007
18238
  "zone-analytics": [
18008
18239
  {
18009
18240
  "path": "ts",
@@ -18235,7 +18466,7 @@ function sleep(ms) {
18235
18466
  return new Promise((resolve) => setTimeout(resolve, Math.max(0, ms)));
18236
18467
  }
18237
18468
  //#endregion
18238
- //#region ../types/dist/implemented-methods-0xxMOekw.mjs
18469
+ //#region ../types/dist/implemented-methods-C5FMXLGP.mjs
18239
18470
  var AUDIO_ENCODER_BY_CODEC = {
18240
18471
  opus: "libopus",
18241
18472
  aac: "aac",
@@ -62418,6 +62649,7 @@ var CAP_CUSTOMIZE_CATALOG = {
62418
62649
  DeviceType.Control,
62419
62650
  DeviceType.Presence,
62420
62651
  DeviceType.Weather,
62652
+ DeviceType.WeatherStation,
62421
62653
  DeviceType.Vacuum,
62422
62654
  DeviceType.LawnMower,
62423
62655
  DeviceType.Container,
@@ -63848,7 +64080,7 @@ var CHANGED = {
63848
64080
  fieldPath: "lastChangedAt",
63849
64081
  expr: "now"
63850
64082
  };
63851
- function numeric(input) {
64083
+ function numeric$1(input) {
63852
64084
  const { alsoFrom, ...base } = input;
63853
64085
  return {
63854
64086
  ...base,
@@ -63883,7 +64115,7 @@ function binary(input) {
63883
64115
  };
63884
64116
  }
63885
64117
  var GROUP_TEMPLATES = [
63886
- numeric({
64118
+ numeric$1({
63887
64119
  id: "temperature",
63888
64120
  summary: "Mean, median, min, max or sum of temperatures. Offline and unknown members are left out, never read as 0 °C.",
63889
64121
  role: DeviceRole.TemperatureSensor,
@@ -63901,7 +64133,7 @@ var GROUP_TEMPLATES = [
63901
64133
  }
63902
64134
  }
63903
64135
  }),
63904
- numeric({
64136
+ numeric$1({
63905
64137
  id: "humidity",
63906
64138
  summary: "Humidity in percent. Offline and unknown members are left out, never read as 0 %.",
63907
64139
  role: DeviceRole.HumiditySensor,
@@ -63919,7 +64151,7 @@ var GROUP_TEMPLATES = [
63919
64151
  }
63920
64152
  }
63921
64153
  }),
63922
- numeric({
64154
+ numeric$1({
63923
64155
  id: "pressure",
63924
64156
  summary: "Pressure in hectopascals. Offline and unknown members are left out, never read as 0 hPa.",
63925
64157
  role: DeviceRole.PressureSensor,
@@ -63930,7 +64162,7 @@ var GROUP_TEMPLATES = [
63930
64162
  empty: "null",
63931
64163
  companions: [NOW$3]
63932
64164
  }),
63933
- numeric({
64165
+ numeric$1({
63934
64166
  id: "illuminance",
63935
64167
  summary: "Illuminance in lux. Offline and unknown members are left out, never read as 0 lx.",
63936
64168
  role: DeviceRole.AmbientLightSensor,
@@ -63941,7 +64173,7 @@ var GROUP_TEMPLATES = [
63941
64173
  empty: "null",
63942
64174
  companions: [NOW$3]
63943
64175
  }),
63944
- numeric({
64176
+ numeric$1({
63945
64177
  id: "power",
63946
64178
  summary: "Power in watts, summed by default. Nobody reporting omits the key rather than writing 0 W.",
63947
64179
  role: DeviceRole.PowerSensor,
@@ -63952,7 +64184,7 @@ var GROUP_TEMPLATES = [
63952
64184
  empty: "omit",
63953
64185
  companions: [NOW$3]
63954
64186
  }),
63955
- numeric({
64187
+ numeric$1({
63956
64188
  id: "energy",
63957
64189
  summary: "Energy in kilowatt-hours, summed by default. Nobody reporting omits the key rather than writing 0 kWh.",
63958
64190
  role: DeviceRole.EnergySensor,
@@ -63963,7 +64195,7 @@ var GROUP_TEMPLATES = [
63963
64195
  empty: "omit",
63964
64196
  companions: [NOW$3]
63965
64197
  }),
63966
- numeric({
64198
+ numeric$1({
63967
64199
  id: "battery",
63968
64200
  summary: "Battery charge in percent. Offline and unknown members are left out, never read as 0 %.",
63969
64201
  role: DeviceRole.BatterySensor,
@@ -63987,7 +64219,7 @@ var GROUP_TEMPLATES = [
63987
64219
  }
63988
64220
  ]
63989
64221
  }),
63990
- numeric({
64222
+ numeric$1({
63991
64223
  id: "numeric",
63992
64224
  summary: "A numeric reading in the members’ shared quantity. Mixed quantities are refused. Nobody reporting publishes null, not 0.",
63993
64225
  role: DeviceRole.NumericSensor,
@@ -64235,7 +64467,7 @@ function groupTemplate(id) {
64235
64467
  }
64236
64468
  /**
64237
64469
  * Cap history catalog, projected from every `*.cap.ts` `history` block.
64238
- * 45 caps with series (104 series), 37 caps answered `'none'`.
64470
+ * 45 caps with series (104 series), 38 caps answered `'none'`.
64239
64471
  * Field keys are `runtimeState` paths (`a.b` into fixed objects only).
64240
64472
  */
64241
64473
  var HISTORY_CATALOG = {
@@ -76017,6 +76249,7 @@ var HERO_SCENE_BY_TYPE = {
76017
76249
  [DeviceType.Control]: "control-dial",
76018
76250
  [DeviceType.Presence]: "presence",
76019
76251
  [DeviceType.Weather]: "weather",
76252
+ [DeviceType.WeatherStation]: "weather",
76020
76253
  [DeviceType.Vacuum]: "vacuum",
76021
76254
  [DeviceType.LawnMower]: "lawn-mower",
76022
76255
  [DeviceType.Container]: "generic",
@@ -108696,6 +108929,71 @@ var weatherCapability = {
108696
108929
  ]
108697
108930
  }
108698
108931
  };
108932
+ var WeatherStationStatusSchema = z.object({
108933
+ temperature: z.number().nullable().meta(readingMeta("temperature", { precision: 1 })),
108934
+ humidity: z.number().min(0).max(100).nullable().meta(readingMeta("humidity")),
108935
+ pressure: z.number().nullable().meta(readingMeta("pressure")),
108936
+ windSpeed: z.number().nullable().meta(readingMeta("speed")),
108937
+ windGust: z.number().nullable().meta(readingMeta("speed")),
108938
+ windBearing: z.number().nullable().meta(readingMeta("angle")),
108939
+ rainRate: z.number().nullable().meta(readingMeta("precipitation-rate", { precision: 1 })),
108940
+ rainDaily: z.number().nullable().meta(readingMeta("precipitation", { precision: 1 })),
108941
+ rainEvent: z.number().nullable().meta(readingMeta("precipitation", { precision: 1 })),
108942
+ uv: z.number().nullable().meta(readingMeta("index", { precision: 1 })),
108943
+ solarRadiation: z.number().nullable().meta(readingMeta("irradiance")),
108944
+ dewPoint: z.number().nullable().meta(readingMeta("temperature", { precision: 1 }))
108945
+ }).extend({
108946
+ /** Ms epoch of the poll that produced this slice. 0 before the first one. */
108947
+ lastFetchedAt: z.number() });
108948
+ var numeric = (field, quantity, label, unit, icon) => ({
108949
+ kind: "numeric",
108950
+ field,
108951
+ quantity,
108952
+ label,
108953
+ unit,
108954
+ icon
108955
+ });
108956
+ var weatherStationCapability = {
108957
+ name: "weather-station",
108958
+ scope: "device",
108959
+ deviceNative: true,
108960
+ mode: "singleton",
108961
+ deviceTypes: [DeviceType.WeatherStation],
108962
+ methods: {},
108963
+ status: {
108964
+ schema: WeatherStationStatusSchema,
108965
+ kind: "push"
108966
+ },
108967
+ runtimeState: WeatherStationStatusSchema,
108968
+ /**
108969
+ * The sensor children already record each reading. The station slice is the
108970
+ * live aggregate a template reads; it does not keep a second series.
108971
+ */
108972
+ history: "none",
108973
+ /**
108974
+ * Runtime-state durability: **session** — a station reading is stale the
108975
+ * moment the hub is down; the provider re-reads on the next poll.
108976
+ */
108977
+ durability: "session",
108978
+ vocabulary: {
108979
+ noun: t("Weather station", "Stazione meteo"),
108980
+ order: 5235,
108981
+ state: [
108982
+ numeric("temperature", t("the outdoor temperature", "la temperatura esterna"), t("Temperature", "Temperatura"), "°C", "thermometer"),
108983
+ numeric("humidity", t("the outdoor humidity", "l’umidità esterna"), t("Humidity", "Umidità"), "%", "droplets"),
108984
+ numeric("pressure", t("the air pressure", "la pressione atmosferica"), t("Pressure", "Pressione"), "hPa", "gauge"),
108985
+ numeric("windSpeed", t("the wind speed", "la velocità del vento"), t("Wind", "Vento"), "m/s", "wind"),
108986
+ numeric("windGust", t("the wind gust", "la raffica di vento"), t("Gust", "Raffica"), "m/s", "wind"),
108987
+ numeric("windBearing", t("the wind bearing", "la direzione del vento"), t("Wind bearing", "Direzione del vento"), "°", "wind"),
108988
+ numeric("rainRate", t("the rain rate", "l’intensità della pioggia"), t("Rain rate", "Intensità pioggia"), "mm/h", "droplets"),
108989
+ numeric("rainDaily", t("the rain today", "la pioggia di oggi"), t("Rain today", "Pioggia oggi"), "mm", "droplets"),
108990
+ numeric("rainEvent", t("the rain this event", "la pioggia di questo evento"), t("Rain event", "Evento di pioggia"), "mm", "droplets"),
108991
+ numeric("uv", t("the UV index", "l’indice UV"), t("UV", "UV"), "", "cloud-sun"),
108992
+ numeric("solarRadiation", t("the solar radiation", "la radiazione solare"), t("Solar", "Sole"), "W/m²", "cloud-sun"),
108993
+ numeric("dewPoint", t("the dew point", "il punto di rugiada"), t("Dew point", "Punto di rugiada"), "°C", "thermometer")
108994
+ ]
108995
+ }
108996
+ };
108699
108997
  /**
108700
108998
  * Optional client-side hints sent at session creation to help the provider
108701
108999
  * pick the best native source. All fields optional — a viewer that knows
@@ -109918,6 +110216,7 @@ var ALL_CAPABILITY_DEFINITIONS = [
109918
110216
  viewerUiCapability,
109919
110217
  waterHeaterCapability,
109920
110218
  weatherCapability,
110219
+ weatherStationCapability,
109921
110220
  webrtcSessionCapability,
109922
110221
  zoneAnalyticsCapability,
109923
110222
  zoneRulesCapability,
@@ -112578,6 +112877,7 @@ var DEVICE_LOCAL_STATE_CAPS = {
112578
112877
  vibration: vibrationCapability,
112579
112878
  waterHeater: waterHeaterCapability,
112580
112879
  weather: weatherCapability,
112880
+ weatherStation: weatherStationCapability,
112581
112881
  zoneAnalytics: zoneAnalyticsCapability,
112582
112882
  zoneRules: zoneRulesCapability,
112583
112883
  zones: zonesCapability
@@ -113686,7 +113986,7 @@ var DeclaredDevices = class {
113686
113986
  return removed;
113687
113987
  }
113688
113988
  };
113689
- DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Camera, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
113989
+ DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.HeatPump, DeviceType.EnergySystem, DeviceType.Camera, DeviceType.Switch, DeviceType.Siren, DeviceType.Light, DeviceType.Fan, DeviceType.Sensor, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
113690
113990
  new Set(Object.values(DeviceType));
113691
113991
  /** True when a value is a navigable node: a plain object OR a tRPC v11 client
113692
113992
  * proxy node (a callable `Proxy(noop)` → `typeof === 'function'`, NOT an
@@ -115072,6 +115372,17 @@ var SENSORS_FAMILY_CONTRIBUTIONS = {
115072
115372
  doorbell: doorbellContribution,
115073
115373
  meter: meterContribution,
115074
115374
  weather: weatherContribution,
115375
+ "weather-station": contribution("weather-station", WeatherStationStatusSchema, (slice) => {
115376
+ if (slice === void 0 || slice.temperature === null) return { reading: reading("weather", "unknown") };
115377
+ const celsius = `${number(slice.temperature)}°C`;
115378
+ const facts = [fact("reading", "thermometer", t(celsius, celsius), "primary")];
115379
+ if (slice.humidity !== null) facts.push(fact("reading", "droplets", t(`${Math.round(slice.humidity)}%`, `${Math.round(slice.humidity)}%`)));
115380
+ if (slice.windSpeed !== null) facts.push(fact("reading", "wind", t(`${number(slice.windSpeed)} m/s`, `${number(slice.windSpeed)} m/s`)));
115381
+ return {
115382
+ reading: reading("weather", "on", false, t(celsius, celsius)),
115383
+ facts
115384
+ };
115385
+ }),
115075
115386
  update: updateContribution,
115076
115387
  image: imageContribution,
115077
115388
  button: buttonContribution,
@@ -116580,6 +116891,7 @@ var HERO_LAYOUT_BY_TYPE = {
116580
116891
  [DeviceType.Control]: CONTROL_LAYOUT,
116581
116892
  [DeviceType.Presence]: HERO_LAYOUT_DEFAULT,
116582
116893
  [DeviceType.Weather]: HERO_LAYOUT_DEFAULT,
116894
+ [DeviceType.WeatherStation]: HERO_LAYOUT_DEFAULT,
116583
116895
  [DeviceType.Vacuum]: VACUUM_LAYOUT,
116584
116896
  [DeviceType.LawnMower]: MOWER_LAYOUT,
116585
116897
  [DeviceType.Container]: HERO_LAYOUT_DEFAULT,
@@ -117303,6 +117615,7 @@ var HERO_LOOK_BY_TYPE = {
117303
117615
  [DeviceType.Control]: CONTROL_LOOK,
117304
117616
  [DeviceType.Presence]: PRESENCE_LOOK,
117305
117617
  [DeviceType.Weather]: WEATHER_LOOK,
117618
+ [DeviceType.WeatherStation]: WEATHER_LOOK,
117306
117619
  [DeviceType.Vacuum]: VACUUM_LOOK,
117307
117620
  [DeviceType.LawnMower]: MOWER_LOOK,
117308
117621
  [DeviceType.Container]: HERO_LOOK_DEFAULT,
@@ -127964,6 +128277,13 @@ var METHOD_ACCESS_MAP = Object.freeze({
127964
128277
  access: "view",
127965
128278
  role: "viewer"
127966
128279
  },
128280
+ "weatherStation.getStatus": {
128281
+ capName: "weather-station",
128282
+ capScope: "device",
128283
+ addonId: null,
128284
+ access: "view",
128285
+ role: "viewer"
128286
+ },
127967
128287
  "webrtcSession.addIceCandidate": {
127968
128288
  capName: "webrtc-session",
127969
128289
  capScope: "device",
@@ -128410,7 +128730,7 @@ function offered(received) {
128410
128730
  };
128411
128731
  }
128412
128732
  offered(HA_AS), withheld(HOMEKIT_REASON), withheld(ALEXA_REASON), withheld(GOOGLE_REASON), withheld(MATTER_REASON);
128413
- DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.HeatPump, DeviceType.EnergySystem, 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.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
128733
+ DeviceType.Camera, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Climate, DeviceType.HeatPump, DeviceType.EnergySystem, 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.WeatherStation, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.PetFountain, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Gateway;
128414
128734
  DeviceRole.Siren, DeviceRole.Floodlight, DeviceRole.Spotlight, DeviceRole.PirSensor, DeviceRole.Chime, DeviceRole.Autotrack, DeviceRole.Nightvision, DeviceRole.PrivacyMask, DeviceRole.Doorbell, DeviceRole.CoverBlind, DeviceRole.CoverShutter, DeviceRole.CoverAwning, DeviceRole.CoverCurtain, DeviceRole.CoverGarage, DeviceRole.CoverGate, DeviceRole.CoverDoor, DeviceRole.CoverWindow, DeviceRole.BinaryHelper, DeviceRole.Outlet, DeviceRole.SwitchHeater, DeviceRole.SwitchFan, DeviceRole.SwitchLight, DeviceRole.ClimateAc, DeviceRole.ClimateThermostat, DeviceRole.ClimateFloor, DeviceRole.ClimateRadiator, DeviceRole.ClimateHeater, DeviceRole.ClimateHeatPumpCircuit, DeviceRole.MotionSensor, DeviceRole.ContactSensor, DeviceRole.LeakSensor, DeviceRole.SmokeSensor, DeviceRole.COSensor, DeviceRole.GasSensor, DeviceRole.TamperSensor, DeviceRole.VibrationSensor, DeviceRole.ConnectivitySensor, DeviceRole.SoundSensor, DeviceRole.BinarySensor, DeviceRole.TemperatureSensor, DeviceRole.HumiditySensor, DeviceRole.AmbientLightSensor, DeviceRole.PressureSensor, DeviceRole.WindSensor, DeviceRole.RainSensor, DeviceRole.UvSensor, DeviceRole.SolarRadiationSensor, DeviceRole.SoilMoistureSensor, DeviceRole.PowerSensor, DeviceRole.EnergySensor, DeviceRole.VoltageSensor, DeviceRole.CurrentSensor, DeviceRole.AirQualitySensor, DeviceRole.BatterySensor, DeviceRole.NumericSensor, DeviceRole.EnumSensor, DeviceRole.DateTimeSensor, DeviceRole.GenericSensor, DeviceRole.NumericControl, DeviceRole.SelectControl, DeviceRole.TextControl, DeviceRole.DateTimeControl, DeviceRole.MobilePushNotifier, DeviceRole.MessagingNotifier, DeviceRole.EmailNotifier, DeviceRole.GenericNotifier, DeviceRole.IrTransmitter;
128415
128735
  new Set(Object.values(DeviceType));
128416
128736
  new Set(Object.values(DeviceRole));
@@ -128503,7 +128823,8 @@ var CAP_NAMES_WITH_STATUS = [
128503
128823
  "valve",
128504
128824
  "vibration",
128505
128825
  "water-heater",
128506
- "weather"
128826
+ "weather",
128827
+ "weather-station"
128507
128828
  ];
128508
128829
  Object.freeze({
128509
128830
  "accessories.getStatus": [{
@@ -131530,6 +131851,11 @@ Object.freeze({
131530
131851
  form: "single",
131531
131852
  optional: false
131532
131853
  }],
131854
+ "weatherStation.getStatus": [{
131855
+ name: "deviceId",
131856
+ form: "single",
131857
+ optional: false
131858
+ }],
131533
131859
  "webrtcSession.addIceCandidate": [{
131534
131860
  name: "deviceId",
131535
131861
  form: "single",
@@ -131653,7 +131979,7 @@ Object.freeze({
131653
131979
  });
131654
131980
  /**
131655
131981
  * Per-cap runtime-state policy, projected from every `*.cap.ts` that declares
131656
- * `runtimeState`. 83 caps: 42 `restored`, 41 `session`.
131982
+ * `runtimeState`. 84 caps: 42 `restored`, 42 `session`.
131657
131983
  *
131658
131984
  * A cap absent from this map has no runtime-state slice at all. A cap PRESENT
131659
131985
  * with `durability: 'session'` has one and has decided not to keep it.
@@ -131981,6 +132307,10 @@ var RUNTIME_STATE_POLICY = {
131981
132307
  durability: "session",
131982
132308
  volatileFields: []
131983
132309
  },
132310
+ "weather-station": {
132311
+ durability: "session",
132312
+ volatileFields: []
132313
+ },
131984
132314
  "zone-analytics": {
131985
132315
  durability: "session",
131986
132316
  volatileFields: []