@camera.ui/sdk 0.0.24 → 0.0.26

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/index.d.ts CHANGED
@@ -843,6 +843,10 @@ interface DeviceStorage<T extends Record<string, any> = Record<string, any>> {
843
843
  save(): Promise<void>;
844
844
  }
845
845
 
846
+ /** Object-detection labels the detector groups its classes into. */
847
+ declare const OBJECT_DETECTION_LABELS: readonly ["person", "vehicle", "animal", "package"];
848
+ /** Union of the object-detection label strings. */
849
+ type ObjectDetectionLabel = (typeof OBJECT_DETECTION_LABELS)[number];
846
850
  /** Built-in detection label types recognized across the system. */
847
851
  declare const DETECTION_LABELS: readonly ["motion", "person", "vehicle", "animal", "package", "audio"];
848
852
  /** Union of the built-in detection label strings. */
@@ -852,24 +856,24 @@ declare const DETECTION_ATTRIBUTES: readonly ["face", "license_plate"];
852
856
  /** Union of the built-in detection attribute strings. */
853
857
  type DetectionAttribute = (typeof DETECTION_ATTRIBUTES)[number];
854
858
  /**
855
- * Bounding box of a detection. All coordinates are normalized to 01
859
+ * Bounding box of a detection. All coordinates are normalized to 0-1
856
860
  * (fraction of frame dimensions), so they are independent of resolution.
857
861
  */
858
862
  interface BoundingBox {
859
- /** X coordinate of the top-left corner (01). */
863
+ /** X coordinate of the top-left corner (0-1). */
860
864
  x: number;
861
- /** Y coordinate of the top-left corner (01). */
865
+ /** Y coordinate of the top-left corner (0-1). */
862
866
  y: number;
863
- /** Width as a fraction of frame width (01). */
867
+ /** Width as a fraction of frame width (0-1). */
864
868
  width: number;
865
- /** Height as a fraction of frame height (01). */
869
+ /** Height as a fraction of frame height (0-1). */
866
870
  height: number;
867
871
  }
868
872
  /** A single detection result emitted by any detection sensor. */
869
873
  interface Detection {
870
874
  /** Detection label (e.g. `'person'`, `'vehicle'`). */
871
875
  label: DetectionLabel;
872
- /** Confidence score in the range 01. */
876
+ /** Confidence score in the range 0-1. */
873
877
  confidence: number;
874
878
  /** Bounding box in normalized coordinates. */
875
879
  box: BoundingBox;
@@ -1102,6 +1106,137 @@ declare abstract class AudioDetectorSensor<TStorage extends object = Record<stri
1102
1106
  /** Analyze a single audio frame for events. Called by the backend at the configured cadence. */
1103
1107
  abstract detectAudio(audio: AudioFrameData): Promise<AudioResult>;
1104
1108
  }
1109
+ /** Registry metadata for {@link AudioSensor}. */
1110
+ declare const audioMeta: {
1111
+ readonly type: SensorType.Audio;
1112
+ readonly category: SensorCategory.Sensor;
1113
+ readonly assignmentKey: "audio";
1114
+ readonly multiProvider: false;
1115
+ readonly isDetectionType: true;
1116
+ readonly properties: {
1117
+ readonly detected: {
1118
+ readonly type: "boolean";
1119
+ };
1120
+ readonly detections: {
1121
+ readonly type: "object";
1122
+ readonly internal: true;
1123
+ };
1124
+ readonly decibels: {
1125
+ readonly type: "number";
1126
+ readonly unit: "dB";
1127
+ };
1128
+ readonly lastTriggered: {
1129
+ readonly type: "number";
1130
+ readonly internal: true;
1131
+ };
1132
+ };
1133
+ readonly semantics: null;
1134
+ };
1135
+
1136
+ /** Condition under which a sensor arms an automation cascade. */
1137
+ interface SensorCascadeTrigger {
1138
+ readonly property: string;
1139
+ readonly value: unknown;
1140
+ readonly sustained: boolean;
1141
+ }
1142
+ /** Initial property values and capabilities for a user-created virtual sensor. */
1143
+ interface SensorVirtualDefaults {
1144
+ readonly properties: Readonly<Record<string, unknown>>;
1145
+ readonly capabilities?: readonly string[];
1146
+ }
1147
+ /** Runtime value type of a sensor property. */
1148
+ type SensorPropertyValueType = 'boolean' | 'number' | 'string' | 'enum' | 'object';
1149
+ /**
1150
+ * Per-property value description: what type a property carries, its possible
1151
+ * enum values or numeric range, and whether it is a command or an internal
1152
+ * detail. Consumers (automation pickers, value editors) render from this
1153
+ * instead of hand-maintained tables.
1154
+ */
1155
+ interface SensorPropertySpec {
1156
+ readonly type: SensorPropertyValueType;
1157
+ /** Enum properties: value-name → wire value. Names double as i18n key stems. */
1158
+ readonly values?: Readonly<Record<string, string | number>>;
1159
+ /** Object properties: scalar member keys, exposed as value-path variables. */
1160
+ readonly keys?: readonly string[];
1161
+ readonly min?: number;
1162
+ readonly max?: number;
1163
+ readonly unit?: string;
1164
+ /** Accepts external writes (commands, target states, virtual sensor state). */
1165
+ readonly writable?: boolean;
1166
+ /** Not an observable state: hidden from trigger/condition pickers. */
1167
+ readonly internal?: boolean;
1168
+ }
1169
+ /** The kind of thing a sensor is, used by consumers to pick how to render it. */
1170
+ declare enum SensorDomain {
1171
+ Binary = "binary",
1172
+ Measurement = "measurement",
1173
+ Switch = "switch",
1174
+ Light = "light",
1175
+ Siren = "siren",
1176
+ Lock = "lock",
1177
+ Cover = "cover",
1178
+ Alarm = "alarm"
1179
+ }
1180
+ /**
1181
+ * What a sensor means, independent of any transport: which property holds its
1182
+ * state, which takes commands, its unit and state mapping. Consumers (MQTT
1183
+ * discovery, the HA integration) render from this instead of their own switch.
1184
+ */
1185
+ interface SensorSemantics {
1186
+ readonly domain: SensorDomain;
1187
+ readonly stateProperty: string;
1188
+ readonly commandProperty: string;
1189
+ readonly deviceClass?: string;
1190
+ readonly unit?: string;
1191
+ readonly icon?: string;
1192
+ readonly diagnostic?: boolean;
1193
+ readonly states?: Readonly<Record<string, number>>;
1194
+ readonly brightness?: {
1195
+ readonly property: string;
1196
+ readonly scale: number;
1197
+ };
1198
+ }
1199
+ /**
1200
+ * Metadata for a sensor type, declared alongside its class via {@link defineSensor}.
1201
+ *
1202
+ * Collected into the sensor registry, from which plugin assignment keys and the
1203
+ * host's per-type tables derive, so each type is described once instead of in
1204
+ * several parallel tables that drift apart.
1205
+ */
1206
+ interface SensorMeta {
1207
+ readonly type: SensorType;
1208
+ readonly category: SensorCategory;
1209
+ readonly assignmentKey: string;
1210
+ readonly multiProvider: boolean;
1211
+ readonly isDetectionType: boolean;
1212
+ readonly properties: Readonly<Record<string, SensorPropertySpec>>;
1213
+ readonly shortcutable?: boolean;
1214
+ readonly cascadeTrigger?: SensorCascadeTrigger;
1215
+ readonly propertyCapabilities?: Readonly<Record<string, string>>;
1216
+ readonly virtual?: SensorVirtualDefaults;
1217
+ readonly semantics?: SensorSemantics | null;
1218
+ }
1219
+ /**
1220
+ * Declares the metadata for a sensor type: how it is assigned, scheduled, and
1221
+ * optionally created as a virtual sensor.
1222
+ *
1223
+ * @param meta - The sensor's metadata.
1224
+ *
1225
+ * @returns The same metadata, with `type` and `assignmentKey` preserved as literal
1226
+ * types so the registry can be checked for completeness and its keys derived.
1227
+ *
1228
+ * @example
1229
+ * ```ts
1230
+ * export const lightMeta = defineSensor({
1231
+ * type: SensorType.Light,
1232
+ * category: SensorCategory.Control,
1233
+ * assignmentKey: 'light',
1234
+ * multiProvider: true,
1235
+ * isDetectionType: false,
1236
+ * });
1237
+ * ```
1238
+ */
1239
+ declare function defineSensor<const M extends SensorMeta>(meta: M): M;
1105
1240
 
1106
1241
  /** Optional capabilities for battery info sensors */
1107
1242
  declare enum BatteryCapability {
@@ -1116,7 +1251,7 @@ declare enum BatteryCapability {
1116
1251
  * @internal
1117
1252
  */
1118
1253
  declare enum BatteryProperty {
1119
- /** Battery level percentage (0100) */
1254
+ /** Battery level percentage (0-100) */
1120
1255
  Level = "level",
1121
1256
  /** Current charging state */
1122
1257
  Charging = "charging",
@@ -1170,7 +1305,7 @@ declare class BatteryInfo<TStorage extends object = Record<string, any>> extends
1170
1305
  /**
1171
1306
  * Report a new battery level (percentage). Clamped to [0, 100].
1172
1307
  *
1173
- * @param value - Battery level percentage in the range 0100.
1308
+ * @param value - Battery level percentage in the range 0-100.
1174
1309
  *
1175
1310
  * @example
1176
1311
  * ```ts
@@ -1216,6 +1351,47 @@ declare class BatteryInfo<TStorage extends object = Record<string, any>> extends
1216
1351
  */
1217
1352
  updateValue(_property: string, _value: unknown): void;
1218
1353
  }
1354
+ /** Registry metadata for {@link BatteryInfo}. */
1355
+ declare const batteryMeta: {
1356
+ readonly type: SensorType.Battery;
1357
+ readonly category: SensorCategory.Info;
1358
+ readonly assignmentKey: "battery";
1359
+ readonly multiProvider: false;
1360
+ readonly isDetectionType: false;
1361
+ readonly properties: {
1362
+ readonly level: {
1363
+ readonly type: "number";
1364
+ readonly min: 0;
1365
+ readonly max: 100;
1366
+ readonly unit: "%";
1367
+ };
1368
+ readonly charging: {
1369
+ readonly type: "enum";
1370
+ readonly values: {
1371
+ readonly not_chargeable: ChargingState.NotChargeable;
1372
+ readonly not_charging: ChargingState.NotCharging;
1373
+ readonly charging: ChargingState.Charging;
1374
+ readonly full: ChargingState.Full;
1375
+ };
1376
+ };
1377
+ readonly low: {
1378
+ readonly type: "boolean";
1379
+ };
1380
+ };
1381
+ readonly shortcutable: true;
1382
+ readonly propertyCapabilities: {
1383
+ readonly charging: BatteryCapability.Charging;
1384
+ readonly low: BatteryCapability.LowBattery;
1385
+ };
1386
+ readonly semantics: {
1387
+ readonly domain: SensorDomain.Measurement;
1388
+ readonly stateProperty: BatteryProperty.Level;
1389
+ readonly commandProperty: BatteryProperty.Level;
1390
+ readonly deviceClass: "battery";
1391
+ readonly unit: "%";
1392
+ readonly diagnostic: true;
1393
+ };
1394
+ };
1219
1395
 
1220
1396
  /**
1221
1397
  * Properties for contact sensors
@@ -1273,6 +1449,37 @@ declare class ContactSensor<TStorage extends object = Record<string, any>> exten
1273
1449
  */
1274
1450
  updateValue(_property: string, _value: unknown): void;
1275
1451
  }
1452
+ /** Registry metadata for {@link ContactSensor}. */
1453
+ declare const contactMeta: {
1454
+ readonly type: SensorType.Contact;
1455
+ readonly category: SensorCategory.Sensor;
1456
+ readonly assignmentKey: "contact";
1457
+ readonly multiProvider: true;
1458
+ readonly isDetectionType: false;
1459
+ readonly properties: {
1460
+ readonly detected: {
1461
+ readonly type: "boolean";
1462
+ readonly writable: true;
1463
+ };
1464
+ };
1465
+ readonly shortcutable: true;
1466
+ readonly cascadeTrigger: {
1467
+ readonly property: ContactProperty;
1468
+ readonly value: true;
1469
+ readonly sustained: true;
1470
+ };
1471
+ readonly virtual: {
1472
+ readonly properties: {
1473
+ readonly detected: false;
1474
+ };
1475
+ };
1476
+ readonly semantics: {
1477
+ readonly domain: SensorDomain.Binary;
1478
+ readonly stateProperty: ContactProperty;
1479
+ readonly commandProperty: ContactProperty;
1480
+ readonly deviceClass: "opening";
1481
+ };
1482
+ };
1276
1483
 
1277
1484
  /**
1278
1485
  * Properties for doorbell triggers
@@ -1340,6 +1547,37 @@ declare class DoorbellTrigger<TStorage extends object = Record<string, any>> ext
1340
1547
  updateValue(property: string, value: unknown): void;
1341
1548
  _cleanup(): void;
1342
1549
  }
1550
+ /** Registry metadata for {@link DoorbellTrigger}. */
1551
+ declare const doorbellMeta: {
1552
+ readonly type: SensorType.Doorbell;
1553
+ readonly category: SensorCategory.Trigger;
1554
+ readonly assignmentKey: "doorbell";
1555
+ readonly multiProvider: true;
1556
+ readonly isDetectionType: false;
1557
+ readonly properties: {
1558
+ readonly ring: {
1559
+ readonly type: "boolean";
1560
+ readonly writable: true;
1561
+ };
1562
+ };
1563
+ readonly shortcutable: true;
1564
+ readonly cascadeTrigger: {
1565
+ readonly property: DoorbellProperty;
1566
+ readonly value: true;
1567
+ readonly sustained: false;
1568
+ };
1569
+ readonly virtual: {
1570
+ readonly properties: {
1571
+ readonly ring: false;
1572
+ };
1573
+ };
1574
+ readonly semantics: {
1575
+ readonly domain: SensorDomain.Binary;
1576
+ readonly stateProperty: DoorbellProperty;
1577
+ readonly commandProperty: DoorbellProperty;
1578
+ readonly icon: "mdi:doorbell";
1579
+ };
1580
+ };
1343
1581
 
1344
1582
  /**
1345
1583
  * Property names of a face detection sensor.
@@ -1474,6 +1712,24 @@ declare abstract class FaceDetectorSensor<TStorage extends object = Record<strin
1474
1712
  */
1475
1713
  abstract detectFaces(frames: VideoFrameData[]): Promise<FaceResult[]>;
1476
1714
  }
