UNPKG

homebridge-bond

Version:

A homebridge plugin to control your Bond devices over the v2 API.

18 lines (17 loc) 509 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Observer = void 0; class Observer { static set(characteristic, set) { characteristic .on('set', (value, callback) => { // Avoid doing anything when the device is in the requested state if (value === characteristic.value) { callback(null); return; } set(value, callback); }); } } exports.Observer = Observer;