From 8b8a6f07aab0603d10cc64f4de0e543aa5ad316c Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Thu, 28 Apr 2022 18:56:24 +0200 Subject: [PATCH] Turn off 3d printer light when timelapse is not running --- configuration/configuration.yaml | 3 +++ scripts/10.modes.yaml | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/configuration/configuration.yaml b/configuration/configuration.yaml index 5e857ab..1a93159 100644 --- a/configuration/configuration.yaml +++ b/configuration/configuration.yaml @@ -19,6 +19,9 @@ http: login_attempts_threshold: 5 image: input_boolean: + 3d_printer_timelapse: + name: "3D printer timelapse" + icon: "mdi:camera-burst" input_datetime: input_number: input_select: diff --git a/scripts/10.modes.yaml b/scripts/10.modes.yaml index 9c82de1..c023358 100644 --- a/scripts/10.modes.yaml +++ b/scripts/10.modes.yaml @@ -25,6 +25,15 @@ good_night: - light.hallway_lightstrip - light.balcony - light.table_lamp_lights + - choose: + - conditions: + - condition: state + entity_id: input_boolean.3d_printer_timelapse + state: 'off' + sequence: + - service: light.turn_off + entity_id: + - light.3d_printer_light - service: switch.turn_off entity_id: - switch.printer_switch @@ -100,6 +109,15 @@ leave_home: - light.hallway_lightstrip - light.balcony - light.table_lamp_lights + - choose: + - conditions: + - condition: state + entity_id: input_boolean.3d_printer_timelapse + state: 'off' + sequence: + - service: light.turn_off + entity_id: + - light.3d_printer_light - service: switch.turn_on entity_id: - switch.kitchen_camera_outlet_on_off