1715
+ /** Registry metadata for {@link FaceSensor}. */
1716
+ declare const faceMeta: {
1717
+ readonly type: SensorType.Face;
1718
+ readonly category: SensorCategory.Sensor;
1719
+ readonly assignmentKey: "face";
1720
+ readonly multiProvider: false;
1721
+ readonly isDetectionType: true;
1722
+ readonly properties: {
1723
+ readonly detected: {
1724
+ readonly type: "boolean";
1725
+ };
1726
+ readonly detections: {
1727
+ readonly type: "object";
1728
+ readonly internal: true;
1729
+ };
1730
+ };
1731
+ readonly semantics: null;
1732
+ };
1477
1733
 
1478
1734
  /** Garage door states (HomeKit-compatible values) */
1479
1735
  declare enum GarageState {
@@ -1585,6 +1841,62 @@ declare class GarageControl<TStorage extends object = Record<string, any>> exten
1585
1841
  */
1586
1842
  updateValue(property: string, value: unknown): Promise<void>;
1587
1843
  }
1844
+ /** Registry metadata for {@link GarageControl}. */
1845
+ declare const garageMeta: {
1846
+ readonly type: SensorType.Garage;
1847
+ readonly category: SensorCategory.Control;
1848
+ readonly assignmentKey: "garage";
1849
+ readonly multiProvider: true;
1850
+ readonly isDetectionType: false;
1851
+ readonly properties: {
1852
+ readonly currentState: {
1853
+ readonly type: "enum";
1854
+ readonly values: {
1855
+ readonly open: GarageState.Open;
1856
+ readonly closed: GarageState.Closed;
1857
+ readonly opening: GarageState.Opening;
1858
+ readonly closing: GarageState.Closing;
1859
+ readonly stopped: GarageState.Stopped;
1860
+ };
1861
+ };
1862
+ readonly targetState: {
1863
+ readonly type: "enum";
1864
+ readonly values: {
1865
+ readonly open: GarageState.Open;
1866
+ readonly closed: GarageState.Closed;
1867
+ };
1868
+ readonly writable: true;
1869
+ };
1870
+ readonly obstructionDetected: {
1871
+ readonly type: "boolean";
1872
+ };
1873
+ };
1874
+ readonly shortcutable: true;
1875
+ readonly cascadeTrigger: {
1876
+ readonly property: GarageProperty.CurrentState;
1877
+ readonly value: 0;
1878
+ readonly sustained: true;
1879
+ };
1880
+ readonly virtual: {
1881
+ readonly properties: {
1882
+ readonly currentState: 1;
1883
+ readonly targetState: 1;
1884
+ };
1885
+ };
1886
+ readonly semantics: {
1887
+ readonly domain: SensorDomain.Cover;
1888
+ readonly stateProperty: GarageProperty.CurrentState;
1889
+ readonly commandProperty: GarageProperty.TargetState;
1890
+ readonly deviceClass: "garage";
1891
+ readonly states: {
1892
+ readonly open: GarageState.Open;
1893
+ readonly closed: GarageState.Closed;
1894
+ readonly opening: GarageState.Opening;
1895
+ readonly closing: GarageState.Closing;
1896
+ readonly stopped: GarageState.Stopped;
1897
+ };
1898
+ };
1899
+ };
1588
1900
 
1589
1901
  /**
1590
1902
  * Properties for humidity sensors
@@ -1592,7 +1904,7 @@ declare class GarageControl<TStorage extends object = Record<string, any>> exten
1592
1904
  * @internal
1593
1905
  */
1594
1906
  declare enum HumidityProperty {
1595
- /** Current relative humidity (0100%) */
1907
+ /** Current relative humidity (0-100%) */
1596
1908
  Current = "current"
1597
1909
  }
1598
1910
  /**
@@ -1619,7 +1931,7 @@ declare class HumidityInfo<TStorage extends object = Record<string, any>> extend
1619
1931
  /**
1620
1932
  * Report a new humidity reading. Clamped to [0, 100] %.
1621
1933
  *
1622
- * @param value - Relative humidity percentage in the range 0100.
1934
+ * @param value - Relative humidity percentage in the range 0-100.
1623
1935
  *
1624
1936
  * @example
1625
1937
  * ```ts
@@ -1642,6 +1954,36 @@ declare class HumidityInfo<TStorage extends object = Record<string, any>> extend
1642
1954
  */
1643
1955
  updateValue(_property: string, _value: unknown): void;
1644
1956
  }
1957
+ /** Registry metadata for {@link HumidityInfo}. */
1958
+ declare const humidityMeta: {
1959
+ readonly type: SensorType.Humidity;
1960
+ readonly category: SensorCategory.Info;
1961
+ readonly assignmentKey: "humidity";
1962
+ readonly multiProvider: true;
1963
+ readonly isDetectionType: false;
1964
+ readonly properties: {
1965
+ readonly current: {
1966
+ readonly type: "number";
1967
+ readonly min: 0;
1968
+ readonly max: 100;
1969
+ readonly unit: "%";
1970
+ readonly writable: true;
1971
+ };
1972
+ };
1973
+ readonly shortcutable: true;
1974
+ readonly virtual: {
1975
+ readonly properties: {
1976
+ readonly current: 50;
1977
+ };
1978
+ };
1979
+ readonly semantics: {
1980
+ readonly domain: SensorDomain.Measurement;
1981
+ readonly stateProperty: HumidityProperty;
1982
+ readonly commandProperty: HumidityProperty;
1983
+ readonly deviceClass: "humidity";
1984
+ readonly unit: "%";
1985
+ };
1986
+ };
1645
1987
 
1646
1988
  /**
1647
1989
  * Properties for leak sensors
@@ -1699,6 +2041,37 @@ declare class LeakSensor<TStorage extends object = Record<string, any>> extends
1699
2041
  */
1700
2042
  updateValue(_property: string, _value: unknown): void;
1701
2043
  }
2044
+ /** Registry metadata for {@link LeakSensor}. */
2045
+ declare const leakMeta: {
2046
+ readonly type: SensorType.Leak;
2047
+ readonly category: SensorCategory.Sensor;
2048
+ readonly assignmentKey: "leak";
2049
+ readonly multiProvider: true;
2050
+ readonly isDetectionType: false;
2051
+ readonly properties: {
2052
+ readonly detected: {
2053
+ readonly type: "boolean";
2054
+ readonly writable: true;
2055
+ };
2056
+ };
2057
+ readonly shortcutable: true;
2058
+ readonly cascadeTrigger: {
2059
+ readonly property: LeakProperty;
2060
+ readonly value: true;
2061
+ readonly sustained: true;
2062
+ };
2063
+ readonly virtual: {
2064
+ readonly properties: {
2065
+ readonly detected: false;
2066
+ };
2067
+ };
2068
+ readonly semantics: {
2069
+ readonly domain: SensorDomain.Binary;
2070
+ readonly stateProperty: LeakProperty;
2071
+ readonly commandProperty: LeakProperty;
2072
+ readonly deviceClass: "moisture";
2073
+ };
2074
+ };
1702
2075
 
1703
2076
  /**
1704
2077
  * Property names of a license plate detection sensor.
@@ -1826,10 +2199,28 @@ declare abstract class LicensePlateDetectorSensor<TStorage extends object = Reco
1826
2199
  */
1827
2200
  abstract detectLicensePlates(frames: VideoFrameData[]): Promise<LicensePlateResult[]>;
1828
2201
  }
2202
+ /** Registry metadata for {@link LicensePlateSensor}. */
2203
+ declare const licensePlateMeta: {
2204
+ readonly type: SensorType.LicensePlate;
2205
+ readonly category: SensorCategory.Sensor;
2206
+ readonly assignmentKey: "licensePlate";
2207
+ readonly multiProvider: false;
2208
+ readonly isDetectionType: true;
2209
+ readonly properties: {
2210
+ readonly detected: {
2211
+ readonly type: "boolean";
2212
+ };
2213
+ readonly detections: {
2214
+ readonly type: "object";
2215
+ readonly internal: true;
2216
+ };
2217
+ };
2218
+ readonly semantics: null;
2219
+ };
1829
2220
 
1830
2221
  /** Optional capabilities for light controls */
1831
2222
  declare enum LightCapability {
1832
- /** Light supports brightness adjustment (0100) */
2223
+ /** Light supports brightness adjustment (0-100) */
1833
2224
  Brightness = "brightness"
1834
2225
  }
1835
2226
  /**
@@ -1840,7 +2231,7 @@ declare enum LightCapability {
1840
2231
  declare enum LightProperty {
1841
2232
  /** Whether the light is on */
1842
2233
  On = "on",
1843
- /** Brightness level (0100) */
2234
+ /** Brightness level (0-100) */
1844
2235
  Brightness = "brightness"
1845
2236
  }
1846
2237
  /**
@@ -1902,7 +2293,7 @@ declare class LightControl<TStorage extends object = Record<string, any>> extend
1902
2293
  * Set brightness. Override to drive hardware and call `await super.setBrightness(value)`
1903
2294
  * after the hardware call succeeds. The default implementation clamps the value to [0, 100].
1904
2295
  *
1905
- * @param value - Brightness level in the range 0100.
2296
+ * @param value - Brightness level in the range 0-100.
1906
2297
  *
1907
2298
  * @example
1908
2299
  * ```ts
@@ -1923,6 +2314,48 @@ declare class LightControl<TStorage extends object = Record<string, any>> extend
1923
2314
  */
