1
0
ansible-home-assistant/configuration/automations/3d-printer-mini.yaml

130 lines
3.3 KiB
YAML

- 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
alias: '[Prusa MINI] button'
mode: single
trigger:
- device_id: e233cdffb05076ad7bb049581ffa8c9c
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
action:
- choose:
- conditions:
- condition: state
entity_id: switch.prusa_mini_switch
state: 'off'
sequence:
- service: switch.turn_on
target:
entity_id: switch.prusa_mini_switch
- conditions:
- condition: state
entity_id: switch.prusa_mini_switch
state: 'on'
- condition: state
entity_id: sensor.prusa_mini
state: idle
- condition: numeric_state
entity_id: sensor.prusa_mini_outlet_power
below: '10'
sequence:
- service: switch.turn_off
target:
entity_id:
- switch.prusa_mini_switch
- service: fan.turn_off
target:
entity_id: fan.esp_3dprinter_controller_mini_nevermore
- id: prusa_mini_door_open
alias: '[Prusa Mini] Door open'
mode: single
trigger:
- platform: state
entity_id:
- binary_sensor.prusa_mini_door_window_door_is_open
from: "off"
to: "on"
action:
- service: light.turn_on
target:
entity_id: light.prusa_mini_light_light
- id: prusa_mini_door_close
alias: '[Prusa Mini] Door close'
mode: single
trigger:
- platform: state
entity_id:
- binary_sensor.prusa_mini_door_window_door_is_open
from: "on"
to: "off"
action:
- service: light.turn_off
target:
entity_id: light.prusa_mini_light_light
- id: prusa_mini_notify
alias: '[Prusa Mini] Notify finished'
mode: single
trigger:
- platform: state
entity_id: sensor.prusa_mini
from: printing
to: idle
- platform: state
entity_id: sensor.prusa_mini
from: printing
to: finished
action:
- service: notify.mobile_app_iphone
data:
message: 3D printer has finished
title: Prusa Mini
data:
entity_id: camera.3d_printer
url: "/lovelace-tablet/3d-printer"
- id: prusa_mini_pause_notify
alias: '[Prusa Mini] Notify paused print'
mode: single
trigger:
- platform: state
entity_id: sensor.prusa_mini
from: printing
to: paused
action:
- service: notify.mobile_app_iphone
data:
title: Prusa Mini
message: 3D Print has been paused
data:
entity_id: camera.3d_printer
url: "/lovelace-tablet/3d-printer"