Skip to content

Latest commit

 

History

History
69 lines (41 loc) · 1.53 KB

color-temperature.rst

File metadata and controls

69 lines (41 loc) · 1.53 KB

cap:color:temperature - light supports temperature

Capability used to mark lights that support setting color temperature natively.

js

if(thing.matches('cap:color:temperature')) {

console.log('Range is', thing.colorTemperatureRange);

}

API

Events

Protected methods

Implementing capability

Implementors of this capability should call setColorTemperatureRange either in the constructor or initCallback.

Example:

js

const { Light, ColorTemperature } = require('abstract-things/lights');

class Example extends Light.with(ColorTemperature) {

constructor() {

super();

this.updateColorTemperatureRange(2000, 5000);

}

}