diff --git a/configuration/automations/3d-printer.yaml b/configuration/automations/3d-printer.yaml index 5f43c64..d3ebade 100644 --- a/configuration/automations/3d-printer.yaml +++ b/configuration/automations/3d-printer.yaml @@ -19,6 +19,32 @@ - service: light.turn_off entity_id: light.3d_printer_light +- 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.05 + condition: + - condition: state + entity_id: sensor.prusa_mk39 + state: printing + action: + - service: camera.snapshot + data: + filename: /config/www/cctv/3d_printer.jpg + target: + entity_id: camera.3d_printer + - service: notify.home_assistant + data: + message: "Prusa MK3.9 First Layer" + target: [ "1070521797688180796" ] + data: + images: + - "/config/www/cctv/3d_printer.jpg" + - id: 3dprinter_notify alias: '[3D Printer] Notify' mode: single