Sony Bravia tv lovelace custom tv remote card

I am setting up a gui lovelace frontend custom tv remote card ““GitHub - marrobHD/tv-card: 📺 TV Remote Card”” for the Sony bravia tv integration ““Sony Bravia TV - Home Assistant””

Developer tools service call yamel code below works
, , ,
service: remote.send_command
target:
entity_id: remote.sony_bravia_tv
data:
command: ‘TvPower’
, , ,

But by my custom card gui button only shows error


CustomCard yamel code
, , ,
type: custom:tv-card
entity: sun.sun
name: Livingroom TV
tv: true
back:
Action: call-service
service: remote.send_command
Command: return
service_data: null
entity_id: remote.sony_bravia_tv
channeldown:
Action: call-service
service: remote.send_command
Command: channeldown
service_data: null
entity_id: remote.sony_bravia_tv
channelup:
Action: call-service
service: remote.send_command
Command: channelup
service_data: null
entity_id: remote.sony_bravia_tv
down:
Action: call-service
service: remote.send_command
Command: down
service_data: null
entity_id: remote.sony_bravia_tv
forward:
Action: call-service
service: remote.send_command
Command: forward
service_data: null
entity_id: remote.sony_bravia_tv
home:
Action: call-service
service: remote.send_command
Command: home
service_data: null
entity_id: remote.sony_bravia_tv
info:
Action: call-service
service: remote.send_command
Command: null
service_data: null
entity_id: remote.sony_bravia_tv
left:
Action: call-service
service: remote.send_command
Command: left
service_data: null
entity_id: remote.sony_bravia_tv
play:
Action: call-service
service: remote.send_command
Command: play
service_data: null
entity_id: remote.sony_bravia_tv
power:
service: remote.send_command
target:
device_id: ea45a21074749a14c0aff266fd3c7810
data:
command: TvPower
reverse:
Action: call-service
service: remote.send_command
Command: rewind
service_data: null
entity_id: remote.sony_bravia_tv
right:
Action: call-service
service: remote.send_command
Command: right
service_data: null
entity_id: remote.sony_bravia_tv
select:
Action: call-service
service: remote.send_command
Command: confirm
service_data: null
entity_id: remote.sony_bravia_tv
source:
Action: call-service
service: remote.send_command
Command: input
service_data: null
entity_id: remote.sony_bravia_tv
, , ,

What am I missing I’m using the pin authorization but the service works in the developer tools?

Your code is hard to read due to not being formatted, but the general form of the services config should be, e.g.,

power:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: TvPower

Case is important. “Action” should be “action”, for instance.
Bottom-line: follow the custom card documentation more closely

1 Like

Fixed thanks for the help here my fixed card code

You might have another id used the channelup and down for volume

type: custom:tv-card
entity: sun.sun
name: Livingroom TV
tv: true
back:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Return
backs:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Back
channeldown:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: VolumeDown
channelup:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: VolumeUp
down:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Down
forward:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Forward
home:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Home
guide:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Media
info:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Info
up:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Up
left:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Left
play:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Play
power:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: TvPower
reverse:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Rewind
right:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Right
select:
  service: Remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: Confirm
source:
  service: remote.send_command
  service_data:
    entity_id: remote.sony_bravia_tv
    command: TvInput

2 Likes

Do you mind to show us the fixed card code again, this time correctly formatted so other readers can make more sense out of it?

Inside the Editor just highlight the complete code you just did paste and hit the </> -button within the toolbar above. You’ll see the outcome inside the preview window to the right.

1 Like

@skynet-network thanks for writing this out - I was able to reuse in my code!

the lovelace card broke after core-2021.11 used the GitHub - iantrich/roku-card: 📺 Roku Remote Card card insteed with apps keys


> Blockquote

