lib/devices/capabilities/sensor.js
function mixin(device, options) {
	if(device.capabilities.indexOf('sensor') < 0) {
		device.capabilities.push('sensor');
	}

	device.capabilities.push(options.name);
	Object.defineProperty(device, options.name, {
		get: function() {
			return this.property(options.name);
		}
	});
}
function mixin(device, options) {
	if(device.capabilities.indexOf('sensor') < 0) {
		device.capabilities.push('sensor');
	}

	device.capabilities.push(options.name);
	Object.defineProperty(device, options.name, {
		get: function() {
			return this.property(options.name);
		}
	});
}
function mixin ( device , options ) { if ( device . capabilities . indexOf ( 'sensor' ) < 0 ) { device . capabilities . push ( 'sensor' ) ; } device . capabilities . push ( options . name ) ; Object . defineProperty ( device , options . name , { get : function ( ) { return this . property ( options . name ) ; } } ) ; }
Setup sensor support for a device.
Setup sensor support for a device .