Rpc shutdown create automation

Hi,
I’ve installed the rcp shutdown addon and configure it and it’s working good. i create a switch in the configuration.yaml and it’s working.
i try to create automation to run the turn of the computer but i can’t find it in any options in the action.
what i need to choose in the action to run the rpc shutdown?

THX

Call service Home Assistant Supervisor: Write data to add-on stdin

i did that, but i only have the option to chose the RPC shutdown and not to tell which computer to shutdown

input: test-pc

Home Assistant configuration

Use the following inside Home Assistant service call to use it:

service: hassio.addon_stdin
data:
  addon: core_rpc_shutdown
  input: test-pc

Each line explained:

service: hassio.addon_stdin: Use hassio.addon_stdin service to send data over STDIN to an add-on. data.addon: core_rpc_shutdown: Tells the service to send the command to this add-on. data.input: test-pc: Alias name created for the computer in the add-on configuration, and shuts that one down.

/
Edit in YAML mode

i want to run it from automation and the picture above is what i can chose. i try to edit the automation in YAML but i get an error

description: ""
mode: single
trigger: []
condition: []
action:
  - service: hassio.addon_stdin
  data:
  addon: core_rpc_shutdown
  input: computername

this is the automation in YAML
and this is the error that i get when trying to save it

Message malformed: extra keys not allowed @ data[‘data’]

:thinking:

...
action:
  - service: hassio.addon_stdin
    data:
      addon: core_rpc_shutdown
      input: computername

it’s working now.
the problem was in the syntax spaces…

THX

another problem that i have with this scene automation is that i want it to run if the switch is on and time between X to Y turn off the computer and every time that the computer start between X to Y keep shutdown.
i’ve create the automation but in doesn’t work in the X to Y time frame at all. i runs good if i run the scene manual.
YAML CONFIG

# wake on lan & shutdown pc
wake_on_lan:
switch:
  - platform: wake_on_lan
    mac: B4:2E:99:AA:AA:AA
    name: yoni_computer_wol
    host: 192.168.254.199
    turn_off:
      service: hassio.addon_stdin
      data:
        addon: core_rpc_shutdown
        input: yoni-pc-shutdown

  - platform: wake_on_lan
    mac: B4:2E:99:AA:AA:AA
    name: itay_computer_wol
    host: 192.168.254.165
    turn_off:
      service: hassio.addon_stdin
      data:
        addon: core_rpc_shutdown
        input: itay-pc-shutdown

SCENE CONFIG

alias: "automation: Shut_down_Yoni_pc"
description: ""
trigger: []
condition:
  - condition: state
    entity_id: switch.yoni_computer_wol
    state: "on"
  - condition: and
    conditions:
      - condition: time
        after: "13:00:00"
        before: "18:00:00"
        weekday:
          - sun
          - mon
          - tue
          - wed
          - thu
          - fri
          - sat
action:
  - service: hassio.addon_stdin
    data:
      addon: core_rpc_shutdown
      input: yoni-pc-shutdown
mode: single

what is wrong in my scene that it doesn’t work as i need?

THX

Turn off like a standard (smart) switch

...
service: switch.turn_off
data: {}
target:
  entity_id: switch.yoni_computer_wol
...

/
My Computer switch:

ScreenShot_20230909122722
/
Example:

The trigger is set to execute the automation at 15:00 every day. The platform: time trigger is used for this purpose.
The condition ensures that the WOL switch is in the “on” state.
If both the trigger time and condition are met, the action will be executed to turn off the computer.

This automation will turn off the computer at 15:00 every day of the week if the WOL switch is on.

automation:
  - alias: "Shut_down_Yoni_pc"
    trigger:
      - platform: time
        at: "15:00:00"
    condition:
      - condition: state
        entity_id: switch.yoni_computer_wol
        state: "on"
    action:
      - service: switch.turn_off
        entity_id: switch.yoni_computer_wol

thanks for your help.
but why the time in between not running? do i must use the a trigger first?

this automation is not working while the current time in between is in and the switch is on, why?

alias: test auto
description: ""
trigger: []
condition:
  - condition: state
    entity_id: switch.yoni_computer_wol
    state: "on"
  - condition: and
    conditions:
      - condition: time
        after: "16:10:00"
        before: "16:40:00"
        weekday:
          - sun
          - mon
          - tue
          - wed
          - thu
          - fri
          - sat
action:
  - service: notify.mobile_app_avi_cellphone
    data:
      message: yoni switch is on

:+1: trigger: []

:point_down: