Skip to content

Instantly share code, notes, and snippets.

@rootiest
Created May 12, 2022 03:22
Show Gist options
  • Save rootiest/4491ff4f0ea3773b5de51d6af42bdd21 to your computer and use it in GitHub Desktop.
Save rootiest/4491ff4f0ea3773b5de51d6af42bdd21 to your computer and use it in GitHub Desktop.
[delayed_gcode delayed_printer_off]
initial_duration: 600
gcode:
{% if printer.idle_timeout.state == "Idle" %}
M117 Shutdown
WLED_OFF
POWEROFF
{% endif %}
[gcode_macro POWEROFF]
variable_value: 1
gcode:
M117 Shutdown
SET_DISPLAY_GROUP GROUP=_blank
WLED_OFF
{action_call_remote_method("set_device_power",
device="Lighting",
state="off")}
{action_call_remote_method("set_device_power",
device="Filter",
state="off")}
UPDATE_DELAYED_GCODE ID=turn_off DURATION=5
[delayed_gcode turn_off]
gcode:
{action_call_remote_method("set_device_power",
device="Printer",
state="off")}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment