Samsung TV integration switch channel

Hello, i am trying to automate my Samsung smart TV because it is a display with clock and agenda configuration. the first automation is to automatically turn it on and off when there are no people in the kitchen.
now i am trying to automatically change the channel to the HDM1 port because my kids leef it on in youtube ::slight_smile:

can somebody help me with the code?

the below code is wrong…

type: HDMI1
device_id:---------7d99b68a5185769-------
entity_id: media_player.samsung_tv
domain: channel

This would actually be:

service: media_player.select_source
metadata: {}
data:
__source: HDMI1
target:
__device_id: yourdeviceid

But replace where I used __ with 2 spaces. I couldn’t figure out how to indent those 2 lines in my reply.

use ``` (3 back ticks) above and below the code block, which produces the following

x
x
x

here is a snapshot of it in my editor…
Screenshot 2024-06-07 at 15.27.42

For your text, you would get (I removed the underscores):

service: media_player.select_source
metadata: {}
data:
  source: HDMI1
target:
  device_id: yourdeviceid

You can also use the “Preformatted text” icon in the toolbar above the editor:
Screenshot 2024-06-07 at 15.31.05