ollo69 / ha-samsungtv-smart

📺 Home Assistant SamsungTV Smart Component with simplified SmartThings API Support configurable from User Interface.
Apache License 2.0
464 stars 59 forks source link

direct Key filmmaker mode #333

Open MorreMor opened 4 weeks ago

MorreMor commented 4 weeks ago

is there a way for direct key for filmmaker mode?

bigdogevan commented 2 weeks ago

I was using the action SamsungTV Smart: Select Picture Mode but for some reason it stopped working for me.

I discovered this workaround today which might help you depending on your situation. Add this to your config.yaml, replacing the device ID and Smartthings token.

rest_command:
  set_tv_picture_mode:
    url: "https://api.smartthings.com/v1/devices/{{ device_id }}/commands"
    method: POST
    headers:
      Authorization: "Bearer YOUR_PERSONAL_ACCESS_TOKEN"  # Replace with your PAT
      Content-Type: "application/json"
    payload: >
      {
        "commands": [
          {
            "component": "main",
            "capability": "custom.picturemode",
            "command": "setPictureMode",
            "arguments": ["{{ mode }}"]
          }
        ]
      }

This gives you a restful command that you can call however you like, with a tap action on a button or make it into a script etc. To test go to developer tools > actions and enter the yaml


action: rest_command.set_tv_picture_mode
data:
  device_id: your_device_id_goes_here
  mode: FILMMAKER MODE

Note: I have not specifically tested with FILMMAKER MODE but for me it works with Natural and Standard which are the only modes I use.