Samsung Series 5 tv (M5300) how to make remote work?

I’ve been playing with it for a couple days. There is a remote that I think I’m supposed to be able to add actions to but I can’t figure that out. I’ve been googling and reading but I can’t seem to grasp things. How do I set up a remote control in Home Assistant to control my tv?

Btw, I was playing with turning the tv on via magic packets. I turned it on in the tv and then I found a powershell script to send the packets. Sometimes the tv turns on, other times not. TV is on wifi.

$Mac = "1A:2B:3C:4D:5E:6F"
$MacByteArray = $Mac -split "[:-]" | ForEach-Object { [Byte] "0x$_"}
[Byte[]] $MagicPacket = (,0xFF * 6) + ($MacByteArray  * 16)
$UdpClient = New-Object System.Net.Sockets.UdpClient
$UdpClient.Connect(([System.Net.IPAddress]::Broadcast),7)
$UdpClient.Send($MagicPacket,$MagicPacket.Length)
$UdpClient.Close()

Above code is from PDQ blog.

Thanks,