From 426697fc236b64775de2412b1f317fb568600da2 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Sun, 7 Aug 2022 00:40:27 +0200 Subject: [PATCH] 3D Printer auto enable/disable enclosure fan --- configuration/automations/3d-printer.yaml | 32 +++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/configuration/automations/3d-printer.yaml b/configuration/automations/3d-printer.yaml index 5721086..ca8ea5a 100644 --- a/configuration/automations/3d-printer.yaml +++ b/configuration/automations/3d-printer.yaml @@ -97,3 +97,35 @@ - switch.3d_printer_enclosure_fan_on_off - 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