added logic to auto set a sensor during definition creation