LightsΒΆ

The main type for lights is light. Lights commonly use at least the switchable-power capability.

if(thing.matches('type:light', 'cap:switchable-power')) {
        thing.power(true)
                .then(() => console.log('powered on'))
                .catch(err => console.log('error occurred', err));
}