1924
2315
  updateValue(property: string, value: unknown): Promise<void>;
1925
2316
  }
2317
+ /** Registry metadata for {@link LightControl}. */
2318
+ declare const lightMeta: {
2319
+ readonly type: SensorType.Light;
2320
+ readonly category: SensorCategory.Control;
2321
+ readonly assignmentKey: "light";
2322
+ readonly multiProvider: true;
2323
+ readonly isDetectionType: false;
2324
+ readonly properties: {
2325
+ readonly on: {
2326
+ readonly type: "boolean";
2327
+ readonly writable: true;
2328
+ };
2329
+ readonly brightness: {
2330
+ readonly type: "number";
2331
+ readonly min: 0;
2332
+ readonly max: 100;
2333
+ readonly unit: "%";
2334
+ readonly writable: true;
2335
+ };
2336
+ };
2337
+ readonly shortcutable: true;
2338
+ readonly cascadeTrigger: {
2339
+ readonly property: LightProperty.On;
2340
+ readonly value: true;
2341
+ readonly sustained: true;
2342
+ };
2343
+ readonly propertyCapabilities: {
2344
+ readonly brightness: LightCapability;
2345
+ };
2346
+ readonly virtual: {
2347
+ readonly properties: {
2348
+ readonly on: false;
2349
+ readonly brightness: 100;
2350
+ };
2351
+ readonly capabilities: readonly [LightCapability];
2352
+ };
2353
+ readonly semantics: {
2354
+ readonly domain: SensorDomain.Light;
2355
+ readonly stateProperty: LightProperty.On;
2356
+ readonly commandProperty: LightProperty.On;
2357
+ };
2358
+ };
1926
2359
 
1927
2360
  /** Lock states (HomeKit-compatible values) */
1928
2361
  declare enum LockState {
@@ -2015,6 +2448,53 @@ declare class LockControl<TStorage extends object = Record<string, any>> extends
2015
2448
  */
2016
2449
  updateValue(property: string, value: unknown): Promise<void>;
2017
2450
  }
2451
+ /** Registry metadata for {@link LockControl}. */
2452
+ declare const lockMeta: {
2453
+ readonly type: SensorType.Lock;
2454
+ readonly category: SensorCategory.Control;
2455
+ readonly assignmentKey: "lock";
2456
+ readonly multiProvider: true;
2457
+ readonly isDetectionType: false;
2458
+ readonly properties: {
2459
+ readonly currentState: {
2460
+ readonly type: "enum";
2461
+ readonly values: {
2462
+ readonly secured: LockState.Secured;
2463
+ readonly unsecured: LockState.Unsecured;
2464
+ readonly unknown: LockState.Unknown;
2465
+ };
2466
+ };
2467
+ readonly targetState: {
2468
+ readonly type: "enum";
2469
+ readonly values: {
2470
+ readonly secured: LockState.Secured;
2471
+ readonly unsecured: LockState.Unsecured;
2472
+ };
2473
+ readonly writable: true;
2474
+ };
2475
+ };
2476
+ readonly shortcutable: true;
2477
+ readonly cascadeTrigger: {
2478
+ readonly property: LockProperty.CurrentState;
2479
+ readonly value: 1;
2480
+ readonly sustained: true;
2481
+ };
2482
+ readonly virtual: {
2483
+ readonly properties: {
2484
+ readonly currentState: 0;
2485
+ readonly targetState: 0;
2486
+ };
2487
+ };
2488
+ readonly semantics: {
2489
+ readonly domain: SensorDomain.Lock;
2490
+ readonly stateProperty: LockProperty.CurrentState;
2491
+ readonly commandProperty: LockProperty.TargetState;
2492
+ readonly states: {
2493
+ readonly locked: LockState.Secured;
2494
+ readonly unlocked: LockState.Unsecured;
2495
+ };
2496
+ };
2497
+ };
2018
2498
 
2019
2499
  /**
2020
2500
  * Property names of a motion sensor.
@@ -2139,6 +2619,32 @@ declare abstract class MotionDetectorSensor<TStorage extends object = Record<str
2139
2619
  /** Analyze a single video frame for motion. Called by the backend at the configured interval. */
2140
2620
  abstract detectMotion(frame: VideoFrameData): Promise<MotionResult>;
2141
2621
  }
2622
+ /** Registry metadata for {@link MotionSensor}. */
2623
+ declare const motionMeta: {
2624
+ readonly type: SensorType.Motion;
2625
+ readonly category: SensorCategory.Sensor;
2626
+ readonly assignmentKey: "motion";
2627
+ readonly multiProvider: false;
2628
+ readonly isDetectionType: true;
2629
+ readonly properties: {
2630
+ readonly detected: {
2631
+ readonly type: "boolean";
2632
+ };
2633
+ readonly detections: {
2634
+ readonly type: "object";
2635
+ readonly internal: true;
2636
+ };
2637
+ readonly blocked: {
2638
+ readonly type: "boolean";
2639
+ readonly internal: true;
2640
+ };
2641
+ readonly lastTriggered: {
2642
+ readonly type: "number";
2643
+ readonly internal: true;
2644
+ };
2645
+ };
2646
+ readonly semantics: null;
2647
+ };
2142
2648
 
2143
2649
  /**
2144
2650
  * Property names of an object detection sensor.
@@ -2282,6 +2788,27 @@ declare abstract class ObjectDetectorSensor<TStorage extends object = Record<str
2282
2788
  /** Analyze a single video frame for objects. Called by the backend at the configured interval. */
2283
2789
  abstract detectObjects(frame: VideoFrameData): Promise<ObjectResult>;
2284
2790
  }
2791
+ /** Registry metadata for {@link ObjectSensor}. */
2792
+ declare const objectMeta: {
2793
+ readonly type: SensorType.Object;
2794
+ readonly category: SensorCategory.Sensor;
2795
+ readonly assignmentKey: "object";
2796
+ readonly multiProvider: false;
2797
+ readonly isDetectionType: true;
2798
+ readonly properties: {
2799
+ readonly detected: {
2800
+ readonly type: "boolean";
2801
+ };
2802
+ readonly detections: {
2803
+ readonly type: "object";
2804
+ readonly internal: true;
2805
+ };
2806
+ readonly labels: {
2807
+ readonly type: "object";
2808
+ };
2809
+ };
2810
+ readonly semantics: null;
2811
+ };
2285
2812
 
2286
2813
  /**
2287
2814
  * Properties for occupancy sensors
@@ -2339,11 +2866,45 @@ declare class OccupancySensor<TStorage extends object = Record<string, any>> ext
2339
2866
  */
2340
2867
  updateValue(_property: string, _value: unknown): void;
2341
2868
  }
2869
+ /** Registry metadata for {@link OccupancySensor}. */
2870
+ declare const occupancyMeta: {
2871
+ readonly type: SensorType.Occupancy;
2872
+ readonly category: SensorCategory.Sensor;
2873
+ readonly assignmentKey: "occupancy";
2874
+ readonly multiProvider: true;
2875
+ readonly isDetectionType: false;
2876
+ readonly properties: {
2877
+ readonly detected: {
2878
+ readonly type: "boolean";
2879
+ readonly writable: true;
2880
+ };
2881
+ };
2882
+ readonly shortcutable: true;
2883
+ readonly cascadeTrigger: {
2884
+ readonly property: OccupancyProperty;
2885
+ readonly value: true;
2886
+ readonly sustained: true;
2887
+ };
2888
+ readonly virtual: {
2889
+ readonly properties: {
2890
+ readonly detected: false;
2891
+ };
2892
+ };
2893
+ readonly semantics: {
2894
+ readonly domain: SensorDomain.Binary;
2895
+ readonly stateProperty: OccupancyProperty;
2896
+ readonly commandProperty: OccupancyProperty;
2897
+ readonly deviceClass: "occupancy";
2898
+ };
2899
+ };
2342
2900
 
2343
2901
  /** Optional capabilities for PTZ controls. Add to `capabilities` to enable features. */
2344
2902
  declare enum PTZCapability {
2903
+ /** Camera supports panning (horizontal movement) */
2345
2904
  Pan = "pan",
2905
+ /** Camera supports tilting (vertical movement) */
2346
2906
  Tilt = "tilt",
2907
+ /** Camera supports zoom */
2347
2908
  Zoom = "zoom",
2348
2909
  /** Camera supports named position presets */
2349
2910
  Presets = "presets",
@@ -2373,7 +2934,9 @@ declare enum PTZProperty {
2373
2934
  /** Target preset to move to */
2374
2935
  TargetPreset = "targetPreset",
2375
2936
  /** Relative displacement move command (write-only) */
2376
- RelativeMove = "relativeMove"
2937
+ RelativeMove = "relativeMove",
2938
+ /** Move to the home position (write-only command, carries no state) */
2939
+ Home = "home"
2377
2940
  }
2378
2941
  /** Absolute PTZ position */
2379
2942
  interface PTZPosition {
@@ -2546,7 +3109,7 @@ declare class PTZControl<TStorage extends object = Record<string, any>> extends
2546
3109
  * Cross-process consumer entry point. Dispatches writable properties
2547
3110
  * to semantic methods so plugin overrides (hardware actions) are honored.
2548
3111
  * `moving` and `presets` are observed/discovered state and not externally writable;
2549
- * only `Position`, `Velocity`, `TargetPreset`, and `RelativeMove` may be set.
3112
+ * only `Position`, `Velocity`, `TargetPreset`, `RelativeMove` and `Home` may be set.
2550
3113
  *
2551
3114
  * @param property - Property name to write.
2552
3115
  *
@@ -2556,6 +3119,47 @@ declare class PTZControl<TStorage extends object = Record<string, any>> extends
2556
3119
  */
2557
3120
  updateValue(property: string, value: unknown): Promise<void>;
2558
3121
  }
3122
+ /** Registry metadata for {@link PTZControl}. */
3123
+ declare const ptzMeta: {
3124
+ readonly type: SensorType.PTZ;
3125
+ readonly category: SensorCategory.Control;
3126
+ readonly assignmentKey: "ptz";
3127
+ readonly multiProvider: false;
3128
+ readonly isDetectionType: false;
3129
+ readonly properties: {
3130
+ readonly position: {
3131
+ readonly type: "object";
3132
+ readonly writable: true;
3133
+ readonly keys: readonly ["pan", "tilt", "zoom"];
3134
+ };
3135
+ readonly moving: {
3136
+ readonly type: "boolean";
3137
+ };
3138
+ readonly presets: {
3139
+ readonly type: "object";
3140
+ };
3141
+ readonly velocity: {
3142
+ readonly type: "object";
3143
+ readonly writable: true;
3144
+ readonly internal: true;
3145
+ };
3146
+ readonly targetPreset: {
3147
+ readonly type: "string";
3148
+ readonly writable: true;
3149
+ };
3150
+ readonly relativeMove: {
3151
+ readonly type: "object";
3152
+ readonly writable: true;
3153
+ readonly internal: true;
3154
+ };
3155
+ readonly home: {
3156
+ readonly type: "boolean";
3157
+ readonly writable: true;
3158
+ readonly internal: true;
3159
+ };
3160
+ };
3161
+ readonly semantics: null;
3162
+ };
2559
3163
 
2560
3164
  /** Security system arm/disarm states (HomeKit-compatible values) */
2561
3165
  declare enum SecuritySystemState {
@@ -2652,10 +3256,64 @@ declare class SecuritySystem<TStorage extends object = Record<string, any>> exte
2652
3256
  */
2653
3257
  updateValue(property: string, value: unknown): Promise<void>;
2654
3258
  }
3259
+ /** Registry metadata for {@link SecuritySystem}. */
3260
+ declare const securitySystemMeta: {
3261
+ readonly type: SensorType.SecuritySystem;
3262
+ readonly category: SensorCategory.Control;
3263
+ readonly assignmentKey: "securitySystem";
3264
+ readonly multiProvider: true;
3265
+ readonly isDetectionType: false;
3266
+ readonly properties: {
3267
+ readonly currentState: {
3268
+ readonly type: "enum";
3269
+ readonly values: {
3270
+ readonly stay_arm: SecuritySystemState.StayArm;
3271
+ readonly away_arm: SecuritySystemState.AwayArm;
3272
+ readonly night_arm: SecuritySystemState.NightArm;
3273
+ readonly disarmed: SecuritySystemState.Disarmed;
3274
+ readonly alarm_triggered: SecuritySystemState.AlarmTriggered;
3275
+ };
3276
+ };
3277
+ readonly targetState: {
3278
+ readonly type: "enum";
3279
+ readonly values: {
3280
+ readonly stay_arm: SecuritySystemState.StayArm;
3281
+ readonly away_arm: SecuritySystemState.AwayArm;
3282
+ readonly night_arm: SecuritySystemState.NightArm;
3283
+ readonly disarmed: SecuritySystemState.Disarmed;
3284
+ };
3285
+ readonly writable: true;
3286
+ };
3287
+ };
3288
+ readonly shortcutable: true;
3289
+ readonly cascadeTrigger: {
3290
+ readonly property: SecuritySystemProperty.CurrentState;
3291
+ readonly value: 4;
3292
+ readonly sustained: true;
3293
+ };
3294
+ readonly virtual: {
3295
+ readonly properties: {
3296
+ readonly currentState: 3;
3297
+ readonly targetState: 3;
3298
+ };
3299
+ };
3300
+ readonly semantics: {
3301
+ readonly domain: SensorDomain.Alarm;
3302
+ readonly stateProperty: SecuritySystemProperty.CurrentState;
3303
+ readonly commandProperty: SecuritySystemProperty.TargetState;
3304
+ readonly states: {
3305
+ readonly armed_home: SecuritySystemState.StayArm;
3306
+ readonly armed_away: SecuritySystemState.AwayArm;
3307
+ readonly armed_night: SecuritySystemState.NightArm;
3308
+ readonly disarmed: SecuritySystemState.Disarmed;
3309
+ readonly triggered: SecuritySystemState.AlarmTriggered;
3310
+ };
3311
+ };
3312
+ };
2655
3313
 
2656
3314
  /** Optional capabilities for siren controls */
2657
3315
  declare enum SirenCapability {
2658
- /** Siren supports volume adjustment (0100) */
3316
+ /** Siren supports volume adjustment (0-100) */
2659
3317
  Volume = "volume"
2660
3318
  }
2661
3319
  /**
@@ -2666,7 +3324,7 @@ declare enum SirenCapability {
2666
3324
  declare enum SirenProperty {
2667
3325
  /** Whether the siren is currently active */
2668
3326
  Active = "active",
2669
- /** Volume level (0100) */
3327
+ /** Volume level (0-100) */
2670
3328
  Volume = "volume"
2671
3329
  }
