Skip to content

@camera.ui/sdk / sensor / ButtonOptions

Interface: ButtonOptions ​

Defined in: sensor/button.ts:32

Options of a button, on top of the common sensor options.

Extends ​

Properties ​

address? ​

optional address?: string

Defined in: sensor/base.ts:1011

Current address at the source, e.g. a Home Assistant entity id. Display only, may change over time; identity is nativeId.

Inherited from ​

SensorOptions.address


capabilities? ​

optional capabilities?: readonly string[]

Defined in: sensor/base.ts:1019

Capabilities the sensor starts with, such as the last known ones of an adopted sensor.

Inherited from ​

SensorOptions.capabilities


device? ​

optional device?: DeviceInfo

Defined in: sensor/base.ts:1013

Device the sensor belongs to. Sensors of the plugin that report the same DeviceInfo.id form one device.

Inherited from ​

SensorOptions.device


index? ​

optional index?: number

Defined in: sensor/button.ts:34

Position of the button on its device, from 1, e.g. for HomeKit's button order.


nativeId? ​

optional nativeId?: string

Defined in: sensor/base.ts:999

Durable identity supplied by the plugin, e.g. an upstream device id. The host reconciles the sensor across restarts by (pluginId, nativeId); without it, identity falls back to (type, name) and a rename creates a new sensor.

Inherited from ​

SensorOptions.nativeId


origin? ​

optional origin?: string

Defined in: sensor/base.ts:1006

Source system the sensor was imported from, e.g. 'homeassistant'. The host stores it on the sensor entity, and export bridges targeting that system skip the sensor so an import can never be exported back to where it came from.

Inherited from ​

SensorOptions.origin


presses? ​

optional presses?: ButtonPress[]

Defined in: sensor/button.ts:36

Kinds of press the button reports besides a single press.


primary? ​

optional primary?: boolean

Defined in: sensor/base.ts:1015

Whether the sensor is the main sensor of its device, called like the device when it stands alone.

Inherited from ​

SensorOptions.primary


propertySpecs? ​

optional propertySpecs?: Readonly<Record<string, PropertySpecOverride>>

Defined in: sensor/base.ts:1017

What the device accepts per property, see setPropertySpec().

Inherited from ​

SensorOptions.propertySpecs