How to setup shutdown of synology in configuration.yaml

Hi there
I just started playing around with Homeassistant on a pie 4 in docker.

I have figured out how to WOL my servers and to connect them to my homekit app.

I also found that I can shutdown my servers again with synology_dsm.shutdown.

Now this is where I run into trouble.
I have 2 NAS and I have gotten the shutdown to work but sporadically and rarely.
So I found it I would probably need the serial in the command to get it working.
Now I am compleatly new to linux. I have figured out that the umm …spacing? of the lines …how far in they are etc is important. But I cant figure out how and why this works.
Can someone give me some pointers on what I am doing wrong with the following? I have 2 NAS I want this to work on (Lets call them NAS 1 and NAS 2)

This is what I am trying with NAS 1
What am I doing wrong here?

I hope my question make sense :slight_smile: I am sorry if this question is answered elsewhere or is stupid, but I tried to google this before I posted with no luck

switch:
  - platform: wake_on_lan
    mac: XX:XX:XX:XX:XX:XX
    name: “NAS 1” 
    host: xxx.xxx.xxx.xxx
    turn_off:
    data:
    serial: XXXXXXX
    service: synology_dsm.shutdown"

Try-

switch:
  - platform: wake_on_lan
    mac: XX:XX:XX:XX:XX:XX
    name: “NAS 1” 
    host: xxx.xxx.xxx.xxx
    turn_off:
      service: synology_dsm.shutdown
1 Like

Yes I tried that. But the shutdown works inconsistently
So after looking at
Synology DSM - Home Assistant (home-assistant.io)

I tried setting in the serial (since I have 2 synologys to work with)
But it just gives me errors with the one I posted before. So my thinking is the …spaceing …how far in the lines are (sorry second language and not sure what to call it) might be the reason?

If anyone ever has the same challenge as me :slight_smile:
I seem to have gotten it working like this:

switch:
  - platform: wake_on_lan
    mac: XX:XX:XX:XX:XX:XX
    name: “NAS 1+” 
    host: XXX.XXX.XXX.XXX
    turn_off:
      service: synology_dsm.shutdown
      data:
        serial: XXXXXXX

Hi, I’ve just been working on setting up my NAS. I also managed to start it through VLAN thanks to the settings in the router, but I don’t understand what you mean by “Serial”. Is this a normal Synology serial number?