csapi-sensor: change index type from int to unit in constructor