Automation Samsung TV Frame

I would like to create an automation so that when I pause the Samsung TV Frame, certain lights turn on.
When I test the automation, the lights work, but not the TV. I press pause, and it doesn’t do anything. And for example, if I go to HA, I can watch the media player, pause, and resume, meaning the TV responds. I don’t understand what I’m doing wrong, and I’m going crazy.
Sorry if what I’m asking is ridiculous, and thank you!

automation:

alias: Modo pausa
description: ""
triggers:
  - trigger: state
    entity_id:
      - media_player.samsung_the_frame_65
    from: playing
    to: paused
conditions: []
actions:
  - action: scene.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: scene.pausa
mode: single

scene:

id: "1743460415933"
name: Pausa
entities:
  switch.led_socket_1:
    device_class: switch
    icon: mdi:led-strip-variant
    friendly_name: Led
    state: "on"
  light.living:
    min_color_temp_kelvin: 2000
    max_color_temp_kelvin: 6535
    min_mireds: 153
    max_mireds: 500
    supported_color_modes:
      - color_temp
      - xy
    color_mode: color_temp
    brightness: 255
    color_temp_kelvin: 2257
    color_temp: 443
    hs_color:
      - 29.599
      - 82.123
    rgb_color:
      - 255
      - 149
      - 46
    xy_color:
      - 0.572
      - 0.389
    is_hue_group: true
    hue_scenes:
      - Concentración
      - Luz nocturna
      - Atenuado
      - Energía
      - Brillante
      - Relax
      - Lectura
    hue_type: room
    lights:
      - Living dos
      - Living uno
    entity_id:
      - light.living_uno
      - light.living_dos
    dynamics: false
    icon: mdi:lightbulb-group
    friendly_name: Living
    supported_features: 40
    state: "on"
  switch.luz_cocina_switch_1:
    device_class: switch
    icon: mdi:lightbulb
    friendly_name: Luz Cocina
    state: "on"
  media_player.samsung_the_frame_65:
    source_list:
      - TV
      - HDMI
    volume_level: 0.15
    is_volume_muted: true
    device_class: tv
    friendly_name: Samsung The Frame 65
    supported_features: 24509
    state: "on"
icon: mdi:movie
metadata: {}

Automations are debugged via traces. Please post yours.

Step details

Executed: April 1, 2025 at 4:10:46 PM
Result:
params:
  domain: scene
  service: turn_on
  service_data: {}
  target:
    entity_id:
      - scene.pausa
running_script: false

automation config

id: '1743460339993'
alias: Modo pausa
description: ''
triggers:
  - trigger: state
    entity_id:
      - media_player.samsung_the_frame_65
    from: playing
    to: paused
conditions: []
actions:
  - action: scene.turn_on
    metadata: {}
    data: {}
    target:
      entity_id: scene.pausa
mode: single

trace timeline

Triggered manually at April 1, 2025 at 4:10:46 PM

Scene 'Activate' on Pausa

(scene.pausa) turned 2025-04-01T19:10:46.393969+00:00

Finished at April 1, 2025 at 4:10:46 PM (runtime: 0.33 seconds)

Sorry for copying it, I’m not sure what the correct way is.

Thanks!!

Can you pause tv and run scene from ha? Just to see will it exec.

I activated it from “run action,” but now all it did was mute the video, not pause it.
If I do it manually (from the TV remote), it doesn’t do anything. Neither muting nor pausing activates the automation…The good thing is that the lights worked perfectly.

Triggered manually at April 1, 2025 at 5:39:52 PM
Scene 'Activate' on Pausa
(scene.pausa) turned 2025-04-01T20:39:52.198674+00:00
1 second later
(light.living) turned on
(light.lights_group) turned on
(switch.luz_cocina_switch_1) turned on
Finished at April 1, 2025 at 5:39:53 PM (runtime: 1.07 seconds)

Well try to debug it from there.
If is doesnt work the simplest thing to do is to delete this and write new scene.
But this time add one by one action. If first work add another and so on.
You will find eventually what is causing this.
And also your automation might not be triggering at you think it should.

The problem is the TV, because it doesn’t read the pause on the remote control or for example if I pause it with the HA, the automation doesn’t continue either, but if I press “run actions” it does continue and the lights turn on.

Which integrations are you using for the frame? Just the official samsung, or smartthings as well?

just the smartthings, do you recommend I use another app?

Well I can’t say for certain your results will be better, but you could try the native Samsung Smart TV integration which includes different sensors related to playback. Failing that, there is a few other “non-native” apps developed specifically for tcp/ip websocket connection to Samsungs. These are primarily local control vs Smarthings cloud control.

Offical Integration - Samsung Smart TV - Home Assistant
Nick Waterton’s Awesome samsung-tv-ws-api GitHub - NickWaterton/samsung-tv-ws-api: Samsung Smart TV WS API wrapper - This is what Im using to toggle art mode, and apply rotating art on a schedule.

These are the two I use for my 3 Samsung Frame Tv’s But there are more out there. Nicks samsung-tv-ws-api looks very powerful and might have what you are looking for. I’m just figuring it out myself.

When I was doing my research it seemed like the smartthings api was in a state of flux lately… features coming and going, as well as api tokens expiring prematurely. This could mean what you are looking for might not work today via smarthings, but tomorrow it could.

A final point, you may have already be aware of, but I have had ALOT of success troubleshooting HA, addons, integrations, and general problems via chatgpt. It’s pretty amazing. I tell it what I want to do, and the problems Im having and it will even suggest integrations and solutions I wasn’t even aware of. It’s debugging skills in terminal are impressive. One example, I could not figure out why my websocket commands were being rejected by the tv, and chat gpt figured out my ssh session couldn’t write the samsung authorization token that was issued by the tv to the correct directory due to a permissions issue.

Just suggestions.

1 Like