I was about to post the question, but trying to type it out myself I figured out the answer. I thought I would still post just in case it would be helpful for anyone else.
To select an item with OptionButton based on the ID, not the item index:
select(get_item_index(id))