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:
- service: light.turn_on - choose:
entity_id: light.bedroom_lights - conditions:
data: - condition: state
brightness_pct: 60 entity_id: input_boolean.sleep_mode
kelvin: 2000 state: 'on'
sequence:
- service: light.turn_on
entity_id: light.bedroom_lights
data:
brightness_pct: 60
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:
- service: light.turn_on - choose:
data: - conditions:
entity_id: light.desk_lightbar - condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
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:
- service: light.turn_on - choose:
data: - conditions:
entity_id: light.tv_lights - condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
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,43 +1,52 @@
- 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:
- condition: state
entity_id: input_select.home_mode
state: Day
action: action:
- service: light.turn_on - choose:
entity_id: light.hallway_lightstrip - conditions:
data: - condition: state
brightness_pct: 100 entity_id: input_select.home_mode
kelvin: 3200 state: Day
sequence:
- id: hallway-motion-night - choose:
alias: '[Hallway] Motion Night' - conditions:
mode: restart - condition: state
trigger: entity_id: input_boolean.sleep_mode
- platform: state state: 'on'
entity_id: binary_sensor.hallway_motion_sensor sequence:
from: 'off' - service: light.turn_on
to: 'on' entity_id: light.hallway_lightstrip
condition: data:
- condition: state brightness_pct: 100
entity_id: input_select.home_mode kelvin: 2000
state: Night - conditions:
action: - condition: state
- service: light.turn_on entity_id: input_boolean.sleep_mode
entity_id: light.hallway_lightstrip state: 'off'
data: sequence:
brightness_pct: 5 - service: light.toggle
rgb_color: entity_id: light.hallway_lightstrip
- 255 data:
- 0 brightness_pct: 100
- 0 kelvin: 3200
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
entity_id: light.hallway_lightstrip
data:
brightness_pct: 5
rgb_color:
- 255
- 0
- 0
- id: hallway-motion-off - id: hallway-motion-off
alias: '[Hallway] Motion Off' alias: '[Hallway] Motion Off'

View File

@ -10,9 +10,43 @@
type: remote_button_short_press type: remote_button_short_press
subtype: button_1 subtype: button_1
action: action:
- service: light.turn_on - choose:
target: - conditions:
entity_id: light.kitchen_lights - 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
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:
- service: light.turn_on - choose:
data: - conditions:
entity_id: light.kitchen_sink_lighstrip - condition: state
entity_id: input_boolean.sleep_mode
state: 'on'
sequence:
- service: light.turn_on
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:
- service: light.turn_on - choose:
data: - conditions:
entity_id: light.kitchen_lights - 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
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:
- condition: numeric_state
entity_id: sensor.kitchen_motion_luminance
below: '25'
- condition: state
entity_id: input_select.home_mode
state: Day
action: action:
- service: light.turn_on - choose:
entity_id: light.kitchen_lights - conditions:
data: - condition: state
brightness_pct: 90 entity_id: input_select.home_mode
kelvin: 2000 state: Day
- 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
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-motion-night - id: kitchen-lights-off
alias: '[Kitchen] Motion night' alias: '[Kitchen] Lights Off'
mode: single
trigger:
- platform: state
entity_id: binary_sensor.kitchen_motion_sensor
from: 'off'
to: 'on'
condition:
- condition: state
entity_id: input_select.home_mode
state: Night
action:
- service: light.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 5
kelvin: 2000
- id: kitchen-motion-off
alias: '[Kitchen] Motion 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: