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
}
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);
}
}