2672
3330
  /**
@@ -2723,7 +3381,7 @@ declare class SirenControl<TStorage extends object = Record<string, any>> extend
2723
3381
  * Set volume. Override to drive hardware and call `await super.setVolume(value)`
2724
3382
  * after success. The default implementation clamps the value to [0, 100].
2725
3383
  *
2726
- * @param value - Volume level in the range 0100.
3384
+ * @param value - Volume level in the range 0-100.
2727
3385
  *
2728
3386
  * @example
2729
3387
  * ```ts
@@ -2744,6 +3402,48 @@ declare class SirenControl<TStorage extends object = Record<string, any>> extend
2744
3402
  */
2745
3403
  updateValue(property: string, value: unknown): Promise<void>;
2746
3404
  }
3405
+ /** Registry metadata for {@link SirenControl}. */
3406
+ declare const sirenMeta: {
3407
+ readonly type: SensorType.Siren;
3408
+ readonly category: SensorCategory.Control;
3409
+ readonly assignmentKey: "siren";
3410
+ readonly multiProvider: true;
3411
+ readonly isDetectionType: false;
3412
+ readonly properties: {
3413
+ readonly active: {
3414
+ readonly type: "boolean";
3415
+ readonly writable: true;
3416
+ };
3417
+ readonly volume: {
3418
+ readonly type: "number";
3419
+ readonly min: 0;
3420
+ readonly max: 100;
3421
+ readonly unit: "%";
3422
+ readonly writable: true;
3423
+ };
3424
+ };
3425
+ readonly shortcutable: true;
3426
+ readonly cascadeTrigger: {
3427
+ readonly property: SirenProperty.Active;
3428
+ readonly value: true;
3429
+ readonly sustained: true;
3430
+ };
3431
+ readonly propertyCapabilities: {
3432
+ readonly volume: SirenCapability;
3433
+ };
3434
+ readonly virtual: {
3435
+ readonly properties: {
3436
+ readonly active: false;
3437
+ readonly volume: 100;
3438
+ };
3439
+ readonly capabilities: readonly [SirenCapability];
3440
+ };
3441
+ readonly semantics: {
3442
+ readonly domain: SensorDomain.Siren;
3443
+ readonly stateProperty: SirenProperty.Active;
3444
+ readonly commandProperty: SirenProperty.Active;
3445
+ };
3446
+ };
2747
3447
 
2748
3448
  /**
2749
3449
  * Properties for smoke sensors
@@ -2801,6 +3501,37 @@ declare class SmokeSensor<TStorage extends object = Record<string, any>> extends
2801
3501
  */
2802
3502
  updateValue(_property: string, _value: unknown): void;
2803
3503
  }
3504
+ /** Registry metadata for {@link SmokeSensor}. */
3505
+ declare const smokeMeta: {
3506
+ readonly type: SensorType.Smoke;
3507
+ readonly category: SensorCategory.Sensor;
3508
+ readonly assignmentKey: "smoke";
3509
+ readonly multiProvider: true;
3510
+ readonly isDetectionType: false;
3511
+ readonly properties: {
3512
+ readonly detected: {
3513
+ readonly type: "boolean";
3514
+ readonly writable: true;
3515
+ };
3516
+ };
3517
+ readonly shortcutable: true;
3518
+ readonly cascadeTrigger: {
3519
+ readonly property: SmokeProperty;
3520
+ readonly value: true;
3521
+ readonly sustained: true;
3522
+ };
3523
+ readonly virtual: {
3524
+ readonly properties: {
3525
+ readonly detected: false;
3526
+ };
3527
+ };
3528
+ readonly semantics: {
3529
+ readonly domain: SensorDomain.Binary;
3530
+ readonly stateProperty: SmokeProperty;
3531
+ readonly commandProperty: SmokeProperty;
3532
+ readonly deviceClass: "smoke";
3533
+ };
3534
+ };
2804
3535
 
2805
3536
  /**
2806
3537
  * Properties for switch controls
@@ -2870,63 +3601,36 @@ declare class SwitchControl<TStorage extends object = Record<string, any>> exten
2870
3601
  */
2871
3602
  updateValue(property: string, value: unknown): Promise<void>;
2872
3603
  }
2873
-
2874
- /**
2875
- * Properties for temperature sensors
2876
- *
2877
- * @internal
2878
- */
2879
- declare enum TemperatureProperty {
2880
- /** Current temperature in degrees Celsius */
2881
- Current = "current"
2882
- }
2883
- /**
2884
- * Property value map for temperature info sensors.
2885
- *
2886
- * @internal
2887
- */
2888
- interface TemperatureInfoProperties {
2889
- [TemperatureProperty.Current]: number;
2890
- }
2891
- /** Read-only proxy interface for a temperature sensor */
2892
- interface TemperatureInfoLike extends SensorLike {
2893
- readonly type: SensorType.Temperature;
2894
- readonly onPropertyChanged: Observable<PropertyChangeOf<TemperatureInfoProperties>>;
2895
- getValue(property: TemperatureProperty.Current): number | undefined;
2896
- getValue(property: string): unknown;
2897
- }
2898
- /** Temperature info sensor. Reports current temperature in °C. */
2899
- declare class TemperatureInfo<TStorage extends object = Record<string, any>> extends Sensor<TemperatureInfoProperties, TStorage> {
2900
- readonly type = SensorType.Temperature;
2901
- readonly category = SensorCategory.Info;
2902
- constructor(name?: string);
2903
- get current(): number;
2904
- /**
2905
- * Report a new temperature reading. Clamped to [-270, 100] °C.
2906
- *
2907
- * @param value - Temperature reading in degrees Celsius.
2908
- *
2909
- * @example
2910
- * ```ts
2911
- * temperature.setCurrent(21.5);
2912
- * ```
2913
- */
2914
- setCurrent(value: number): void;
2915
- /**
2916
- * Read-only sensor: external writes are ignored. Reading via `setCurrent` is plugin-only.
2917
- *
2918
- * Called by the cross-process plugin host when a generic property write is received.
2919
- * Temperature sensors have no externally writable properties, so the parameters are
2920
- * unused (underscore-prefixed) and the call is a no-op.
2921
- *
2922
- * @param _property - Unused — temperature sensors expose no writable properties.
2923
- *
2924
- * @param _value - Unused — temperature sensors expose no writable properties.
2925
- *
2926
- * @internal
2927
- */
2928
- updateValue(_property: string, _value: unknown): void;
2929
- }
3604
+ /** Registry metadata for {@link SwitchControl}. */
3605
+ declare const switchMeta: {
3606
+ readonly type: SensorType.Switch;
3607
+ readonly category: SensorCategory.Control;
3608
+ readonly assignmentKey: "switch";
3609
+ readonly multiProvider: true;
3610
+ readonly isDetectionType: false;
3611
+ readonly properties: {
3612
+ readonly on: {
3613
+ readonly type: "boolean";
3614
+ readonly writable: true;
3615
+ };
3616
+ };
3617
+ readonly shortcutable: true;
3618
+ readonly cascadeTrigger: {
3619
+ readonly property: SwitchProperty;
3620
+ readonly value: true;
3621
+ readonly sustained: true;
3622
+ };
3623
+ readonly virtual: {
3624
+ readonly properties: {
3625
+ readonly on: false;
3626
+ };
3627
+ };
3628
+ readonly semantics: {
3629
+ readonly domain: SensorDomain.Switch;
3630
+ readonly stateProperty: SwitchProperty;
3631
+ readonly commandProperty: SwitchProperty;
3632
+ };
3633
+ };
2930
3634
 
2931
3635
  /**
2932
3636
  * Receives a partial-state delta (only properties that actually changed). One callback
@@ -2982,7 +3686,7 @@ declare enum SensorType {
2982
3686
  Contact = "contact",
2983
3687
  /** Temperature sensor (°C) */
2984
3688
  Temperature = "temperature",
2985
- /** Humidity sensor (0100%) */
3689
+ /** Humidity sensor (0-100%) */
2986
3690
  Humidity = "humidity",
2987
3691
  /** Occupancy/presence sensor */
2988
3692
  Occupancy = "occupancy",
@@ -3326,6 +4030,771 @@ declare abstract class Sensor<TProperties extends object, TStorage extends objec
3326
4030
  private _notifyListeners;
3327
4031
  }
3328
4032
 
