@camera.ui/sdk / sensor / SensorLike
Interface: SensorLike
Defined in: sensor/base.ts:168
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:177
assignmentLocked
readonlyassignmentLocked:boolean
Defined in: sensor/base.ts:178
capabilities
readonlycapabilities:string[]
Defined in: sensor/base.ts:175
connected
readonlyconnected:boolean
Defined in: sensor/base.ts:176
displayName
readonlydisplayName:string
Defined in: sensor/base.ts:172
id
readonlyid:string
Defined in: sensor/base.ts:169
name
readonlyname:string
Defined in: sensor/base.ts:171
nativeId?
readonlyoptionalnativeId?:string
Defined in: sensor/base.ts:173
onAssignmentChanged
readonlyonAssignmentChanged:Observable<readonlystring[]>
Defined in: sensor/base.ts:182
onCapabilitiesChanged
readonlyonCapabilitiesChanged:Observable<string[]>
Defined in: sensor/base.ts:180
onConnectedChanged
readonlyonConnectedChanged:Observable<boolean>
Defined in: sensor/base.ts:181
onPropertyChanged
readonlyonPropertyChanged:Observable<{property:string;timestamp:number;value:unknown; }>
Defined in: sensor/base.ts:179
pluginId?
readonlyoptionalpluginId?:string
Defined in: sensor/base.ts:174
type
readonlytype:SensorType
Defined in: sensor/base.ts:170
Methods
getValue()
getValue(
property):unknown
Defined in: sensor/base.ts:185
Get the current value of a sensor property.
Parameters
property
string
Returns
unknown
getValues()
getValues():
Readonly<Record<string,unknown>>
Defined in: sensor/base.ts:187
Get a read-only snapshot of all property values.
Returns
Readonly<Record<string, unknown>>
hasCapability()
hasCapability(
capability):boolean
Defined in: sensor/base.ts:196
Whether the sensor advertises the given capability.
Parameters
capability
string
Returns
boolean
updateValue()
updateValue(
property,value):void|Promise<void>
Defined in: sensor/base.ts:194
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>