@camera.ui/sdk / sensor / SensorLike
Interface: SensorLike ​
Defined in: sensor/base.ts:183
Read-only view of a sensor, as other plugins and the backend see it. Use this type when consuming sensors, not when creating them.
All state-modifying methods (setOn, reportDetections, etc.) live on the concrete sensor classes, not on SensorLike. Code that holds a SensorLike reference can only read state and observe changes.
Extended by ​
AudioSensorLikeBatteryInfoLikeCarbonDioxideInfoLikeCarbonMonoxideSensorLikeClassifierSensorLikeColdSensorLikeContactSensorLikeDoorbellTriggerLikeFaceSensorLikeGarageControlLikeGasSensorLikeHeatSensorLikeHumidityInfoLikeIlluminanceInfoLikeLeakSensorLikeLicensePlateSensorLikeLightControlLikeLockControlLikeMotionSensorLikeObjectSensorLikeOccupancySensorLikePowerSensorLikeProblemSensorLikePTZControlLikeSecuritySystemLikeSirenControlLikeSmokeSensorLikeSwitchControlLikeTamperSensorLikeTemperatureInfoLikeVibrationSensorLike
Properties ​
assignedCameraIds ​
readonlyassignedCameraIds: readonlystring[]
Defined in: sensor/base.ts:192
assignmentLocked ​
readonlyassignmentLocked:boolean
Defined in: sensor/base.ts:193
capabilities ​
readonlycapabilities:string[]
Defined in: sensor/base.ts:190
connected ​
readonlyconnected:boolean
Defined in: sensor/base.ts:191
displayName ​
readonlydisplayName:string
Defined in: sensor/base.ts:187
id ​
readonlyid:string
Defined in: sensor/base.ts:184
name ​
readonlyname:string
Defined in: sensor/base.ts:186
nativeId? ​
readonlyoptionalnativeId?:string
Defined in: sensor/base.ts:188
onAssignmentChanged ​
readonlyonAssignmentChanged:Observable<readonlystring[]>
Defined in: sensor/base.ts:197
onCapabilitiesChanged ​
readonlyonCapabilitiesChanged:Observable<string[]>
Defined in: sensor/base.ts:195
onConnectedChanged ​
readonlyonConnectedChanged:Observable<boolean>
Defined in: sensor/base.ts:196
onPropertyChanged ​
readonlyonPropertyChanged:Observable<{property:string;timestamp:number;value:unknown; }>
Defined in: sensor/base.ts:194
pluginId? ​
readonlyoptionalpluginId?:string
Defined in: sensor/base.ts:189
type ​
readonlytype:SensorType
Defined in: sensor/base.ts:185
Methods ​
getValue() ​
getValue(
property):unknown
Defined in: sensor/base.ts:200
Get the current value of a sensor property.
Parameters ​
property ​
string
Returns ​
unknown
getValues() ​
getValues():
Readonly<Record<string,unknown>>
Defined in: sensor/base.ts:202
Get a read-only snapshot of all property values.
Returns ​
Readonly<Record<string, unknown>>
hasCapability() ​
hasCapability(
capability):boolean
Defined in: sensor/base.ts:211
Whether the sensor advertises the given capability.
Parameters ​
capability ​
string
Returns ​
boolean
updateValue() ​
updateValue(
property,value):void|Promise<void>
Defined in: sensor/base.ts:209
Generic property write used by cross-process bridges. The owning sensor dispatches it to the matching semantic method, so plugin-side hardware overrides still run. Plugin authors call the semantic methods instead.
Parameters ​
property ​
string
value ​
unknown
Returns ​
void | Promise<void>