From 4fc7e16c8be71290cb15cd65654a81f8688db1f2 Mon Sep 17 00:00:00 2001 From: Tony Stork Date: Sun, 14 Jan 2024 19:22:03 -0500 Subject: [PATCH] Move adjustments for stairwell LED strip to Node-RED --- automations.yaml | 19 ------------------- scripts.yaml | 37 ------------------------------------- 2 files changed, 56 deletions(-) diff --git a/automations.yaml b/automations.yaml index 350b453..a490bb6 100644 --- a/automations.yaml +++ b/automations.yaml @@ -4518,22 +4518,3 @@ value_template: '{{ is_state(sensor,''off'') }}' mode: parallel max: 5 -- id: '1704743623656' - alias: Stairwell LED Strip - description: Run stairwell LED strip script automatically when the strip is turned - on - trigger: - - platform: state - entity_id: - - light.stairwell_led_strip - from: 'off' - to: 'on' - id: light-on - alias: When stairwell LED strip turns on - condition: [] - action: - - service: script.stairwell_led_strip - metadata: {} - data: {} - alias: Run stairwell LED strip script - mode: restart diff --git a/scripts.yaml b/scripts.yaml index 3ce24e8..276e596 100644 --- a/scripts.yaml +++ b/scripts.yaml @@ -870,43 +870,6 @@ basement_shutdown: alias: Cancel the door timer since the lights are already off mode: restart icon: mdi:power -stairwell_led_strip: - alias: Stairwell LED Strip - sequence: - - variables: - brt1: 50 - brt2: 100 - brt3: 150 - brtmax: 255 - colortemp: "{% if is_state('input_boolean.goodnight','off') and\n is_state('input_boolean.give_me_darkness','off') - and\n is_state('binary_sensor.early_night_mode','off')\n%}\n 4000\n{% - else %}\n 2000\n{% endif %}\n" - - alias: Reset or apply proper settings - if: - - condition: template - value_template: '{{ brightness == ''reset'' }}' - alias: If this is a reset - then: - - service: light.turn_on - target: - entity_id: light.stairwell_led_strip - data: - brightness: "{% if is_state('input_boolean.goodnight','on') %}\n {{ brt1 - }}\n{% elif is_state('input_boolean.give_me_darkness','on') %}\n {{ brt2 - }}\n{% elif is_state('binary_sensor.early_night_mode','on') %}\n {{ brt3 - }}\n{% else %}\n {{ brtmax }}\n{% endif %}\n" - color_temp_kelvin: '{{ colortemp }}' - alias: Set brightness and colortemp - else: - - service: light.turn_on - target: - entity_id: light.stairwell_led_strip - data: - brightness: '{{ brightness|default(brt3) }}' - color_temp_kelvin: '{{ color_temp_kelvin|default(colortemp) }}' - description: This script handles a few settings for the stairwell LED strip, for - convenience - mode: restart adaptive_on_first_floor: alias: Adaptive on First Floor sequence: