Rest Command / Curl / LG TV wake on lan

Hi, I’d appreciate if someone could help me. Thanks.
I’d like to switch on / off my LG TV with either WOL, Rest Command or Curl in an automation.
Homeassistant is running on a dedicated Intel Nuc on VLAN 192.168.20.xxx. LG TV on another VLAN 192.168.40.xxx.
In the config.yaml im having the following rest command specified:

  rest_command:
    wake_device:
      url: 'https://opnsense/api/wol/wol/set'
      method: POST
      payload: '{"wake":{"interface": "opt4","mac": "ac:5a:f0:e3:0b:00}}'
      content_type: 'application/json'
      username: xxxx
      password: yyyy
      verify_ssl: false

With the rest command I’m calling the WOL Api from opnsense. I’m getting the following error when executing the rest command in an automation,

Führe die Aktion „rest_command.wake_device” aus
Ausgeführt: 23. Mai 2025 um 11:39:12
Ergebnis:
params:
domain: rest_command
service: wake_device
service_data: {}
target: {}
running_script: false

but there are no blockings in the firewall but consequently LT TV isn’t switching on.
Running the following curl commands in the home assistant terminal it works perfectly:

curl -k https://opnsense/api/wol/wol/set \
-u "xxxx/":"yyyy"
-H "Content-Type: application/json" \
-d '{"wake":{"interface": "opt4","mac": "ac:5a:f0:e3:0b:00"}}'

What I understand, it’s basically the same …
I’m not a dev or coder but I’d appreciate if someone could help me to get my LGTV on with an automation.

Could it be that you missed a double quote mark?

      payload: '{"wake":{"interface": "opt4","mac": "ac:5a:f0:e3:0b:00"}}'

You are the man :+1: …that’s it! Thank you very much! The remarkable thing is, that there were no errors or errors in the logs. Anyhow, thank you

Great!
Yeah, I have been there as well at times.
Sometimes it can take me several hours of frustration to find such small typing mistakes.

Can you please mark the post as answered?