Older SamsungTV - turn_on_action w/HDMI?

I currently have 2 Samsung TV’s that I like to control through Home Assistant. The newer TV supports WOL, which I have working using:

turn_on_action:
- service: wake_on_lan.send_magic_packet

However, the older TV (~2015) allows me to control things like Input, Volume, Turn Off, etc once the TV is on, but I would like to also have the TV turned on. I have messed with a Broadlink IR transmitter, which works, but the issue is I have some automation’s that Turn on the TV etc, but if the TV is already on, it turns it off. This TV has a roku connected and supports CEC through Samsung’s Anynet+ which will turn on the TV if I hit any button on the roku remote. Is is possible to make the turn_on_action of that TV a Roku command? Like goto home screen? Or any CEC command that will turn the TV on? Thanks in advance for any help!

Hi there. I have an “analog TV” and also had a problem with switching it on and off. My solution is a Wemos D1 Mini and the SmartIR custom component for Home Assistant. When I turn on the TV, the D1 Mini starts and logs in to the WLAN. SmartIR then ping the status from the TV and display it in HA. Now I have created an automation via NodeRED, as I need it … Maybe you don’t need the effort at all. If your TV created an internet connection I would “ping” it with NodeRED and display the status as a “Sensor”.