Automation based on Samsung TV Input

I am using the custom samsung smart things integration for my tv and i see i can change the input on the dashboard but how do i create an automation based on the input that the tv is on

In general you would make an automation based on the states that the tv integration exposes. If you are having trouble with a specific thing please show your automation.

You could create a template trigger :

platform: template
value_template: "{% if (( state_attr('media_player.samsung_tv', 'source') )) == 'TV/HDMI'  %}"