1
0

Fix & updaate 3d printer automations

This commit is contained in:
Przemek Grondek 2024-07-31 20:15:40 +02:00
parent 13a71fe62b
commit 449f9e6f14
2 changed files with 36 additions and 44 deletions

View File

@ -1,3 +1,29 @@
- id: prusa_mini_nevermore_on
alias: '[Prusa MINI] Nevermore on'
mode: single
trigger:
- platform: state
entity_id:
- sensor.prusa_mini
to: printing
action:
- service: fan.turn_on
target:
entity_id: fan.esp_3dprinter_controller_mini_nevermore
- id: prusa_mini_nevermore_off
alias: '[Prusa MINI] Nevermore off'
mode: single
trigger:
- platform: state
entity_id:
- switch.prusa_mini_switch
to: 'off'
action:
- service: fan.turn_on
target:
entity_id: fan.esp_3dprinter_controller_mini_nevermore
- id: prusa_mini_button - id: prusa_mini_button
alias: '[Prusa MINI] button' alias: '[Prusa MINI] button'
mode: single mode: single
@ -32,6 +58,9 @@
target: target:
entity_id: entity_id:
- switch.prusa_mini_switch - switch.prusa_mini_switch
- service: fan.turn_off
target:
entity_id: fan.esp_3dprinter_controller_mini_nevermore
- id: prusa_mini_door_open - id: prusa_mini_door_open
alias: '[Prusa Mini] Door open' alias: '[Prusa Mini] Door open'
@ -66,11 +95,11 @@
mode: single mode: single
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.prusamini entity_id: sensor.prusa_mini
from: printing from: printing
to: idle to: idle
- platform: state - platform: state
entity_id: sensor.prusamini entity_id: sensor.prusa_mini
from: printing from: printing
to: finished to: finished
action: action:
@ -79,6 +108,7 @@
message: 3D printer has finished message: 3D printer has finished
title: Prusa Mini title: Prusa Mini
data: data:
entity_id: camera.3d_printer
url: "/lovelace-tablet/3d-printer" url: "/lovelace-tablet/3d-printer"
- id: prusa_mini_pause_notify - id: prusa_mini_pause_notify
@ -86,7 +116,7 @@
mode: single mode: single
trigger: trigger:
- platform: state - platform: state
entity_id: sensor.prusamini entity_id: sensor.prusa_mini
from: printing from: printing
to: paused to: paused
action: action:
@ -95,4 +125,5 @@
title: Prusa Mini title: Prusa Mini
message: 3D Print has been paused message: 3D Print has been paused
data: data:
entity_id: camera.3d_printer
url: "/lovelace-tablet/3d-printer" url: "/lovelace-tablet/3d-printer"

View File

@ -26,32 +26,9 @@
- fan.esp_3dprinter_controller_mk4_exhaust - fan.esp_3dprinter_controller_mk4_exhaust
- service: light.turn_off - service: light.turn_off
entity_id: light.3d_printer_light entity_id: light.3d_printer_light
- service: fan.turn_off
- id: prusa_mk39_first_layer
alias: '[Prusa MK3.9] First layer'
mode: single
trigger:
- platform: numeric_state
entity_id:
- sensor.prusa_mk39_z_height
above: 0.25
condition:
- condition: state
entity_id: sensor.prusa_mk39
state: printing
action:
- service: camera.snapshot
data:
filename: /config/www/cctv/3d_printer.jpg
target: target:
entity_id: camera.3d_printer entity_id: fan.esp_3dprinter_controller_mk4_nevermore
- service: notify.home_assistant
data:
message: "Prusa MK3.9 First Layer"
target: [ "1070521797688180796" ]
data:
images:
- "/config/www/cctv/3d_printer.jpg"
- id: prusa_mk39_notify_finished - id: prusa_mk39_notify_finished
alias: '[Prusa MK3.9] Notify Finished' alias: '[Prusa MK3.9] Notify Finished'
@ -154,26 +131,10 @@
entity_id: entity_id:
- sensor.prusa_mk39 - sensor.prusa_mk39
to: printing to: printing
condition:
- condition: or
conditions:
- condition: state
entity_id: sensor.prusa_mk39_material
state: ABS
- condition: state
entity_id: sensor.prusa_mk39_material
state: ASA
- condition: state
entity_id: sensor.prusa_mk39_material
state: PC
- condition: state
entity_id: sensor.prusa_mk39_material
state: PCTG
action: action:
- service: fan.turn_on - service: fan.turn_on
target: target:
entity_id: fan.esp_3dprinter_controller_mk4_nevermore entity_id: fan.esp_3dprinter_controller_mk4_nevermore
data:
- id: prusa_mk39_fan_off - id: prusa_mk39_fan_off
alias: '[Prusa MK3.9] Fan off' alias: '[Prusa MK3.9] Fan off'