automations.yaml
This commit is contained in:
+113
-13
@@ -3457,22 +3457,23 @@
|
|||||||
mode: restart
|
mode: restart
|
||||||
- id: '1786107704090'
|
- id: '1786107704090'
|
||||||
alias: Count OctoPrint Print Outcomes
|
alias: Count OctoPrint Print Outcomes
|
||||||
description: Increments counter.octoprint_successful_prints on PrintDone and counter.octoprint_failed_prints
|
description: Legacy alias retained for entity stability. Increments the existing
|
||||||
on PrintFailed/PrintCancelled, triggered by sensor.octoprint_last_event state
|
print counters for SparkX i7 completed, stopped, and error states.
|
||||||
changes.
|
|
||||||
triggers:
|
triggers:
|
||||||
- trigger: state
|
- entity_id: sensor.sparkx_i7_print_status
|
||||||
entity_id: sensor.octoprint_last_event
|
from: printing
|
||||||
to: PrintDone
|
|
||||||
id: done
|
id: done
|
||||||
- trigger: state
|
to: completed
|
||||||
entity_id: sensor.octoprint_last_event
|
trigger: state
|
||||||
to: PrintFailed
|
- entity_id: sensor.sparkx_i7_print_status
|
||||||
id: failed
|
from:
|
||||||
- trigger: state
|
- printing
|
||||||
entity_id: sensor.octoprint_last_event
|
- paused
|
||||||
to: PrintCancelled
|
|
||||||
id: failed
|
id: failed
|
||||||
|
to:
|
||||||
|
- stopped
|
||||||
|
- error
|
||||||
|
trigger: state
|
||||||
actions:
|
actions:
|
||||||
- choose:
|
- choose:
|
||||||
- conditions:
|
- conditions:
|
||||||
@@ -4005,3 +4006,102 @@
|
|||||||
entity_id: button.octoprint_cancel_print
|
entity_id: button.octoprint_cancel_print
|
||||||
- delay: 00:00:05
|
- delay: 00:00:05
|
||||||
- action: rest_command.octoprint_park_nozzle
|
- 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