For exposing it to Home kit you might consider a template switch. Don’t really know about turning it off, I just use a Broadlink IR blaster for operating my Samsung TV. A lot of models are not properly supported as media players.
It seems that i also have to use broadlink too…
It just if im able to turn it off as media player why can’t i turn it back on?
This could be lack of support for this older samsung tv model.