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

132 lines
3.4 KiB
YAML
Raw Normal View History

2021-01-11 23:54:15 +00:00
- id: 3dprinter-off
alias: '[3D Printer] Turn off'
mode: single
trigger:
2022-04-02 14:43:24 +00:00
- platform: numeric_state
entity_id: sensor.3d_printer_electric_consumption_w
2021-04-12 15:32:28 +00:00
below: 30
2022-04-02 14:43:24 +00:00
for: '00:30:00'
2021-01-11 23:54:15 +00:00
condition:
- condition: state
entity_id: binary_sensor.octoprint_printing
state: 'off'
action:
- service: switch.turn_off
2021-10-14 23:16:41 +00:00
target:
entity_id:
- switch.3d_printer
- switch.3d_printer_enclosure_fan_on_off
2021-10-08 08:27:01 +00:00
- service: light.turn_off
entity_id: light.3d_printer_light
2021-05-10 10:24:31 +00:00
- id: 3dprinter-on
alias: '[3D Printer] Turn on'
mode: single
trigger:
- platform: state
2021-10-14 23:16:41 +00:00
entity_id: switch.3d_printer
to: 'on'
for: '00:00:05'
action:
- service: rest_command.octoprint_connect
2021-05-18 07:37:48 +00:00
2021-09-22 00:10:18 +00:00
- id: 3dprinter-notify
alias: '[3D Printer] Notify'
mode: single
trigger:
- platform: state
entity_id: sensor.octoprint_job_percentage
to: '100.0'
action:
2022-04-15 22:58:46 +00:00
- service: notify.mobile_app_iphone_pg
2021-09-22 00:10:18 +00:00
data:
message: 3D printer has finished
2021-05-18 07:37:48 +00:00
- id: 3dprinter-button
alias: '[3D Printer] button'
mode: single
trigger:
- device_id: a2ac0fa69738b8e7c5c1b8b8bcf8cdc2
domain: zha
platform: device
type: remote_button_short_press
subtype: remote_button_short_press
action:
- choose:
- conditions:
- condition: state
2021-10-14 23:16:41 +00:00
entity_id: switch.3d_printer
2021-05-18 07:37:48 +00:00
state: 'off'
sequence:
- service: switch.turn_on
target:
2021-10-14 23:16:41 +00:00
entity_id: switch.3d_printer
2021-10-08 08:27:01 +00:00
- service: light.turn_on
entity_id: light.3d_printer_light
2021-05-18 07:37:48 +00:00
- conditions:
- condition: state
2021-10-14 23:16:41 +00:00
entity_id: switch.3d_printer
2021-05-18 07:37:48 +00:00
state: 'on'
- condition: state
entity_id: binary_sensor.octoprint_printing
state: 'off'
- condition: numeric_state
entity_id: sensor.3d_printer_electric_consumption_w
2021-05-18 07:37:48 +00:00
below: '30'
sequence:
- service: switch.turn_off
target:
2021-10-14 23:16:41 +00:00
entity_id:
- switch.3d_printer
- switch.3d_printer_enclosure_fan_on_off
2021-10-08 08:27:01 +00:00
- service: light.turn_off
entity_id: light.3d_printer_light
2021-09-28 22:55:05 +00:00
- id: 3dprinter-schedule
alias: '[3D Printer] Schedule turn on'
description: ''
mode: single
trigger:
- platform: time
at: '08:00:00'
action:
- service: switch.turn_on
target:
entity_id:
2021-10-14 23:16:41 +00:00
- switch.3d_printer
2021-09-28 22:55:05 +00:00
- switch.3d_printer_enclosure_fan_on_off
2021-10-08 08:27:01 +00:00
- service: light.turn_off
entity_id: light.3d_printer_light
- id: 3dprinter-fan-on
alias: '[3D Printer] Fan on'
mode: single
trigger:
- platform: state
entity_id:
- binary_sensor.octoprint_printing
condition:
- condition: numeric_state
entity_id: sensor.octoprint_target_bed_temp
below: '100'
action:
- service: switch.turn_on
target:
entity_id: switch.3d_printer_enclosure_fan_on_off
- id: 3dprinter-fan-off
alias: '[3D Printer] Fan off'
mode: single
trigger:
- platform: state
entity_id:
- binary_sensor.octoprint_printing
condition:
- condition: numeric_state
entity_id: sensor.octoprint_target_bed_temp
above: '99'
action:
- service: switch.turn_off
target:
entity_id: switch.3d_printer_enclosure_fan_on_off