Hi,
I’m new to home assistant and yaml and I want to make a script that can clean shutdown a computer .
How can i make it so i can shutdown any computer?
shutdown_wksb001:
alias: Shutdown_WKSB001
sequence:
- condition: state
entity_id: binary_sensor.wksb001
state: 'on'
- service: hassio.addon_stdin
data:
addon: core_rpc_shutdown
input: WKSB001
- wait_for_trigger:
- platform: state
entity_id: binary_sensor.wksb001
from: 'on'
to: 'off'
- type: turn_off
device_id: 4a6745ad3ba438c024095f78d5a5a11b
entity_id: light.dn_desk_02_9653134f_on_off_4
domain: light
mode: single
icon: mdi:desktop-classic