4033
+ /**
4034
+ * Properties for temperature sensors
4035
+ *
4036
+ * @internal
4037
+ */
4038
+ declare enum TemperatureProperty {
4039
+ /** Current temperature in degrees Celsius */
4040
+ Current = "current"
4041
+ }
4042
+ /**
4043
+ * Property value map for temperature info sensors.
4044
+ *
4045
+ * @internal
4046
+ */
4047
+ interface TemperatureInfoProperties {
4048
+ [TemperatureProperty.Current]: number;
4049
+ }
4050
+ /** Read-only proxy interface for a temperature sensor */
4051
+ interface TemperatureInfoLike extends SensorLike {
4052
+ readonly type: SensorType.Temperature;
4053
+ readonly onPropertyChanged: Observable<PropertyChangeOf<TemperatureInfoProperties>>;
4054
+ getValue(property: TemperatureProperty.Current): number | undefined;
4055
+ getValue(property: string): unknown;
4056
+ }
4057
+ /** Temperature info sensor. Reports current temperature in °C. */
4058
+ declare class TemperatureInfo<TStorage extends object = Record<string, any>> extends Sensor<TemperatureInfoProperties, TStorage> {
4059
+ readonly type = SensorType.Temperature;
4060
+ readonly category = SensorCategory.Info;
4061
+ constructor(name?: string);
4062
+ get current(): number;
4063
+ /**
4064
+ * Report a new temperature reading. Clamped to [-270, 100] °C.
4065
+ *
4066
+ * @param value - Temperature reading in degrees Celsius.
4067
+ *
4068
+ * @example
4069
+ * ```ts
4070
+ * temperature.setCurrent(21.5);
4071
+ * ```
4072
+ */
4073
+ setCurrent(value: number): void;
4074
+ /**
4075
+ * Read-only sensor: external writes are ignored. Reading via `setCurrent` is plugin-only.
4076
+ *
4077
+ * Called by the cross-process plugin host when a generic property write is received.
4078
+ * Temperature sensors have no externally writable properties, so the parameters are
4079
+ * unused (underscore-prefixed) and the call is a no-op.
4080
+ *
4081
+ * @param _property - Unused — temperature sensors expose no writable properties.
4082
+ *
4083
+ * @param _value - Unused — temperature sensors expose no writable properties.
4084
+ *
4085
+ * @internal
4086
+ */
4087
+ updateValue(_property: string, _value: unknown): void;
4088
+ }
4089
+ /** Registry metadata for {@link TemperatureInfo}. */
4090
+ declare const temperatureMeta: {
4091
+ readonly type: SensorType.Temperature;
4092
+ readonly category: SensorCategory.Info;
4093
+ readonly assignmentKey: "temperature";
4094
+ readonly multiProvider: true;
4095
+ readonly isDetectionType: false;
4096
+ readonly properties: {
4097
+ readonly current: {
4098
+ readonly type: "number";
4099
+ readonly unit: "°C";
4100
+ readonly writable: true;
4101
+ };
4102
+ };
4103
+ readonly shortcutable: true;
4104
+ readonly virtual: {
4105
+ readonly properties: {
4106
+ readonly current: 20;
4107
+ };
4108
+ };
4109
+ readonly semantics: {
4110
+ readonly domain: SensorDomain.Measurement;
4111
+ readonly stateProperty: TemperatureProperty;
4112
+ readonly commandProperty: TemperatureProperty;
4113
+ readonly deviceClass: "temperature";
4114
+ readonly unit: "°C";
4115
+ };
4116
+ };
4117
+
4118
+ /** Every sensor's metadata. A new sensor type adds its meta here. */
4119
+ declare const SENSOR_META: readonly [{
4120
+ readonly type: SensorType.Audio;
4121
+ readonly category: SensorCategory.Sensor;
4122
+ readonly assignmentKey: "audio";
4123
+ readonly multiProvider: false;
4124
+ readonly isDetectionType: true;
4125
+ readonly properties: {
4126
+ readonly detected: {
4127
+ readonly type: "boolean";
4128
+ };
4129
+ readonly detections: {
4130
+ readonly type: "object";
4131
+ readonly internal: true;
4132
+ };
4133
+ readonly decibels: {
4134
+ readonly type: "number";
4135
+ readonly unit: "dB";
4136
+ };
4137
+ readonly lastTriggered: {
4138
+ readonly type: "number";
4139
+ readonly internal: true;
4140
+ };
4141
+ };
4142
+ readonly semantics: null;
4143
+ }, {
4144
+ readonly type: SensorType.Battery;
4145
+ readonly category: SensorCategory.Info;
4146
+ readonly assignmentKey: "battery";
4147
+ readonly multiProvider: false;
4148
+ readonly isDetectionType: false;
4149
+ readonly properties: {
4150
+ readonly level: {
4151
+ readonly type: "number";
4152
+ readonly min: 0;
4153
+ readonly max: 100;
4154
+ readonly unit: "%";
4155
+ };
4156
+ readonly charging: {
4157
+ readonly type: "enum";
4158
+ readonly values: {
4159
+ readonly not_chargeable: ChargingState.NotChargeable;
4160
+ readonly not_charging: ChargingState.NotCharging;
4161
+ readonly charging: ChargingState.Charging;
4162
+ readonly full: ChargingState.Full;
4163
+ };
4164
+ };
4165
+ readonly low: {
4166
+ readonly type: "boolean";
4167
+ };
4168
+ };
4169
+ readonly shortcutable: true;
4170
+ readonly propertyCapabilities: {
4171
+ readonly charging: BatteryCapability.Charging;
4172
+ readonly low: BatteryCapability.LowBattery;
4173
+ };
4174
+ readonly semantics: {
4175
+ readonly domain: SensorDomain.Measurement;
4176
+ readonly stateProperty: BatteryProperty.Level;
4177
+ readonly commandProperty: BatteryProperty.Level;
4178
+ readonly deviceClass: "battery";
4179
+ readonly unit: "%";
4180
+ readonly diagnostic: true;
4181
+ };
4182
+ }, {
4183
+ readonly type: SensorType.Classifier;
4184
+ readonly category: SensorCategory.Sensor;
4185
+ readonly assignmentKey: "classifier";
4186
+ readonly multiProvider: true;
4187
+ readonly isDetectionType: true;
4188
+ readonly properties: {
4189
+ readonly detected: {
4190
+ readonly type: "boolean";
4191
+ };
4192
+ readonly detections: {
4193
+ readonly type: "object";
4194
+ readonly internal: true;
4195
+ };
4196
+ readonly labels: {
4197
+ readonly type: "object";
4198
+ };
4199
+ };
4200
+ readonly semantics: null;
4201
+ }, {
4202
+ readonly type: SensorType.Clip;
4203
+ readonly category: SensorCategory.Sensor;
4204
+ readonly assignmentKey: "clip";
4205
+ readonly multiProvider: false;
4206
+ readonly isDetectionType: true;
4207
+ readonly properties: {};
4208
+ readonly semantics: null;
4209
+ }, {
4210
+ readonly type: SensorType.Contact;
4211
+ readonly category: SensorCategory.Sensor;
4212
+ readonly assignmentKey: "contact";
4213
+ readonly multiProvider: true;
4214
+ readonly isDetectionType: false;
4215
+ readonly properties: {
4216
+ readonly detected: {
4217
+ readonly type: "boolean";
4218
+ readonly writable: true;
4219
+ };
4220
+ };
4221
+ readonly shortcutable: true;
4222
+ readonly cascadeTrigger: {
4223
+ readonly property: ContactProperty;
4224
+ readonly value: true;
4225
+ readonly sustained: true;
4226
+ };
4227
+ readonly virtual: {
4228
+ readonly properties: {
4229
+ readonly detected: false;
4230
+ };
4231
+ };
4232
+ readonly semantics: {
4233
+ readonly domain: SensorDomain.Binary;
4234
+ readonly stateProperty: ContactProperty;
4235
+ readonly commandProperty: ContactProperty;
4236
+ readonly deviceClass: "opening";
4237
+ };
4238
+ }, {
4239
+ readonly type: SensorType.Doorbell;
4240
+ readonly category: SensorCategory.Trigger;
4241
+ readonly assignmentKey: "doorbell";
4242
+ readonly multiProvider: true;
4243
+ readonly isDetectionType: false;
4244
+ readonly properties: {
4245
+ readonly ring: {
4246
+ readonly type: "boolean";
4247
+ readonly writable: true;
4248
+ };
4249
+ };
4250
+ readonly shortcutable: true;
4251
+ readonly cascadeTrigger: {
4252
+ readonly property: DoorbellProperty;
4253
+ readonly value: true;
4254
+ readonly sustained: false;
4255
+ };
4256
+ readonly virtual: {
4257
+ readonly properties: {
4258
+ readonly ring: false;
4259
+ };
4260
+ };
4261
+ readonly semantics: {
4262
+ readonly domain: SensorDomain.Binary;
4263
+ readonly stateProperty: DoorbellProperty;
4264
+ readonly commandProperty: DoorbellProperty;
4265
+ readonly icon: "mdi:doorbell";
4266
+ };
4267
+ }, {
4268
+ readonly type: SensorType.Face;
4269
+ readonly category: SensorCategory.Sensor;
4270
+ readonly assignmentKey: "face";
4271
+ readonly multiProvider: false;
4272
+ readonly isDetectionType: true;
4273
+ readonly properties: {
4274
+ readonly detected: {
4275
+ readonly type: "boolean";
4276
+ };
4277
+ readonly detections: {
4278
+ readonly type: "object";
4279
+ readonly internal: true;
4280
+ };
4281
+ };
4282
+ readonly semantics: null;
4283
+ }, {
4284
+ readonly type: SensorType.Garage;
4285
+ readonly category: SensorCategory.Control;
4286
+ readonly assignmentKey: "garage";
4287
+ readonly multiProvider: true;
4288
+ readonly isDetectionType: false;
4289
+ readonly properties: {
4290
+ readonly currentState: {
4291
+ readonly type: "enum";
4292
+ readonly values: {
4293
+ readonly open: GarageState.Open;
4294
+ readonly closed: GarageState.Closed;
4295
+ readonly opening: GarageState.Opening;
4296
+ readonly closing: GarageState.Closing;
4297
+ readonly stopped: GarageState.Stopped;
4298
+ };
4299
+ };
4300
+ readonly targetState: {
4301
+ readonly type: "enum";
4302
+ readonly values: {
4303
+ readonly open: GarageState.Open;
4304
+ readonly closed: GarageState.Closed;
4305
+ };
4306
+ readonly writable: true;
4307
+ };
4308
+ readonly obstructionDetected: {
4309
+ readonly type: "boolean";
4310
+ };
4311
+ };
4312
+ readonly shortcutable: true;
4313
+ readonly cascadeTrigger: {
4314
+ readonly property: GarageProperty.CurrentState;
4315
+ readonly value: 0;
4316
+ readonly sustained: true;
4317
+ };
4318
+ readonly virtual: {
4319
+ readonly properties: {
4320
+ readonly currentState: 1;
4321
+ readonly targetState: 1;
4322
+ };
4323
+ };
4324
+ readonly semantics: {
4325
+ readonly domain: SensorDomain.Cover;
4326
+ readonly stateProperty: GarageProperty.CurrentState;
4327
+ readonly commandProperty: GarageProperty.TargetState;
4328
+ readonly deviceClass: "garage";
4329
+ readonly states: {
4330
+ readonly open: GarageState.Open;
4331
+ readonly closed: GarageState.Closed;
4332
+ readonly opening: GarageState.Opening;
4333
+ readonly closing: GarageState.Closing;
4334
+ readonly stopped: GarageState.Stopped;
4335
+ };
4336
+ };
4337
+ }, {
4338
+ readonly type: SensorType.Humidity;
4339
+ readonly category: SensorCategory.Info;
4340
+ readonly assignmentKey: "humidity";
4341
+ readonly multiProvider: true;
4342
+ readonly isDetectionType: false;
4343
+ readonly properties: {
4344
+ readonly current: {
4345
+ readonly type: "number";
4346
+ readonly min: 0;
4347
+ readonly max: 100;
4348
+ readonly unit: "%";
4349
+ readonly writable: true;
4350
+ };
4351
+ };
4352
+ readonly shortcutable: true;
4353
+ readonly virtual: {
4354
+ readonly properties: {
4355
+ readonly current: 50;
4356
+ };
4357
+ };
4358
+ readonly semantics: {
4359
+ readonly domain: SensorDomain.Measurement;
4360
+ readonly stateProperty: HumidityProperty;
4361
+ readonly commandProperty: HumidityProperty;
4362
+ readonly deviceClass: "humidity";
4363
+ readonly unit: "%";
4364
+ };
4365
+ }, {
4366
+ readonly type: SensorType.Leak;
4367
+ readonly category: SensorCategory.Sensor;
4368
+ readonly assignmentKey: "leak";
4369
+ readonly multiProvider: true;
4370
+ readonly isDetectionType: false;
4371
+ readonly properties: {
4372
+ readonly detected: {
4373
+ readonly type: "boolean";
4374
+ readonly writable: true;
4375
+ };
4376
+ };
4377
+ readonly shortcutable: true;
4378
+ readonly cascadeTrigger: {
4379
+ readonly property: LeakProperty;
4380
+ readonly value: true;
4381
+ readonly sustained: true;
4382
+ };
4383
+ readonly virtual: {
4384
+ readonly properties: {
4385
+ readonly detected: false;
4386
+ };
4387
+ };
4388
+ readonly semantics: {
4389
+ readonly domain: SensorDomain.Binary;
4390
+ readonly stateProperty: LeakProperty;
4391
+ readonly commandProperty: LeakProperty;
4392
+ readonly deviceClass: "moisture";
4393
+ };
4394
+ }, {
4395
+ readonly type: SensorType.LicensePlate;
4396
+ readonly category: SensorCategory.Sensor;
4397
+ readonly assignmentKey: "licensePlate";
4398
+ readonly multiProvider: false;
4399
+ readonly isDetectionType: true;
4400
+ readonly properties: {
4401
+ readonly detected: {
4402
+ readonly type: "boolean";
4403
+ };
4404
+ readonly detections: {
4405
+ readonly type: "object";
4406
+ readonly internal: true;
4407
+ };
4408
+ };
4409
+ readonly semantics: null;
4410
+ }, {
4411
+ readonly type: SensorType.Light;
4412
+ readonly category: SensorCategory.Control;
4413
+ readonly assignmentKey: "light";
4414
+ readonly multiProvider: true;
4415
+ readonly isDetectionType: false;
4416
+ readonly properties: {
4417
+ readonly on: {
4418
+ readonly type: "boolean";
4419
+ readonly writable: true;
4420
+ };
4421
+ readonly brightness: {
4422
+ readonly type: "number";
4423
+ readonly min: 0;
4424
+ readonly max: 100;
4425
+ readonly unit: "%";
4426
+ readonly writable: true;
4427
+ };
4428
+ };
4429
+ readonly shortcutable: true;
4430
+ readonly cascadeTrigger: {
4431
+ readonly property: LightProperty.On;
4432
+ readonly value: true;
4433
+ readonly sustained: true;
4434
+ };
4435
+ readonly propertyCapabilities: {
4436
+ readonly brightness: LightCapability;
4437
+ };
4438
+ readonly virtual: {
4439
+ readonly properties: {
4440
+ readonly on: false;
4441
+ readonly brightness: 100;
4442
+ };
4443
+ readonly capabilities: readonly [LightCapability];
4444
+ };
4445
+ readonly semantics: {
4446
+ readonly domain: SensorDomain.Light;
4447
+ readonly stateProperty: LightProperty.On;
4448
+ readonly commandProperty: LightProperty.On;
4449
+ };
4450
+ }, {
4451
+ readonly type: SensorType.Lock;
4452
+ readonly category: SensorCategory.Control;
4453
+ readonly assignmentKey: "lock";
4454
+ readonly multiProvider: true;
4455
+ readonly isDetectionType: false;
4456
+ readonly properties: {
4457
+ readonly currentState: {
4458
+ readonly type: "enum";
4459
+ readonly values: {
4460
+ readonly secured: LockState.Secured;
4461
+ readonly unsecured: LockState.Unsecured;
4462
+ readonly unknown: LockState.Unknown;
4463
+ };
4464
+ };
4465
+ readonly targetState: {
4466
+ readonly type: "enum";
4467
+ readonly values: {
4468
+ readonly secured: LockState.Secured;
4469
+ readonly unsecured: LockState.Unsecured;
4470
+ };
4471
+ readonly writable: true;
4472
+ };
4473
+ };
4474
+ readonly shortcutable: true;
4475
+ readonly cascadeTrigger: {
4476
+ readonly property: LockProperty.CurrentState;
4477
+ readonly value: 1;
4478
+ readonly sustained: true;
4479
+ };
4480
+ readonly virtual: {
4481
+ readonly properties: {
4482
+ readonly currentState: 0;
4483
+ readonly targetState: 0;
4484
+ };
4485
+ };
4486
+ readonly semantics: {
4487
+ readonly domain: SensorDomain.Lock;
4488
+ readonly stateProperty: LockProperty.CurrentState;
4489
+ readonly commandProperty: LockProperty.TargetState;
4490
+ readonly states: {
4491
+ readonly locked: LockState.Secured;
4492
+ readonly unlocked: LockState.Unsecured;
4493
+ };
4494
+ };
4495
+ }, {
4496
+ readonly type: SensorType.Motion;
4497
+ readonly category: SensorCategory.Sensor;
4498
+ readonly assignmentKey: "motion";
4499
+ readonly multiProvider: false;
4500
+ readonly isDetectionType: true;
4501
+ readonly properties: {
4502
+ readonly detected: {
4503
+ readonly type: "boolean";
4504
+ };
4505
+ readonly detections: {
4506
+ readonly type: "object";
4507
+ readonly internal: true;
4508
+ };
4509
+ readonly blocked: {
4510
+ readonly type: "boolean";
4511
+ readonly internal: true;
4512
+ };
4513
+ readonly lastTriggered: {
4514
+ readonly type: "number";
4515
+ readonly internal: true;
4516
+ };
4517
+ };
4518
+ readonly semantics: null;
4519
+ }, {
4520
+ readonly type: SensorType.Object;
4521
+ readonly category: SensorCategory.Sensor;
4522
+ readonly assignmentKey: "object";
4523
+ readonly multiProvider: false;
4524
+ readonly isDetectionType: true;
4525
+ readonly properties: {
4526
+ readonly detected: {
4527
+ readonly type: "boolean";
4528
+ };
4529
+ readonly detections: {
4530
+ readonly type: "object";
4531
+ readonly internal: true;
4532
+ };
4533
+ readonly labels: {
4534
+ readonly type: "object";
4535
+ };
4536
+ };
4537
+ readonly semantics: null;
4538
+ }, {
4539
+ readonly type: SensorType.Occupancy;
4540
+ readonly category: SensorCategory.Sensor;
4541
+ readonly assignmentKey: "occupancy";
4542
+ readonly multiProvider: true;
4543
+ readonly isDetectionType: false;
4544
+ readonly properties: {
4545
+ readonly detected: {
4546
+ readonly type: "boolean";
4547
+ readonly writable: true;
4548
+ };
4549
+ };
4550
+ readonly shortcutable: true;
4551
+ readonly cascadeTrigger: {
4552
+ readonly property: OccupancyProperty;
4553
+ readonly value: true;
4554
+ readonly sustained: true;
4555
+ };
4556
+ readonly virtual: {
4557
+ readonly properties: {
4558
+ readonly detected: false;
4559
+ };
4560
+ };
4561
+ readonly semantics: {
4562
+ readonly domain: SensorDomain.Binary;
4563
+ readonly stateProperty: OccupancyProperty;
4564
+ readonly commandProperty: OccupancyProperty;
4565
+ readonly deviceClass: "occupancy";
4566
+ };
4567
+ }, {
4568
+ readonly type: SensorType.PTZ;
4569
+ readonly category: SensorCategory.Control;
4570
+ readonly assignmentKey: "ptz";
4571
+ readonly multiProvider: false;
4572
+ readonly isDetectionType: false;
4573
+ readonly properties: {
4574
+ readonly position: {
4575
+ readonly type: "object";
4576
+ readonly writable: true;
4577
+ readonly keys: readonly ["pan", "tilt", "zoom"];
4578
+ };
4579
+ readonly moving: {
4580
+ readonly type: "boolean";
4581
+ };
4582
+ readonly presets: {
4583
+ readonly type: "object";
4584
+ };
4585
+ readonly velocity: {
4586
+ readonly type: "object";
4587
+ readonly writable: true;
4588
+ readonly internal: true;
4589
+ };
4590
+ readonly targetPreset: {
4591
+ readonly type: "string";
4592
+ readonly writable: true;
4593
+ };
4594
+ readonly relativeMove: {
4595
+ readonly type: "object";
4596
+ readonly writable: true;
4597
+ readonly internal: true;
4598
+ };
4599
+ readonly home: {
4600
+ readonly type: "boolean";
4601
+ readonly writable: true;
4602
+ readonly internal: true;
4603
+ };
4604
+ };
4605
+ readonly semantics: null;
4606
+ }, {
4607
+ readonly type: SensorType.SecuritySystem;
4608
+ readonly category: SensorCategory.Control;
4609
+ readonly assignmentKey: "securitySystem";
4610
+ readonly multiProvider: true;
4611
+ readonly isDetectionType: false;
4612
+ readonly properties: {
4613
+ readonly currentState: {
4614
+ readonly type: "enum";
4615
+ readonly values: {
4616
+ readonly stay_arm: SecuritySystemState.StayArm;
4617
+ readonly away_arm: SecuritySystemState.AwayArm;
4618
+ readonly night_arm: SecuritySystemState.NightArm;
4619
+ readonly disarmed: SecuritySystemState.Disarmed;
4620
+ readonly alarm_triggered: SecuritySystemState.AlarmTriggered;
4621
+ };
4622
+ };
4623
+ readonly targetState: {
4624
+ readonly type: "enum";
4625
+ readonly values: {
4626
+ readonly stay_arm: SecuritySystemState.StayArm;
4627
+ readonly away_arm: SecuritySystemState.AwayArm;
4628
+ readonly night_arm: SecuritySystemState.NightArm;
4629
+ readonly disarmed: SecuritySystemState.Disarmed;
4630
+ };
4631
+ readonly writable: true;
4632
+ };
4633
+ };
4634
+ readonly shortcutable: true;
4635
+ readonly cascadeTrigger: {
4636
+ readonly property: SecuritySystemProperty.CurrentState;
4637
+ readonly value: 4;
4638
+ readonly sustained: true;
4639
+ };
4640
+ readonly virtual: {
4641
+ readonly properties: {
4642
+ readonly currentState: 3;
4643
+ readonly targetState: 3;
4644
+ };
4645
+ };
4646
+ readonly semantics: {
4647
+ readonly domain: SensorDomain.Alarm;
4648
+ readonly stateProperty: SecuritySystemProperty.CurrentState;
4649
+ readonly commandProperty: SecuritySystemProperty.TargetState;
4650
+ readonly states: {
4651
+ readonly armed_home: SecuritySystemState.StayArm;
4652
+ readonly armed_away: SecuritySystemState.AwayArm;
4653
+ readonly armed_night: SecuritySystemState.NightArm;
4654
+ readonly disarmed: SecuritySystemState.Disarmed;
4655
+ readonly triggered: SecuritySystemState.AlarmTriggered;
4656
+ };
4657
+ };
4658
+ }, {
4659
+ readonly type: SensorType.Siren;
4660
+ readonly category: SensorCategory.Control;
4661
+ readonly assignmentKey: "siren";
4662
+ readonly multiProvider: true;
4663
+ readonly isDetectionType: false;
4664
+ readonly properties: {
4665
+ readonly active: {
4666
+ readonly type: "boolean";
4667
+ readonly writable: true;
4668
+ };
4669
+ readonly volume: {
4670
+ readonly type: "number";
4671
+ readonly min: 0;
4672
+ readonly max: 100;
4673
+ readonly unit: "%";
4674
+ readonly writable: true;
4675
+ };
4676
+ };
4677
+ readonly shortcutable: true;
4678
+ readonly cascadeTrigger: {
4679
+ readonly property: SirenProperty.Active;
4680
+ readonly value: true;
4681
+ readonly sustained: true;
4682
+ };
4683
+ readonly propertyCapabilities: {
4684
+ readonly volume: SirenCapability;
4685
+ };
4686
+ readonly virtual: {
4687
+ readonly properties: {
4688
+ readonly active: false;
4689
+ readonly volume: 100;
4690
+ };
4691
+ readonly capabilities: readonly [SirenCapability];
4692
+ };
4693
+ readonly semantics: {
4694
+ readonly domain: SensorDomain.Siren;
4695
+ readonly stateProperty: SirenProperty.Active;
4696
+ readonly commandProperty: SirenProperty.Active;
4697
+ };
4698
+ }, {
4699
+ readonly type: SensorType.Smoke;
4700
+ readonly category: SensorCategory.Sensor;
4701
+ readonly assignmentKey: "smoke";
4702
+ readonly multiProvider: true;
4703
+ readonly isDetectionType: false;
4704
+ readonly properties: {
4705
+ readonly detected: {
4706
+ readonly type: "boolean";
4707
+ readonly writable: true;
4708
+ };
4709
+ };
4710
+ readonly shortcutable: true;
4711
+ readonly cascadeTrigger: {
4712
+ readonly property: SmokeProperty;
4713
+ readonly value: true;
4714
+ readonly sustained: true;
4715
+ };
4716
+ readonly virtual: {
4717
+ readonly properties: {
4718
+ readonly detected: false;
4719
+ };
4720
+ };
4721
+ readonly semantics: {
4722
+ readonly domain: SensorDomain.Binary;
4723
+ readonly stateProperty: SmokeProperty;
4724
+ readonly commandProperty: SmokeProperty;
4725
+ readonly deviceClass: "smoke";
4726
+ };
4727
+ }, {
4728
+ readonly type: SensorType.Switch;
4729
+ readonly category: SensorCategory.Control;
4730
+ readonly assignmentKey: "switch";
4731
+ readonly multiProvider: true;
4732
+ readonly isDetectionType: false;
4733
+ readonly properties: {
4734
+ readonly on: {
4735
+ readonly type: "boolean";
4736
+ readonly writable: true;
4737
+ };
4738
+ };
4739
+ readonly shortcutable: true;
4740
+ readonly cascadeTrigger: {
4741
+ readonly property: SwitchProperty;
4742
+ readonly value: true;
4743
+ readonly sustained: true;
4744
+ };
4745
+ readonly virtual: {
4746
+ readonly properties: {
4747
+ readonly on: false;
4748
+ };
4749
+ };
4750
+ readonly semantics: {
4751
+ readonly domain: SensorDomain.Switch;
4752
+ readonly stateProperty: SwitchProperty;
4753
+ readonly commandProperty: SwitchProperty;
4754
+ };
4755
+ }, {
4756
+ readonly type: SensorType.Temperature;
4757
+ readonly category: SensorCategory.Info;
4758
+ readonly assignmentKey: "temperature";
4759
+ readonly multiProvider: true;
4760
+ readonly isDetectionType: false;
4761
+ readonly properties: {
4762
+ readonly current: {
4763
+ readonly type: "number";
4764
+ readonly unit: "°C";
4765
+ readonly writable: true;
4766
+ };
4767
+ };
4768
+ readonly shortcutable: true;
4769
+ readonly virtual: {
4770
+ readonly properties: {
4771
+ readonly current: 20;
4772
+ };
4773
+ };
4774
+ readonly semantics: {
4775
+ readonly domain: SensorDomain.Measurement;
4776
+ readonly stateProperty: TemperatureProperty;
4777
+ readonly commandProperty: TemperatureProperty;
4778
+ readonly deviceClass: "temperature";
4779
+ readonly unit: "°C";
4780
+ };
4781
+ }];
4782
+ /** Union of every declared assignment key, derived from the registry. */
4783
+ type SensorAssignmentKey = (typeof SENSOR_META)[number]['assignmentKey'];
4784
+ /**
4785
+ * Looks up a sensor's metadata by its type.
4786
+ *
4787
+ * @param type - The sensor type value.
4788
+ *
4789
+ * @returns The metadata, or `undefined` if no sensor declares that type.
4790
+ *
4791
+ * @example
4792
+ * ```ts
4793
+ * const meta = sensorMeta(SensorType.Light);
4794
+ * ```
4795
+ */
4796
+ declare function sensorMeta(type: string): SensorMeta | undefined;
4797
+
3329
4798
  /**
3330
4799
  * Stable reference to a sensor for cascade trigger configuration.
3331
4800
  * Uses composite key (sensorType + sensorName + pluginId) instead of UUID
@@ -4004,38 +5473,24 @@ interface AssignedPlugin {
4004
5473
  /** Plugin display name */
