Made changes to Sensor class to support Plugins