Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 645 Bytes

strips.rst

File metadata and controls

29 lines (19 loc) · 645 Bytes

type:light-strip - Light strips

The type light-bulb is a marker used to mark lights that are of the strip type.

js

if(thing.matches('cap:light-strip')) {

// The thing is a light strip

}

Implementing capability

Light strips are an extension to lights <implementing> and need to follow the same implementation guidelines.

js

const { LightStrip, SwitchablePower } = require('abstract-things/lights');

class Example extends LightStrip.with(SwitchablePower) {

changePower(power) {

return changePowerOfLight(power);

}

}