4005
5474
  name: string;
4006
5475
  }
4007
- /**
4008
- * Plugin assignments for camera sensors/features.
4009
- * Maps sensor types to their assigned plugin(s).
4010
- */
4011
- interface PluginAssignments {
4012
- /** Motion detection plugin */
4013
- motion?: AssignedPlugin;
4014
- /** Object detection plugin */
4015
- object?: AssignedPlugin;
4016
- /** Audio detection plugin */
4017
- audio?: AssignedPlugin;
4018
- /** Face detection plugin */
4019
- face?: AssignedPlugin;
4020
- /** License plate detection plugin */
4021
- licensePlate?: AssignedPlugin;
4022
- /** PTZ control plugin */
4023
- ptz?: AssignedPlugin;
4024
- /** Battery info plugin */
4025
- battery?: AssignedPlugin;
4026
- /** Camera controller plugin */
5476
+ /** @internal */
5477
+ type SingleProviderAssignmentKey = Extract<(typeof SENSOR_META)[number], {
5478
+ multiProvider: false;
5479
+ }>['assignmentKey'];
5480
+ /** @internal */
5481
+ type MultiProviderAssignmentKey = Extract<(typeof SENSOR_META)[number], {
5482
+ multiProvider: true;
5483
+ }>['assignmentKey'];
5484
+ /**
5485
+ * Plugin assignments for a camera, keyed by the assignment keys the SDK sensor
5486
+ * registry declares. Single-provider sensors and the camera controller hold one
5487
+ * plugin; multi-provider sensors and the hub hold an array. Derived from the
5488
+ * registry so a new sensor type gains its assignment slot automatically.
5489
+ */
5490
+ type PluginAssignments = Partial<Record<SingleProviderAssignmentKey, AssignedPlugin>> & Partial<Record<MultiProviderAssignmentKey, AssignedPlugin[]>> & {
4027
5491
  cameraController?: AssignedPlugin;
4028
- /** Light control plugins */
4029
- light?: AssignedPlugin[];
4030
- /** Siren control plugins */
4031
- siren?: AssignedPlugin[];
4032
- /** Contact sensor plugins */
4033
- contact?: AssignedPlugin[];
4034
- /** Doorbell trigger plugins */
4035
- doorbell?: AssignedPlugin[];
4036
- /** Hub/bridge plugins */
4037
5492
  hub?: AssignedPlugin[];
4038
- }
5493
+ };
4039
5494
  /**
4040
5495
  * Camera source plugin information.
4041
5496
  */