type: custom:roku-card
entity: media_player.sony_bravia_tv
tv: true
apps:
  - image: null
    icon: mdi:netflix
    app: Netflix
    tap_action:
      action: call-service
      service: media_player.select_source
      service_data:
        source: Netflix
        entity_id: media_player.sony_bravia_tv
  - image: null
    icon: mdi:vhs
    app: youtube Kids
    tap_action:
      action: call-service
      service: media_player.select_source
      service_data:
        source: YouTube Kids
        entity_id: media_player.sony_bravia_tv
  - image: null
    icon: mdi:filmstrip
    app: prime video
    tap_action:
      action: call-service
      service: media_player.select_source
      service_data:
        source: Prime Video
        entity_id: media_player.sony_bravia_tv
  - image: null
    icon: mdi:youtube
    app: youtube
    tap_action:
      action: call-service
      service: media_player.select_source
      service_data:
        source: YouTube
        entity_id: media_player.sony_bravia_tv
power:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: TvPower
volume_up:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: VolumeUp
volume_down:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: VolumeDown
volume_mute:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: VolumeMute
up:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: Up
down:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: Down
left:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: Left
right:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: Right
home:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: Home
Info:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: Input
back:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: Return
select:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: Confirm
reverse:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: Rewind
play:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: Play
Forward:
  tap_action:
    action: call-service
    service: remote.send_command
    service_data:
      entity_id: remote.sony_bravia_tv
      command: Forward

> Blockquote

1 Like

For poeple seeking for examples:

type: custom:tv-card
entity: sun.sun
tv: true
select:
  service: remote.send_command
  service_data:
    command: Confirm
    entity_id: remote.sony_xr_77a83j
up:
  service: remote.send_command
  service_data:
    command: Up
    entity_id: remote.sony_xr_77a83j
down:
  service: remote.send_command
  service_data:
    command: Down
    entity_id: remote.sony_xr_77a83j
left:
  service: remote.send_command
  service_data:
    command: Left
    entity_id: remote.sony_xr_77a83j
right:
  service: remote.send_command
  service_data:
    command: Right
    entity_id: remote.sony_xr_77a83j
power:
  service: media_player.turn_on
  service_data:
    device_id: 84f5c31bd728dce0fb1527e779b91156
applications:
  Ampli:
    icon: mdi:amplifier
    service: trigger.automation
    service_data:
      entity_id: automation.ampli_bravia
  Bravia_Power_On:
    icon: mdi:power-plug-off
    service: switch.turn_off
    service_data:
      entity_id: switch.salon_1_bravia
  Bravia_Power_Off:
    icon: mdi:power-plug
    service: switch.turn_on
    service_data:
      entity_id: switch.salon_1_bravia
  V+:
    icon: mdi:volume-plus
    service: remote.send_command
    service_data:
      device: Ampli
      command: VolumeUp
      entity_id: remote.stargate
  V-:
    icon: mdi:volume-minus
    service: remote.send_command
    service_data:
      device: Ampli
      command: VolumeDown
      entity_id: remote.stargate
  Mute:
    icon: mdi:volume-mute
    service: remote.send_command
    service_data:
      device: Ampli
      command: VolumeDown
      entity_id: remote.stargate
  Home:
    icon: mdi:home
    service: remote.send_command
    service_data:
      command: Home
      entity_id: remote.sony_xr_77a83j
  Netflix:
    icon: mdi:netflix
    service: remote.send_command
    service_data:
      command: Netflix
      entity_id: remote.sony_xr_77a83j
  HDMI1:
    icon: mdi:hdmi-port
    service: remote.send_command
    service_data:
      command: Hdmi1
      entity_id: remote.sony_xr_77a83j

Is there a way to create buttons for apps?
I have successfully added the Netlix but it was build in app, how can I add the Disney+ for example?

I think you can using URI but I don’t know the syntax for that. Have you checked what commands does your TV supports ?

For example, mine returns:

