This is not a problem. First make it simple and when it works add some complexity to it. So drop sunrise, sunset and all the rest.
First you have to figure out when tv is on and when is off. I don’t know how you set it up, but this can be easily done with ie. Smart plug or outlet.
When you solve this than it’s easy to write some simple automation ie. When tv is on turn on led, when tv is off turn off led.