getSensorId func + tests for it