When a media_player.turn_off is issued on a LG tv if it’s already off it turns on… I can solve this is the automation rules to only send a turn off if TV is not off already but seems this is a shortcoming of the code
Also of TV is on and a turn on event is sent it turns off