added option to define sensor input priority