1
0

Change lights automations

Merge with white temperature automations
This commit is contained in:
pgrondek 2021-05-25 14:33:35 +02:00
parent 92bf8c23e2
commit 2af639deb4
8 changed files with 248 additions and 125 deletions

View File

@ -36,7 +36,6 @@
data: data:
brightness_pct: 100 brightness_pct: 100
kelvin: 3200 kelvin: 3200
- choose:
- conditions: - conditions:
- condition: state - condition: state
entity_id: input_select.home_mode entity_id: input_select.home_mode
@ -66,7 +65,7 @@
condition: condition:
- condition: state - condition: state
entity_id: binary_sensor.bathroom_motion_occupancy entity_id: binary_sensor.bathroom_motion_occupancy
for: '0:02:00' for: '0:05:00'
state: 'off' state: 'off'
- condition: state - condition: state
entity_id: binary_sensor.shower_motion entity_id: binary_sensor.shower_motion

View File

@ -14,11 +14,27 @@
entity_id: input_select.home_mode entity_id: input_select.home_mode
state: Day state: Day
action: action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on - service: light.turn_on
entity_id: light.bedroom_lights entity_id: light.bedroom_lights
data: data:
brightness_pct: 60 brightness_pct: 60
kelvin: 2000 kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.toggle
entity_id: light.bedroom_lights
data:
brightness_pct: 60
kelvin: 3200
- id: bedroom-motion-off - id: bedroom-motion-off
alias: '[Bedroom] Motion Off' alias: '[Bedroom] Motion Off'

View File

@ -7,9 +7,27 @@
type: remote_button_short_press type: remote_button_short_press
subtype: turn_on subtype: turn_on
action: action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on - service: light.turn_on
data:
entity_id: light.desk_lightbar entity_id: light.desk_lightbar
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.toggle
entity_id: light.desk_lightbar
data:
brightness_pct: 100
kelvin: 3200
mode: single mode: single
- id: button-computer-cave-off - id: button-computer-cave-off
@ -35,9 +53,27 @@
device_id: 5b972523e427721ec88e095994f7cc16 device_id: 5b972523e427721ec88e095994f7cc16
command: move_with_on_off command: move_with_on_off
action: action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on - service: light.turn_on
data:
entity_id: light.tv_lights entity_id: light.tv_lights
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.toggle
entity_id: light.tv_lights
data:
brightness_pct: 100
kelvin: 3200
mode: single mode: single
- id: button-computer-cave-hold-off - id: button-computer-cave-hold-off

View File

@ -1,35 +1,44 @@
- id: hallway-motion-day - id: hallway-lightstrip-on
alias: '[Hallway] Motion Day' alias: '[Hallway] Lights strip on'
mode: restart mode: restart
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.hallway_motion_sensor entity_id: binary_sensor.hallway_motion_sensor
from: 'off' from: 'off'
to: 'on' to: 'on'
condition: action:
- choose:
- conditions:
- condition: state - condition: state
entity_id: input_select.home_mode entity_id: input_select.home_mode
state: Day state: Day
action: sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on - service: light.turn_on
entity_id: light.hallway_lightstrip
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.toggle
entity_id: light.hallway_lightstrip entity_id: light.hallway_lightstrip
data: data:
brightness_pct: 100 brightness_pct: 100
kelvin: 3200 kelvin: 3200
- conditions:
- id: hallway-motion-night
alias: '[Hallway] Motion Night'
mode: restart
trigger:
- platform: state
entity_id: binary_sensor.hallway_motion_sensor
from: 'off'
to: 'on'
condition:
- condition: state - condition: state
entity_id: input_select.home_mode entity_id: input_select.home_mode
state: Night state: Night
action: sequence:
- service: light.turn_on - service: light.turn_on
entity_id: light.hallway_lightstrip entity_id: light.hallway_lightstrip
data: data:

View File

@ -10,9 +10,43 @@
type: remote_button_short_press type: remote_button_short_press
subtype: button_1 subtype: button_1
action: action:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on - service: light.turn_on
target:
entity_id: light.kitchen_lights entity_id: light.kitchen_lights
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.toggle
entity_id: light.kitchen_lights
data:
brightness_pct: 100
kelvin: 3200
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 5
kelvin: 2700
- id: kitchen-button-2 # Upper right - id: kitchen-button-2 # Upper right
alias: '[Kitchen] Button 2' alias: '[Kitchen] Button 2'
@ -58,6 +92,9 @@
- service: light.turn_off - service: light.turn_off
target: target:
entity_id: light.hallway_light entity_id: light.hallway_light
- service: light.turn_off
target:
entity_id: light.hallway_lightstrip
- id: kitchen-button-2-held # Upper right - id: kitchen-button-2-held # Upper right
alias: '[Kitchen] Button 2 Hold' alias: '[Kitchen] Button 2 Hold'
@ -103,9 +140,27 @@
type: remote_button_short_press type: remote_button_short_press
subtype: turn_on subtype: turn_on
action: action:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on - service: light.turn_on
data:
entity_id: light.kitchen_sink_lighstrip entity_id: light.kitchen_sink_lighstrip
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.toggle
entity_id: light.kitchen_sink_lighstrip
data:
brightness_pct: 100
kelvin: 3200
mode: single mode: single
- id: kitchen-sink-button-off - id: kitchen-sink-button-off
@ -131,9 +186,43 @@
device_id: a47c928b108240ed8866f9f7a70bc844 device_id: a47c928b108240ed8866f9f7a70bc844
command: move_with_on_off command: move_with_on_off
action: action:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on - service: light.turn_on
data:
entity_id: light.kitchen_lights entity_id: light.kitchen_lights
data:
brightness_pct: 100
kelvin: 2000
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'off'
sequence:
- service: light.toggle
entity_id: light.kitchen_lights
data:
brightness_pct: 100
kelvin: 3200
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 5
kelvin: 2700
mode: single mode: single
- id: kitchen-sink-button-hold-off - id: kitchen-sink-button-hold-off

