Sony Bravia Android TV

If you are talking about my integration, you have to configure a PSK on your TV first. See instructions from https://github.com/custom-components/media_player.braviatv_psk

When you should add it as a remote platform with your TVs IP and PSK to your configuration.yaml. After restarting the HA, you’ll be able to send commands from remotes domain like this:

data:
  command: tvantennacable
entity_id: remote.your_tv_remote
service: remote.send_command

For the list of available commands you can look here: https://github.com/divanikus/braviatv_remote/blob/a38076553bb1a93429f4e9c66ffb6065c6843e6b/custom_components/braviatv_remote/remote.py#L36
All of them are from bash script mentioned earlier on this topic.
I recommend to use it in addition to official media_player.bravia or bravia_psk components.

@paddy0174 thanks, but it’s just a wrap up of the bash script, I don’t think it deserves to be a separate project.

I was actually talking about any integration with the Bravia TV. Seemingly mine doesn’t seem to have the options listed on the TV example: “[Network] => [Home Network Setup] => [IP Control] => [Authentication] => [Normal and Pre-Shared Key]”.

I just don’t have those options and wonder if i’m missing something!?

Maybe I am too dense, but I only started using HA today and I honestly have no idea how to achieve any of you’re mentioning.

I tried the script on a linux machine and it works like a charm but now how do I integrate this into HA? I am using HA on a VM, how can I upload the script?

Steps I took:
1- I went to visual studio code UI and created a new file and called it send_command.sh, then pasted the script into it
2- under configration.yaml I added a shell_command:

bravia_poweroff: 'bash /home/homeassistant/.homeassistant/send_command.sh 192.168.107.67 AAAAAQAAAAEAAAAvAw=='

but nothing happens, I don’t see the service in my automations, I tried changing the path to the /config/send_command.sh but still nothing, what am I missing because I am 100% sure its a misconfiguration on my part, I still don’t understand the hierarchy and structure of HA well but I am learning.

I ended up figuring this out, in case any one is wondering, paste the bellow into your configuration.yaml
Just make sure to replace your TV ip, command from the list that @argykaraz posted and authkey to whatever you set your authkey to in the TV

shell_command:
  bravia_off: |-
    curl -w "%{http_code}" --silent -XPOST http://192.168.107.57/sony/IRCC -d "<?xml version=\"1.0\"?><s:Envelope xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\" s:encodingStyle=\"http://schemas.xmlsoap.orgap/encoding/\"><s:Body><u:X_SendIRCC xmlns:u=\"urn:schemas-sony-com:service:IRCC:1\"><IRCCCode>AAAAAQAAAAEAAAAvAw=='</IRCCCode></u:X_SendIRCC></s:Body></s:Envelope>" -H 'Content-Type: text/xml; charset=UTF-8' -H 'SOAPACTION: "urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"' -H "X-Auth-PSK: 0000" -o /dev/null