automations.yaml
This commit is contained in:
+113
-13
@@ -3457,22 +3457,23 @@
|
||||
mode: restart
|
||||
- id: '1786107704090'
|
||||
alias: Count OctoPrint Print Outcomes
|
||||
description: Increments counter.octoprint_successful_prints on PrintDone and counter.octoprint_failed_prints
|
||||
on PrintFailed/PrintCancelled, triggered by sensor.octoprint_last_event state
|
||||
changes.
|
||||
description: Legacy alias retained for entity stability. Increments the existing
|
||||
print counters for SparkX i7 completed, stopped, and error states.
|
||||
triggers:
|
||||
- trigger: state
|
||||
entity_id: sensor.octoprint_last_event
|
||||
to: PrintDone
|
||||
- entity_id: sensor.sparkx_i7_print_status
|
||||
from: printing
|
||||
id: done
|
||||
- trigger: state
|
||||
entity_id: sensor.octoprint_last_event
|
||||
to: PrintFailed
|
||||
id: failed
|
||||
- trigger: state
|
||||
entity_id: sensor.octoprint_last_event
|
||||
to: PrintCancelled
|
||||
to: completed
|
||||
trigger: state
|
||||
- entity_id: sensor.sparkx_i7_print_status
|
||||
from:
|
||||
- printing
|
||||
- paused
|
||||
id: failed
|
||||
to:
|
||||
- stopped
|
||||
- error
|
||||
trigger: state
|
||||
actions:
|
||||
- choose:
|
||||
- conditions:
|
||||
@@ -4005,3 +4006,102 @@
|
||||
entity_id: button.octoprint_cancel_print
|
||||
- delay: 00:00:05
|
||||
- action: rest_command.octoprint_park_nozzle
|
||||
- id: sparkx_i7_running_sync
|
||||
alias: 3D Printer Running - SparkX i7 Status Sync
|
||||
description: Mirrors the SparkX i7 print lifecycle into the existing 3D printer
|
||||
running helper without retriggering the helper when it is already in the desired
|
||||
state.
|
||||
triggers:
|
||||
- entity_id: sensor.sparkx_i7_print_status
|
||||
from:
|
||||
- idle
|
||||
- self-testing
|
||||
- completed
|
||||
- stopped
|
||||
- error
|
||||
- processing
|
||||
- unknown
|
||||
- 'off'
|
||||
id: print_started
|
||||
to: printing
|
||||
trigger: state
|
||||
- entity_id: sensor.sparkx_i7_print_status
|
||||
from:
|
||||
- printing
|
||||
- paused
|
||||
id: print_stopped
|
||||
to:
|
||||
- completed
|
||||
- stopped
|
||||
- error
|
||||
- idle
|
||||
- processing
|
||||
- self-testing
|
||||
- 'off'
|
||||
- unknown
|
||||
trigger: state
|
||||
- event: start
|
||||
id: ha_start
|
||||
trigger: homeassistant
|
||||
conditions: []
|
||||
actions:
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: print_started
|
||||
sequence:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.3d_printer_running
|
||||
state: 'off'
|
||||
then:
|
||||
- action: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.3d_printer_running
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: print_stopped
|
||||
sequence:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.3d_printer_running
|
||||
state: 'on'
|
||||
then:
|
||||
- action: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.3d_printer_running
|
||||
- conditions:
|
||||
- condition: trigger
|
||||
id: ha_start
|
||||
sequence:
|
||||
- delay:
|
||||
seconds: 20
|
||||
- choose:
|
||||
- conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.sparkx_i7_print_status
|
||||
state: printing
|
||||
sequence:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.3d_printer_running
|
||||
state: 'off'
|
||||
then:
|
||||
- action: input_boolean.turn_on
|
||||
target:
|
||||
entity_id: input_boolean.3d_printer_running
|
||||
- conditions:
|
||||
- condition: template
|
||||
value_template: '{{ states(''sensor.sparkx_i7_print_status'') in [''completed'',
|
||||
''stopped'', ''error'', ''idle'', ''processing'', ''self-testing'',
|
||||
''off'', ''unknown''] }}'
|
||||
sequence:
|
||||
- if:
|
||||
- condition: state
|
||||
entity_id: input_boolean.3d_printer_running
|
||||
state: 'on'
|
||||
then:
|
||||
- action: input_boolean.turn_off
|
||||
target:
|
||||
entity_id: input_boolean.3d_printer_running
|
||||
mode: single
|
||||
|
||||
Reference in New Issue
Block a user