View File

@ -1,46 +1,55 @@
- id: kitchen-motion-dark - id: kitchen-lights-on
alias: '[Kitchen] Motion day dark' alias: '[Kitchen] Lights On'
mode: single mode: single
trigger: trigger:
- platform: state - platform: state
entity_id: binary_sensor.kitchen_motion_sensor entity_id: binary_sensor.kitchen_motion_sensor
from: 'off' from: 'off'
to: 'on' to: 'on'
condition: action:
- condition: numeric_state - choose:
entity_id: sensor.kitchen_motion_luminance - conditions:
below: '25'
- condition: state - condition: state
entity_id: input_select.home_mode entity_id: input_select.home_mode
state: Day state: Day
action: - condition: numeric_state
entity_id: sensor.kitchen_motion_luminance
below: '25'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on - service: light.turn_on
entity_id: light.kitchen_lights entity_id: light.kitchen_lights
data: data:
brightness_pct: 90 brightness_pct: 100
kelvin: 2000 kelvin: 2000
- conditions:
- id: kitchen-motion-night - condition: state
alias: '[Kitchen] Motion night' entity_id: input_boolean.sleep_mode
mode: single state: 'off'
trigger: sequence:
- platform: state - service: light.toggle
entity_id: binary_sensor.kitchen_motion_sensor entity_id: light.kitchen_lights
from: 'off' data:
to: 'on' brightness_pct: 100
condition: kelvin: 3200
- conditions:
- condition: state - condition: state
entity_id: input_select.home_mode entity_id: input_select.home_mode
state: Night state: Night
action: sequence:
- service: light.turn_on - service: light.turn_on
entity_id: light.kitchen_lights entity_id: light.kitchen_lights
data: data:
brightness_pct: 5 brightness_pct: 5
kelvin: 2000 kelvin: 2700
- id: kitchen-motion-off - id: kitchen-lights-off
alias: '[Kitchen] Motion Off' alias: '[Kitchen] Lights Off'
mode: restart mode: restart
trigger: trigger:
- platform: state - platform: state

View File

@ -17,10 +17,6 @@
name: Shower Lights name: Shower Lights
- entityId: light.tv_lights - entityId: light.tv_lights
name: TV Lights name: TV Lights
- entityId: light.computer_computer_cave_background
name: Computer Computer Cave Background
- entityId: light.couch_lamp
name: Couch lamp
- entityId: light.desk_lightbar - entityId: light.desk_lightbar
name: Desk Lightbar name: Desk Lightbar
- name: Concat scripts - name: Concat scripts

View File

@ -1,21 +1,5 @@
{% for light in lights %} {% for light in lights %}
# {{ light.name }} # {{ light.name }}
- id: sleep_mode_{{ light.entityId }}
alias: '[Sleep-Mode] {{ light.name }}'
trigger:
- platform: state
entity_id: {{ light.entityId }}
to: 'on'
condition:
- condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
action:
- service: light.turn_on
data:
kelvin: 2000
entity_id: {{ light.entityId }}
mode: single
- id: sleep_on_{{ light.entityId }} - id: sleep_on_{{ light.entityId }}
alias: '[Sleep-On] {{ light.name }}' alias: '[Sleep-On] {{ light.name }}'
trigger: trigger:
@ -31,21 +15,6 @@
kelvin: 2000 kelvin: 2000
entity_id: {{ light.entityId }} entity_id: {{ light.entityId }}
mode: single mode: single
- id: day_mode_{{ light.entityId }}
alias: '[Day-Mode] {{ light.name }}'
trigger:
- platform: time
at: input_datetime.day_mode
condition:
- condition: state
entity_id: {{ light.entityId }}
state: 'on'
action:
- service: light.turn_on
data:
kelvin: 3200
entity_id: {{ light.entityId }}
mode: single
- id: day_on_{{ light.entityId }} - id: day_on_{{ light.entityId }}
alias: '[Day-On] {{ light.name }}' alias: '[Day-On] {{ light.name }}'
trigger: trigger: