From a21718b318a1c39182fd5dfb1662dab177c2bcb0 Mon Sep 17 00:00:00 2001 From: "J.P. Krauss" Date: Mon, 16 May 2022 19:32:53 -0700 Subject: [PATCH] Update Lighting Automations --- packages/lighting/lighting.yaml | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/packages/lighting/lighting.yaml b/packages/lighting/lighting.yaml index c430cdb..fbb81c6 100644 --- a/packages/lighting/lighting.yaml +++ b/packages/lighting/lighting.yaml @@ -129,6 +129,44 @@ scene: # Lighting Scripts script: + # Set Dimmer "Off" Brightness + set_dimmer_off_brightness: + description: Set the Dimmer Brightness While Keeping Light Off + mode: queued + fields: + entity_id: + description: Light + selector: + entity: + domain: light + brightness: + description: Off Brightness + selector: + number: + min: 0 + max: 255 + sequence: + - choose: + - conditions: "{{ is_state(entity_id, 'off') }}" + sequence: + - service: light.turn_on + target: + entity_id: "{{ entity_id }}" + data: + brightness: "{{ brightness }}" + transition: 30 + - service: light.turn_off + target: + entity_id: "{{ entity_id }}" + + default: + sequence: + - service: light.turn_on + target: + entity_id: "{{ entity_id }}" + data: + brightness: "{{ brightness }}" + transition: 0 # Update Home Theater Lighting State ht_player_lighting_update: