@camera.ui/sdk / sensor / SensorSemantics
Interface: SensorSemantics
Defined in: sensor/meta.ts:74
What a sensor means, independent of any transport: which property holds its state, which takes commands, its unit and state mapping. Consumers (MQTT discovery, the HA integration) render from this instead of their own switch.
Properties
brightness?
readonlyoptionalbrightness?:object
Defined in: sensor/meta.ts:92
Property carrying brightness, plus the scale factor a consumer applies to it.
property
readonlyproperty:string
scale
readonlyscale:number
commandProperty
readonlycommandProperty:string
Defined in: sensor/meta.ts:80
Property that takes commands.
deviceClass?
readonlyoptionaldeviceClass?:string
Defined in: sensor/meta.ts:82
Device class, where one applies.
diagnostic?
readonlyoptionaldiagnostic?:boolean
Defined in: sensor/meta.ts:88
Whether consumers should file it under diagnostics instead of controls.
domain
readonlydomain:SensorDomain
Defined in: sensor/meta.ts:76
Which kind of thing the sensor is.
icon?
readonlyoptionalicon?:string
Defined in: sensor/meta.ts:86
Material Design icon name, e.g. mdi:door.
stateProperty
readonlystateProperty:string
Defined in: sensor/meta.ts:78
Property holding the sensor's state.
states?
readonlyoptionalstates?:Readonly<Record<string,number>>
Defined in: sensor/meta.ts:90
State-name to wire-value mapping for multi-state sensors.
unit?
readonlyoptionalunit?:string
Defined in: sensor/meta.ts:84
Unit of the state value, e.g. % or °C.
volume?
readonlyoptionalvolume?:object
Defined in: sensor/meta.ts:94
Property carrying volume, plus the scale factor a consumer applies to it.
property
readonlyproperty:string
scale
readonlyscale:number