Service

Service.getCharacteristic

Service.getCharacteristic: (name: string | T) => Characteristic

Returns the requested Characteristic for the service.

service.getCharacteristic(Characteristic.Brightness);

Service.setCharacteristic

Service.setCharacteristic: (name: string | T, value: CharacteristicValue) => Characteristic

Set the characteristic value.

service.setCharacteristic(Characteristic.Name, 'Light Bulb 1');

Service.updateCharacteristic

Service.updateCharacteristic: (name: string | T, value: CharacteristicValue) => Characteristic

Updates the characteristic value. This can be used to update the state of a characteristic at any time, for example, when triggering a motion sensor.

service.updateCharacteristic(Characteristic.Brightness, 60);