Schedule wake on lan

Hello all,

I’m new to HA and have read a great deal but can’t get the following to work. I’d really appreciate your help.

I have switches setup for Wake On Lan for several devices on my network. They work perfectly.

I am trying to setup an automation which would send a wake on lan to my desktop pc on Saturday at 01:00. I’ve used the GUI for automations and can see you can specify a time but no option for day or week etc.

I am using the following code in automations:

- id: '1584208711323'
  alias: Wake Desktop PC
  description: ''
  trigger:
  - at: 01:00
    platform: time
  condition:
    condition: time
    after: 00:00:00
    before: 23:59:00
    weekday:
    - sat
  action:
  - data: {}
    entity_id: switch.desktop_pc
    service: switch.turn_on

I manually added the date part as the GUI doesn’t allow. But it still doesn’t work so the coding must be wrong.

Thanks in advance.
Boyd

It might be some simple formatting issues, and also it seems the before/after conditions are not necessary. Try this:

- id: '1584208711323'
  alias: Wake Desktop PC
  description: ''
  trigger:
  - platform: time
    at: "01:00:00"
  condition:
    condition: time
    weekday:
    - sat
  action:
  - data: {}
    entity_id: switch.desktop_pc
    service: switch.turn_on

That worked! Thank you so much :slight_smile:
Boyd