Confort light WIP
This commit is contained in:
@@ -181,3 +181,11 @@
|
|||||||
entity_id: ef6706dbe425caf09693c084182ec228
|
entity_id: ef6706dbe425caf09693c084182ec228
|
||||||
domain: light
|
domain: light
|
||||||
mode: single
|
mode: single
|
||||||
|
- id: '1736805701473'
|
||||||
|
alias: P1confort-light
|
||||||
|
description: ''
|
||||||
|
use_blueprint:
|
||||||
|
path: homeassistant/confort_light.yaml
|
||||||
|
input:
|
||||||
|
light_target:
|
||||||
|
device_id: e0397b54f1c2d1514be403e2996ca368
|
||||||
|
|||||||
61
blueprints/automation/homeassistant/confort_light.yaml
Normal file
61
blueprints/automation/homeassistant/confort_light.yaml
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
blueprint:
|
||||||
|
name: confort_light_manage
|
||||||
|
description: Comfort light to switch on lights at a certain time
|
||||||
|
domain: automation
|
||||||
|
# source_url: https://github.com/home-assistant/core/blob/dev/homeassistant/components/automation/blueprints/motion_light.yaml
|
||||||
|
author: Tiziano Trabattoni
|
||||||
|
input:
|
||||||
|
light_target:
|
||||||
|
name: Light
|
||||||
|
selector:
|
||||||
|
target:
|
||||||
|
entity:
|
||||||
|
domain: light
|
||||||
|
|
||||||
|
# trigger_variables:
|
||||||
|
# use_sun: !input sun_condition
|
||||||
|
|
||||||
|
triggers:
|
||||||
|
- trigger: time
|
||||||
|
at: input_datetime.dont_disturb_nighttime_to
|
||||||
|
id: p1-confort-light-off
|
||||||
|
- trigger: sun
|
||||||
|
event: sunset
|
||||||
|
offset: 00:30:00
|
||||||
|
id: p1-confort-light-on
|
||||||
|
|
||||||
|
conditions: []
|
||||||
|
|
||||||
|
actions:
|
||||||
|
- choose:
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- p1-confort-light-on
|
||||||
|
sequence:
|
||||||
|
- 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
|
||||||
|
|
||||||
|
- conditions:
|
||||||
|
- condition: trigger
|
||||||
|
id:
|
||||||
|
- p1-confort-light-off
|
||||||
|
sequence:
|
||||||
|
- action: light.turn_off
|
||||||
|
target: !input light_target
|
||||||
|
|
||||||
|
mode: single
|
||||||
Reference in New Issue
Block a user