#Need help understanding automation modes (3d printer auto shut off)

1 messages · Page 1 of 1 (latest)

pseudo mauve
#

I want to turn off my 3d printer 20 minutes after a print has stopped, but not if I start a new print.

description: ""
triggers:
  - type: turned_off
    device_id: 
    entity_id: 
    domain: binary_sensor
    trigger: device
    for:
      hours: 0
      minutes: 20
      seconds: 0
conditions:
  - condition: not
    conditions:
      - type: is_on
        condition: device
        device_id: 
        entity_id: 
        domain: binary_sensor
actions:
  - type: turn_off
    device_id: 
    entity_id: 
    domain: light
mode: single

this is what it looks like now. Is this mode correct?

#

i assume because the trigger never triggered, it doesn't matter?

uncut coral
#

You might need to look and see what entities are available for your printer. For example, my sensor.k1_max_current_print_state has the possible states of "standby, printing, paused, complete, cancelled, error". I would target that entity's state change and duration.

#

Probably something more along the lines of this: ```yaml
description: ""
mode: single
triggers:

  • trigger: state
    entity_id:
    • sensor.k1_max_printer_state
      from: printing
      to: complete
      for:
      hours: 0
      minutes: 20
      seconds: 0
      conditions: []
      actions:
  • action: button.press
    metadata: {}
    data: {}
    target:
    entity_id: button.k1_max_host_shutdown
#

You could use a condition, if you wanted, to only run if you're not home. ```yaml
conditions:

  • condition: state
    entity_id: person.derek
    state: not_home
pseudo mauve
#

That also came to my mind. Are states case sensitive? And any way to see a list of possible states? Thank you.