Skip to main content

HardwareButton

<PropTable>: Couldn't find prop definition for `HardwareButtonOptions`
HardwareButtonObject
<PropTable>: Couldn't find prop definition for `HardwareButtonObject`

HardwareButton allows setting specific values on a HardwareObject with a single click, it can accept one or more objects and associated values.

A basic config is as follows:

- type: component
component: hardwarebutton
options:
title: 'Turn On'
ids:
- id: m1
value: 10
function: move
- id: m2
value: 5
function: move

The component can execute a function on the object, or change a property:

...
ids:
- id: m1
value: 10
property: speed

The button can also be configured to move by relative amounts, but a reference must be specified (i.e. the property on the object to take as the reference value):

- type: component
component: hardwarebutton
options:
title: 'Increment'
icon: 'fa-arrow-up'
ids:
- id: m1
increment: 1
function: move
reference: position

The increment can also be set from a series of step sizes. This assumes that all linked objects will be moved by the same step size:

- type: component
component: hardwarebutton
options:
title: 'Increment'
icon: 'fa-arrow-up'
ids:
- id: m1
steps: [1, 5, 10]
function: move
reference: position

It can also use an icon as its title: