Sony Bravia TV component with Pre-Shared Key

          type: service
          id: braviatv_psk.bravia_open_app
          data:
            entity_id: media_player.bedroom_bravia
            uri: >-
              com.sony.dtv.com.google.android.youtube.tv.com.google.android.apps.youtube.tv.activity.ShellActivity

Is it possible to pass a youtube playlist and set to automatic play some video from that playlist?

Hi Gerard,
I have this error:

Logger: homeassistant.components.websocket_api.http.connection
Source: custom_components/braviatv_psk/media_player.py:552
Integration: Home Assistant WebSocket API (documentation, issues)
First occurred: 08:16:08 (3 occurrences)
Last logged: 12:26:05

[140530191248656] 'NoneType' object has no attribute 'get'
[140530387018480] 'NoneType' object has no attribute 'get'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/commands.py", line 200, in handle_call_service
    await hass.services.async_call(
  File "/usr/src/homeassistant/homeassistant/core.py", line 1755, in async_call
    task.result()
  File "/usr/src/homeassistant/homeassistant/core.py", line 1792, in _execute_service
    await cast(Callable[[ServiceCall], Awaitable[None]], handler.job.target)(
  File "/usr/src/homeassistant/homeassistant/helpers/entity_component.py", line 213, in handle_service
    await service.entity_service_call(
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 678, in entity_service_call
    future.result()  # pop exception if have
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 958, in async_request_call
    await coro
  File "/usr/src/homeassistant/homeassistant/helpers/service.py", line 715, in _handle_entity_call
    await result
  File "/config/custom_components/braviatv_psk/media_player.py", line 552, in async_turn_on
    await self.hass.async_add_executor_job(self._braviarc.turn_on_command)
  File "/usr/local/lib/python3.10/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.10/site-packages/braviapsk/sony_bravia_psk.py", line 439, in turn_on_command
    self.send_req_ircc(self.get_command_code("TvPower"))
  File "/usr/local/lib/python3.10/site-packages/braviapsk/sony_bravia_psk.py", line 353, in get_command_code
    self._refresh_commands()
  File "/usr/local/lib/python3.10/site-packages/braviapsk/sony_bravia_psk.py", line 343, in _refresh_commands
    if not resp.get("error"):
AttributeError: 'NoneType' object has no attribute 'get'

My configuration.yaml is:

media_player:

  • platform: braviatv_psk
    host: 192.168.88.139
    psk: 1932
    mac: 30:F7:72:71:BC:59
    amp: True
    android: True
    sourcefilter:
    • ’ HD’
    • HDMI
      time_format: 24H
      user_labels: True
      name: BraviaTV

Official Sony bravia integration can launch TV, but cannot nothing more. Your integration can change channels and maybe launch apps like Plex. So I prefer your integration. Can you help me with this error?

Does the custom integration not work at all, or are you able to start apps for example?

Hi. Not sure what all this is about. I have a Bravia XR and I use the Sony Bravia TV integration. I just installed the custom tv:card from HACS and set this up:

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

Works like a charm.

(post deleted by author)