@mager had the same idea as me using Ted’s code. Check it out here
Hack the Amazon Dash button to control a SmartThings switch