@@ -4814,6 +6269,27 @@ declare abstract class ClassifierDetectorSensor<TStorage extends object = Record
4814
6269
  */
4815
6270
  abstract detectClassifications(frames: VideoFrameData[]): Promise<ClassifierResult[]>;
4816
6271
  }
6272
+ /** Registry metadata for {@link ClassifierSensor}. */
6273
+ declare const classifierMeta: {
6274
+ readonly type: SensorType.Classifier;
6275
+ readonly category: SensorCategory.Sensor;
6276
+ readonly assignmentKey: "classifier";
6277
+ readonly multiProvider: true;
6278
+ readonly isDetectionType: true;
6279
+ readonly properties: {
6280
+ readonly detected: {
6281
+ readonly type: "boolean";
6282
+ };
6283
+ readonly detections: {
6284
+ readonly type: "object";
6285
+ readonly internal: true;
6286
+ };
6287
+ readonly labels: {
6288
+ readonly type: "object";
6289
+ };
6290
+ };
6291
+ readonly semantics: null;
6292
+ };
4817
6293
 
4818
6294
  /** A CLIP embedding result for a detected region. */
4819
6295
  interface ClipEmbedding {
@@ -4865,6 +6341,16 @@ declare abstract class ClipDetectorSensor<TStorage extends object = Record<strin
4865
6341
  */
4866
6342
  updateValue(_property: string, _value: unknown): void;
4867
6343
  }
6344
+ /** Registry metadata for {@link ClipDetectorSensor}. */
6345
+ declare const clipMeta: {
6346
+ readonly type: SensorType.Clip;
6347
+ readonly category: SensorCategory.Sensor;
6348
+ readonly assignmentKey: "clip";
6349
+ readonly multiProvider: false;
6350
+ readonly isDetectionType: true;
6351
+ readonly properties: {};
6352
+ readonly semantics: null;
6353
+ };
4868
6354
 
