You can refer to this article for more details. If you are using a consumer grade TV and OptiSigns Pre-Configured Android Stick, the TV Power On/Off is achieved through HDMI-CEC.There are 2 ways you can do it with OptiSigns depending on what devices you are using.
With OptiSigns, you can schedule TV Power On/Off using the advanced schedule feature.