Before new templates for comfort light e Luce Taverna Garage backups

This commit is contained in:
2025-01-13 21:32:19 +01:00
parent 8e77bd2fd4
commit cd4d3a101b
3 changed files with 111 additions and 11 deletions

View File

@@ -41,6 +41,14 @@ blueprint:
default: on
selector:
boolean:
dont_disturb_condition:
name: dont_disturb_light_control
description: Controls if lamp brightness has to be reduced to not disturb
default: on
selector:
boolean:
no_motion_wait:
name: Wait time
description: Time to leave the light on after last motion is detected.
@@ -53,6 +61,7 @@ blueprint:
trigger_variables:
use_sun: !input sun_condition
# use_dont_disturb: !input dont_disturb_nighttime
triggers:
- trigger: state
@@ -100,11 +109,22 @@ actions:
id:
- motion-detected
then:
- action: light.turn_on
target: !input light_target
data:
brightness_pct: 100
color_temp_kelvin: 2700
- if:
- condition: template
# value_template: "{{ use_dont_disturb }}"
value_template: "{{ dont_disturb_nighttime }}"
then:
- action: light.turn_on
target: !input light_target
data:
brightness_pct: states('dont_disturb_light_brightness')
color_temp_kelvin: 2700
else:
- action: light.turn_on
target: !input light_target
data:
brightness_pct: 100
color_temp_kelvin: 2700
else:
- action: light.turn_off
@@ -120,15 +140,26 @@ actions:
id:
- motion-detected
then:
- action: light.turn_on
target: !input light_target
data:
brightness_pct: 100
color_temp_kelvin: 2700
- if:
- condition: template
value_template: "{{ use_dont_disturb }}"
then:
- action: light.turn_on
target: !input light_target
data:
brightness_pct: states('dont_disturb_light_brightness')
color_temp_kelvin: 2700
else:
- action: light.turn_on
target: !input light_target
data:
brightness_pct: 100
color_temp_kelvin: 2700
else:
- action: light.turn_off
target: !input light_target
data: {}
data:
transition: 10
mode: single