4869
6355
  /**
4870
6356
  * Lifecycle events emitted on the PluginAPI EventEmitter. Plugins subscribe
@@ -5847,5 +7333,5 @@ interface OAuthClientCredentialsCapable extends OAuthCapable {
5847
7333
  configureClientCredentials(clientId: string, clientSecret: string): Promise<OAuthState>;
5848
7334
  }
5849
7335
 
5850
- export { API_EVENT, AudioDetectorSensor, AudioProperty, AudioSensor, BASE_AUDIO_LABELS, BasePlugin, BatteryCapability, BatteryInfo, BatteryProperty, BehaviorSubject, ChargingState, ClassifierDetectorSensor, ClassifierProperty, ClassifierSensor, ClipDetectorSensor, ContactProperty, ContactSensor, DETECTION_ATTRIBUTES, DETECTION_LABELS, Disposable, DoorbellProperty, DoorbellTrigger, EVENT_TRIGGER_TYPES, FaceDetectorSensor, FaceProperty, FaceSensor, GarageControl, GarageProperty, GarageState, HumidityInfo, HumidityProperty, LeakProperty, LeakSensor, LicensePlateDetectorSensor, LicensePlateProperty, LicensePlateSensor, LightCapability, LightControl, LightProperty, LockControl, LockProperty, LockState, MotionDetectorSensor, MotionProperty, MotionSensor, ObjectDetectorSensor, ObjectProperty, ObjectSensor, Observable, OccupancyProperty, OccupancySensor, PTZCapability, PTZControl, PTZProperty, PluginCapability, PluginInterface, PluginRole, RING_AUTO_RESET_MS, ReplaySubject, RtpPacket, SecuritySystem, SecuritySystemProperty, SecuritySystemState, Sensor, SensorCategory, SensorType, Severity, SirenCapability, SirenControl, SirenProperty, SmokeProperty, SmokeSensor, Subject, SwitchControl, SwitchProperty, TemperatureInfo, TemperatureProperty, canCreateCameras, canProvideSensorsToAnyCameras, distinctUntilChanged, filter, firstValueFrom, getContractValidationErrors, hasCapability, hasInterface, isHub, map, mergeMap, pairwise, share, validateContractConsistency };
5851
- export type { AssignedPlugin, AudioCodec, AudioCodecProperties, AudioDetectionInterface, AudioDetectionPluginResponse, AudioDetectionSettings, AudioFFmpegCodec, AudioFrameData, AudioInputSpec, AudioLabel, AudioMetadata, AudioModelSpec, AudioResult, AudioSensorLike, AudioSensorProperties, AudioStreamInfo, BaseAudioLabel, BaseCamera, BaseCameraConfig, BatteryInfoLike, BatteryInfoProperties, BoundingBox, Camera, CameraAspectRatio, CameraAspectRatioPreset, CameraConfig, CameraConfigInputSettings, CameraDetectionSettings, CameraDevice, CameraDeviceSource, CameraFrameWorkerSettings, CameraImplementation, CameraInformation, CameraInput, CameraPluginInfo, CameraRole, CameraSource, CameraType, CameraUiSettings, ClassifierDetection, ClassifierDetectionInterface, ClassifierDetectionPluginResponse, ClassifierResult, ClassifierSensorLike, ClassifierSensorProperties, ClipDetectionInterface, ClipDetectionPluginResponse, ClipEmbedding, ClipResult, ClipTextEmbeddingResult, ContactSensorLike, ContactSensorProperties, CoreManager, CoreManagerEvent, CreateDownloadOptions, CreateStreamDownloadOptions, Detection, DetectionAttribute, DetectionEvent, DetectionEventState, DetectionEventType, DetectionLabel, DetectionLine, DetectionZone, DeviceManager, DeviceStorage, DiscoveredCamera, DiscoveryProvider, DoorbellTriggerLike, DoorbellTriggerProperties, DownloadCleanup, DownloadManager, DownloadToken, EventAttribute, EventDescription, EventDetection, EventSegment, EventTrigger, EventTriggerType, FMTPInfo, FaceDetection, FaceDetectionInterface, FaceDetectionPluginResponse, FaceResult, FaceSensorLike, FaceSensorProperties, Fmp4Session, Fmp4SessionOptions, FormSubmitResponse, FormSubmitSchema, GarageControlLike, GarageControlProperties, Go2RtcRTSPSource, Go2RtcSnapshotSource, Go2RtcWSSource, HardwareAcceleration, HumidityInfoLike, HumidityInfoProperties, ImageMetadata, JsonArraySchema, JsonBaseSchema, JsonBaseSchemaWithoutCallbacks, JsonBooleanSchema, JsonEnumSchema, JsonFactorySchema, JsonNumberSchema, JsonSchema, JsonSchemaArray, JsonSchemaArrayWithoutCallbacks, JsonSchemaBoolean, JsonSchemaBooleanWithoutCallbacks, JsonSchemaButton, JsonSchemaEnum, JsonSchemaEnumWithoutCallbacks, JsonSchemaNumber, JsonSchemaNumberWithoutCallbacks, JsonSchemaString, JsonSchemaStringWithoutCallbacks, JsonSchemaSubmit, JsonSchemaType, JsonSchemaWithoutCallbacks, JsonSchemaWithoutKey, JsonStringSchema, LeakSensorLike, LeakSensorProperties, LicensePlateDetection, LicensePlateDetectionInterface, LicensePlateDetectionPluginResponse, LicensePlateResult, LicensePlateSensorLike, LicensePlateSensorProperties, LightControlLike, LightControlProperties, LineDirection, LockControlLike, LockControlProperties, LoggerService, ModelSpec, MotionDetectionInterface, MotionDetectionPluginResponse, MotionDetectionSettings, MotionResolution, MotionResult, MotionSensorLike, MotionSensorProperties, Notification, NotificationManager, NotifierDevice, NotifierInterface, OAuthAuthCodeFlowCapable, OAuthCapable, OAuthClientCredentialsCapable, OAuthDeviceFlowCapable, OAuthMetadata, OAuthProviderConfig, OAuthProviderDeclaration, OAuthState, OAuthStatus, ObjectDetectionInterface, ObjectDetectionPluginResponse, ObjectDetectionSettings, ObjectModelSpec, ObjectResult, ObjectSensorLike, ObjectSensorProperties, OccupancySensorLike, OccupancySensorProperties, OperatorFn, PTZControlLike, PTZControlProperties, PTZDirection, PTZPosition, PTZRelativeMove, PluginAPI, PluginAssignments, PluginConfig, PluginContract, PluginInfo, PluginInterfaces, Point, ProbeAudioCodec, ProbeConfig, ProbeStream, PropertyChangeOf, PtzAutotrackSettings, PythonVersion, RTPInfo, RTSPAudioCodec, RTSPUrlOptions, RtpSession, RtpSessionBackchannelOptions, RtpSessionOptions, SchemaCondition, SchemaConditionOperator, SchemaConfig, SecuritySystemLike, SecuritySystemProperties, SensorCapability, SensorLike, SensorPropertyType, SensorTriggerRef, SensorTriggerSettings, SirenControlLike, SirenControlProperties, SmokeSensorLike, SmokeSensorProperties, SnapshotInterface, SnapshotSettings, SnapshotUrlOptions, StreamDirection, StreamUrls, StreamingInterface, StreamingRole, SwitchControlLike, SwitchControlProperties, TemperatureInfoLike, TemperatureInfoProperties, ToastMessage, TrackedDetection, VideoCodec, VideoCodecProperties, VideoFFmpegCodec, VideoFrameData, VideoInputSpec, VideoStreamInfo, VideoStreamingMode, ZoneFilter, ZoneType };
7336
+ export { API_EVENT, AudioDetectorSensor, AudioProperty, AudioSensor, BASE_AUDIO_LABELS, BasePlugin, BatteryCapability, BatteryInfo, BatteryProperty, BehaviorSubject, ChargingState, ClassifierDetectorSensor, ClassifierProperty, ClassifierSensor, ClipDetectorSensor, ContactProperty, ContactSensor, DETECTION_ATTRIBUTES, DETECTION_LABELS, Disposable, DoorbellProperty, DoorbellTrigger, EVENT_TRIGGER_TYPES, FaceDetectorSensor, FaceProperty, FaceSensor, GarageControl, GarageProperty, GarageState, HumidityInfo, HumidityProperty, LeakProperty, LeakSensor, LicensePlateDetectorSensor, LicensePlateProperty, LicensePlateSensor, LightCapability, LightControl, LightProperty, LockControl, LockProperty, LockState, MotionDetectorSensor, MotionProperty, MotionSensor, OBJECT_DETECTION_LABELS, ObjectDetectorSensor, ObjectProperty, ObjectSensor, Observable, OccupancyProperty, OccupancySensor, PTZCapability, PTZControl, PTZProperty, PluginCapability, PluginInterface, PluginRole, RING_AUTO_RESET_MS, ReplaySubject, RtpPacket, SENSOR_META, SecuritySystem, SecuritySystemProperty, SecuritySystemState, Sensor, SensorCategory, SensorDomain, SensorType, Severity, SirenCapability, SirenControl, SirenProperty, SmokeProperty, SmokeSensor, Subject, SwitchControl, SwitchProperty, TemperatureInfo, TemperatureProperty, audioMeta, batteryMeta, canCreateCameras, canProvideSensorsToAnyCameras, classifierMeta, clipMeta, contactMeta, defineSensor, distinctUntilChanged, doorbellMeta, faceMeta, filter, firstValueFrom, garageMeta, getContractValidationErrors, hasCapability, hasInterface, humidityMeta, isHub, leakMeta, licensePlateMeta, lightMeta, lockMeta, map, mergeMap, motionMeta, objectMeta, occupancyMeta, pairwise, ptzMeta, securitySystemMeta, sensorMeta, share, sirenMeta, smokeMeta, switchMeta, temperatureMeta, validateContractConsistency };
7337
+ export type { AssignedPlugin, AudioCodec, AudioCodecProperties, AudioDetectionInterface, AudioDetectionPluginResponse, AudioDetectionSettings, AudioFFmpegCodec, AudioFrameData, AudioInputSpec, AudioLabel, AudioMetadata, AudioModelSpec, AudioResult, AudioSensorLike, AudioSensorProperties, AudioStreamInfo, BaseAudioLabel, BaseCamera, BaseCameraConfig, BatteryInfoLike, BatteryInfoProperties, BoundingBox, Camera, CameraAspectRatio, CameraAspectRatioPreset, CameraConfig, CameraConfigInputSettings, CameraDetectionSettings, CameraDevice, CameraDeviceSource, CameraFrameWorkerSettings, CameraImplementation, CameraInformation, CameraInput, CameraPluginInfo, CameraRole, CameraSource, CameraType, CameraUiSettings, ClassifierDetection, ClassifierDetectionInterface, ClassifierDetectionPluginResponse, ClassifierResult, ClassifierSensorLike, ClassifierSensorProperties, ClipDetectionInterface, ClipDetectionPluginResponse, ClipEmbedding, ClipResult, ClipTextEmbeddingResult, ContactSensorLike, ContactSensorProperties, CoreManager, CoreManagerEvent, CreateDownloadOptions, CreateStreamDownloadOptions, Detection, DetectionAttribute, DetectionEvent, DetectionEventState, DetectionEventType, DetectionLabel, DetectionLine, DetectionZone, DeviceManager, DeviceStorage, DiscoveredCamera, DiscoveryProvider, DoorbellTriggerLike, DoorbellTriggerProperties, DownloadCleanup, DownloadManager, DownloadToken, EventAttribute, EventDescription, EventDetection, EventSegment, EventTrigger, EventTriggerType, FMTPInfo, FaceDetection, FaceDetectionInterface, FaceDetectionPluginResponse, FaceResult, FaceSensorLike, FaceSensorProperties, Fmp4Session, Fmp4SessionOptions, FormSubmitResponse, FormSubmitSchema, GarageControlLike, GarageControlProperties, Go2RtcRTSPSource, Go2RtcSnapshotSource, Go2RtcWSSource, HardwareAcceleration, HumidityInfoLike, HumidityInfoProperties, ImageMetadata, JsonArraySchema, JsonBaseSchema, JsonBaseSchemaWithoutCallbacks, JsonBooleanSchema, JsonEnumSchema, JsonFactorySchema, JsonNumberSchema, JsonSchema, JsonSchemaArray, JsonSchemaArrayWithoutCallbacks, JsonSchemaBoolean, JsonSchemaBooleanWithoutCallbacks, JsonSchemaButton, JsonSchemaEnum, JsonSchemaEnumWithoutCallbacks, JsonSchemaNumber, JsonSchemaNumberWithoutCallbacks, JsonSchemaString, JsonSchemaStringWithoutCallbacks, JsonSchemaSubmit, JsonSchemaType, JsonSchemaWithoutCallbacks, JsonSchemaWithoutKey, JsonStringSchema, LeakSensorLike, LeakSensorProperties, LicensePlateDetection, LicensePlateDetectionInterface, LicensePlateDetectionPluginResponse, LicensePlateResult, LicensePlateSensorLike, LicensePlateSensorProperties, LightControlLike, LightControlProperties, LineDirection, LockControlLike, LockControlProperties, LoggerService, ModelSpec, MotionDetectionInterface, MotionDetectionPluginResponse, MotionDetectionSettings, MotionResolution, MotionResult, MotionSensorLike, MotionSensorProperties, Notification, NotificationManager, NotifierDevice, NotifierInterface, OAuthAuthCodeFlowCapable, OAuthCapable, OAuthClientCredentialsCapable, OAuthDeviceFlowCapable, OAuthMetadata, OAuthProviderConfig, OAuthProviderDeclaration, OAuthState, OAuthStatus, ObjectDetectionInterface, ObjectDetectionLabel, ObjectDetectionPluginResponse, ObjectDetectionSettings, ObjectModelSpec, ObjectResult, ObjectSensorLike, ObjectSensorProperties, OccupancySensorLike, OccupancySensorProperties, OperatorFn, PTZControlLike, PTZControlProperties, PTZDirection, PTZPosition, PTZRelativeMove, PluginAPI, PluginAssignments, PluginConfig, PluginContract, PluginInfo, PluginInterfaces, Point, ProbeAudioCodec, ProbeConfig, ProbeStream, PropertyChangeOf, PtzAutotrackSettings, PythonVersion, RTPInfo, RTSPAudioCodec, RTSPUrlOptions, RtpSession, RtpSessionBackchannelOptions, RtpSessionOptions, SchemaCondition, SchemaConditionOperator, SchemaConfig, SecuritySystemLike, SecuritySystemProperties, SensorAssignmentKey, SensorCapability, SensorCascadeTrigger, SensorLike, SensorMeta, SensorPropertySpec, SensorPropertyType, SensorPropertyValueType, SensorSemantics, SensorTriggerRef, SensorTriggerSettings, SensorVirtualDefaults, SirenControlLike, SirenControlProperties, SmokeSensorLike, SmokeSensorProperties, SnapshotInterface, SnapshotSettings, SnapshotUrlOptions, StreamDirection, StreamUrls, StreamingInterface, StreamingRole, SwitchControlLike, SwitchControlProperties, TemperatureInfoLike, TemperatureInfoProperties, ToastMessage, TrackedDetection, VideoCodec, VideoCodecProperties, VideoFFmpegCodec, VideoFrameData, VideoInputSpec, VideoStreamInfo, VideoStreamingMode, ZoneFilter, ZoneType };