{
  "result": [
    [
      {
        "title": "Play Store",
        "uri": "com.sony.dtv.com.android.vending.com.google.android.finsky.tvmainactivity.TvMainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.android.vending.com.google.android.finsky.tvmainactivity.TvMainActivity.png"
      },
      {
        "title": "YouTube",
        "uri": "com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.ShellActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.ShellActivity.png"
      },
      {
        "title": "YouTube Music",
        "uri": "com.sony.dtv.com.google.android.youtube.tvmusic.com.google.android.apps.youtube.tvmusic.activity.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.google.android.youtube.tvmusic.com.google.android.apps.youtube.tvmusic.activity.MainActivity.png"
      },
      {
        "title": "Music",
        "uri": "com.sony.dtv.com.sony.dtv.osat.music.com.sonyericsson.music.MusicActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.osat.music.com.sonyericsson.music.MusicActivity.png"
      },
      {
        "title": "Media Player",
        "uri": "com.sony.dtv.com.sony.dtv.smartmediaapp.com.sony.dtv.smartmediaapp.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.smartmediaapp.com.sony.dtv.smartmediaapp.MainActivity.png"
      },
      {
        "title": "Timers &amp; Clock",
        "uri": "com.sony.dtv.com.sony.dtv.timers.com.sony.dtv.activity.TimersMainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.timers.com.sony.dtv.activity.TimersMainActivity.png"
      },
      {
        "title": "TV",
        "uri": "com.sony.dtv.com.sony.dtv.tvx.com.sony.dtv.tvx.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.tvx.com.sony.dtv.tvx.MainActivity.png"
      },
      {
        "title": "Launchy Launcher",
        "uri": "com.sony.dtv.com.hugegreenbug.launchy.com.hugegreenbug.launchy.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.hugegreenbug.launchy.com.hugegreenbug.launchy.MainActivity.png"
      },
      {
        "title": "TED",
        "uri": "com.sony.dtv.com.ted.android.tv.com.ted.android.tv.view.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.ted.android.tv.com.ted.android.tv.view.MainActivity.png"
      },
      {
        "title": "Prime Video",
        "uri": "com.sony.dtv.com.amazon.amazonvideo.livingroom.com.amazon.ignition.IgnitionActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.amazon.amazonvideo.livingroom.com.amazon.ignition.IgnitionActivity.png"
      },
      {
        "title": "Apple TV",
        "uri": "com.sony.dtv.com.apple.atve.sony.appletv.com.apple.atve.sony.appletv.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.apple.atve.sony.appletv.com.apple.atve.sony.appletv.MainActivity.png"
      },
      {
        "title": "Play Games",
        "uri": "com.sony.dtv.com.google.android.play.games.com.google.android.apps.play.games.app.atv.features.home.HomeActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.google.android.play.games.com.google.android.apps.play.games.app.atv.features.home.HomeActivity.png"
      },
      {
        "title": "Play Movies &amp; TV",
        "uri": "com.sony.dtv.com.google.android.videos.com.google.android.videos.tv.presenter.activity.TvLauncherActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.google.android.videos.com.google.android.videos.tv.presenter.activity.TvLauncherActivity.png"
      },
      {
        "title": "Netflix",
        "uri": "com.sony.dtv.com.netflix.ninja.com.netflix.ninja.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.netflix.ninja.com.netflix.ninja.MainActivity.png"
      },
      {
        "title": "Calman for BRAVIA",
        "uri": "com.sony.dtv.com.sony.dtv.calibrationmonitor.com.sony.dtv.calibrationmonitor.ActionCheckActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.calibrationmonitor.com.sony.dtv.calibrationmonitor.ActionCheckActivity.png"
      },
      {
        "title": "Eco Dashboard",
        "uri": "com.sony.dtv.com.sony.dtv.ecodashboard.com.sony.dtv.ecodashboard.presentation.activity.EcoDashboardActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.ecodashboard.com.sony.dtv.ecodashboard.presentation.activity.EcoDashboardActivity.png"
      },
      {
        "title": "Living Decor",
        "uri": "com.sony.dtv.com.sony.dtv.livingfit.com.sony.dtv.livingfit.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.livingfit.com.sony.dtv.livingfit.MainActivity.png"
      },
      {
        "title": "BRAVIA notifications",
        "uri": "com.sony.dtv.com.sony.dtv.notificationcenter.com.sony.dtv.notificationcenter.NotificationCenterActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.notificationcenter.com.sony.dtv.notificationcenter.NotificationCenterActivity.png"
      },
      {
        "title": "My BRAVIA",
        "uri": "com.sony.dtv.com.sony.dtv.promos.com.sony.dtv.promos.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.promos.com.sony.dtv.promos.MainActivity.png"
      },
      {
        "title": "Title List",
        "uri": "com.sony.dtv.com.sony.dtv.recapp.com.sony.dtv.recapp.MainActivityIcon",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.recapp.com.sony.dtv.recapp.MainActivityIcon.png"
      },
      {
        "title": "Help",
        "uri": "com.sony.dtv.com.sony.dtv.smarthelp.com.sony.dtv.smarthelp.activity.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.smarthelp.com.sony.dtv.smarthelp.activity.MainActivity.png"
      },
      {
        "title": "Sony Select",
        "uri": "com.sony.dtv.com.sony.dtv.sonyselect.com.sony.dtv.sonyselect.activities.LaunchActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.sonyselect.com.sony.dtv.sonyselect.activities.LaunchActivity.png"
      },
      {
        "title": "Timers &amp; Clock",
        "uri": "com.sony.dtv.com.sony.dtv.timers.com.sony.dtv.timers.activity.TimersMainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sony.dtv.timers.com.sony.dtv.timers.activity.TimersMainActivity.png"
      },
      {
        "title": "BRAVIA CORE",
        "uri": "com.sony.dtv.com.sonypicturescore.com.sphe.bravialounge.SplashActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.sonypicturescore.com.sphe.bravialounge.SplashActivity.png"
      },
      {
        "title": "Internet Browser",
        "uri": "com.sony.dtv.com.vewd.core.integration.dia.com.vewd.core.integration.dia.SonyBrowserUiActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.vewd.core.integration.dia.com.vewd.core.integration.dia.SonyBrowserUiActivity.png"
      },
      {
        "title": "Play RTS",
        "uri": "com.sony.dtv.ch.rts.player.ch.srg.srgplayer.tv.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.ch.rts.player.ch.srg.srgplayer.tv.MainActivity.png"
      },
      {
        "title": "PlaySuisse",
        "uri": "com.sony.dtv.ch.srgssr.playsuisse.tv.ch.srgssr.playsuisse.tv.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.ch.srgssr.playsuisse.tv.ch.srgssr.playsuisse.tv.MainActivity.png"
      },
      {
        "title": "File Manager +",
        "uri": "com.sony.dtv.com.alphainventor.filemanager.com.alphainventor.filemanager.activity.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.alphainventor.filemanager.com.alphainventor.filemanager.activity.MainActivity.png"
      },
      {
        "title": "APKMirror Installer (beta)",
        "uri": "com.sony.dtv.com.apkmirror.helper.prod.com.apkmirror.presentation.start.StartActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.apkmirror.helper.prod.com.apkmirror.presentation.start.StartActivity.png"
      },
      {
        "title": "Paramount+",
        "uri": "com.sony.dtv.com.cbs.ca.com.paramount.android.pplus.splash.tv.ui.activity.SplashActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.cbs.ca.com.paramount.android.pplus.splash.tv.ui.activity.SplashActivity.png"
      },
      {
        "title": "CuriosityStream",
        "uri": "com.sony.dtv.com.curiosity.curiositystream.androidtv.com.curiosity.activities.OnboardingActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.curiosity.curiositystream.androidtv.com.curiosity.activities.OnboardingActivity.png"
      },
      {
        "title": "Disney+",
        "uri": "com.sony.dtv.com.disney.disneyplus.com.bamtechmedia.dominguez.main.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.disney.disneyplus.com.bamtechmedia.dominguez.main.MainActivity.png"
      },
      {
        "title": "Sunrise TV",
        "uri": "com.sony.dtv.com.lgi.upcch.com.libertyglobal.horizonx.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.lgi.upcch.com.libertyglobal.horizonx.MainActivity.png"
      },
      {
        "title": "NordVPN",
        "uri": "com.sony.dtv.com.nordvpn.android.com.nordvpn.android.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.nordvpn.android.com.nordvpn.android.MainActivity.png"
      },
      {
        "title": "Cast for PICO",
        "uri": "com.sony.dtv.com.pico.screencast.com.pico.screencast.SplashActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.pico.screencast.com.pico.screencast.SplashActivity.png"
      },
      {
        "title": "Vimeo",
        "uri": "com.sony.dtv.com.vimeo.android.videoapp.com.vimeo.android.videoapp.core.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.com.vimeo.android.videoapp.com.vimeo.android.videoapp.core.MainActivity.png"
      },
      {
        "title": "Fully Kiosk Browser",
        "uri": "com.sony.dtv.de.ozerov.fully.de.ozerov.fully.TvActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.de.ozerov.fully.de.ozerov.fully.TvActivity.png"
      },
      {
        "title": "6play",
        "uri": "com.sony.dtv.fr.m6.m6replay.fr.m6.m6replay.tv.activity.SplashActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.fr.m6.m6replay.fr.m6.m6replay.tv.activity.SplashActivity.png"
      },
      {
        "title": "ARTE",
        "uri": "com.sony.dtv.tv.arte.plus7.tv.arte.plus7.leanback.MainActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.tv.arte.plus7.tv.arte.plus7.leanback.MainActivity.png"
      },
      {
        "title": "Rakuten TV",
        "uri": "com.sony.dtv.tv.wuaki.apptv.tv.wuaki.apptv.activity.TVLaunchActivity",
        "icon": "http://192.168.1.159/DIAL/icon/com.sony.dtv.tv.wuaki.apptv.tv.wuaki.apptv.activity.TVLaunchActivity.png"
      }
    ]
  ],
  "id": 1
}

To be honest I’m still learning HA. How can I check that?

For instance, this is not HA but Bravia :slight_smile:

curl -H 'Content-Type: application/json' -H 'X-Auth-PSK:<preshared key>' -X POST -d "{'id': 1, 'method': 'getApplicationList', 'version': '1.0', 'params': ['']}" http://<Bravia IP>/sony/appControl

Replace with your key. You can find it on your TV, under Settings > Network & Internet > Home Network > IP Control > Pre-Shared Key.

You have to set Authentication to “Normal and Pre-Shared Key”

Then you can copy/paste the result on a website like https://jsonbeautifier.org/ to make it readable

I wasn’t able to get the curl command above to work thought I tried it from HASS terminal, my unraid box, and from Windows.
However, I was able to get the commands by following the process here using a REST addon for my browser (I used Firefox).
[https://openremote.github.io/archive-dotorg/forums/Sony TV HTTP control.html#comment-23601972](https://openremote.github.io/archive-dotorg/forums/Sony TV HTTP control.html#comment-23601972)

Here’s the remote yaml I’m using:

type: custom:tv-card
entity: sun.sun
tv: true
select:
  service: remote.send_command
  service_data:
    command: Confirm
    entity_id: remote.sony_xbr_55x810c
up:
  service: remote.send_command
  service_data:
    command: Up
    entity_id: remote.sony_xbr_55x810c
down:
  service: remote.send_command
  service_data:
    command: Down
    entity_id: remote.sony_xbr_55x810c
left:
  service: remote.send_command
  service_data:
    command: Left
    entity_id: remote.sony_xbr_55x810c
right:
  service: remote.send_command
  service_data:
    command: Right
    entity_id: remote.sony_xbr_55x810c
power:
  service: media_player.toggle
  service_data:
    device_id: bfb8f1440a207a4af432f7e2f7ed3432
applications:
  V+:
    icon: mdi:volume-plus
    service: remote.send_command
    service_data:
      command: VolumeUp
      entity_id: remote.sony_xbr_55x810c
  V-:
    icon: mdi:volume-minus
    service: remote.send_command
    service_data:
      command: VolumeDown
      entity_id: remote.sony_xbr_55x810c
  Mute:
    icon: mdi:volume-mute
    service: remote.send_command
    service_data:
      command: Mute
      entity_id: remote.sony_xbr_55x810c
  Netflix:
    icon: mdi:netflix
    service: remote.send_command
    service_data:
      command: Netflix
      entity_id: remote.sony_xbr_55x810c
  hdmi4:
    icon: mdi:hdmi-port
    service: remote.send_command
    service_data:
      command: Hdmi4
      entity_id: remote.sony_xbr_55x810c
  Home:
    icon: mdi:home
    service: remote.send_command
    service_data:
      command: Home
      entity_id: remote.sony_xbr_55x810c