1
0

Kitchen lights cleanup

This commit is contained in:
Przemek Grondek 2022-08-05 00:09:51 +02:00
parent 17af75c7fd
commit 89f8b3bf9d
3 changed files with 72 additions and 134 deletions

View File

@ -10,43 +10,7 @@
type: remote_button_short_press
subtype: button_1
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
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.turn_on
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
- service: script.kitchen_lights_on
- id: kitchen-button-2 # Upper right
alias: '[Kitchen] Button 2'
@ -72,9 +36,7 @@
type: remote_button_short_press
subtype: button_3
action:
- service: light.turn_off
target:
entity_id: light.kitchen_lights
- service: script.kitchen_lights_off
- id: kitchen-button-4 # Lower Right
alias: '[Kitchen] Button 4'
@ -183,38 +145,5 @@
type: remote_button_long_press
subtype: dim_up
action:
- choose:
- conditions:
- condition: state
entity_id: light.kitchen_lights
state: 'on'
sequence:
- service: light.turn_off
entity_id: light.kitchen_lights
- conditions:
- condition: state
entity_id: light.kitchen_lights
state: 'off'
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.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 100
kelvin: 3200
- service: script.kitchen_lights_on
mode: single

View File

@ -10,49 +10,7 @@
entity_id: binary_sensor.kitchen_tabletop_motion_detection
to: 'on'
action:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
- condition: numeric_state
entity_id: sensor.office_illuminance
below: '150'
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.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 100
kelvin: 3200
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
- condition: numeric_state
entity_id: sensor.office_illuminance
below: '100'
sequence:
- service: light.turn_on
entity_id: light.kitchen_lights
data:
brightness_pct: 5
kelvin: 2700
- service: script.kitchen_lights_on
- id: kitchen-lights-off
alias: '[Kitchen] Lights Off'
@ -85,20 +43,4 @@
state: 'off'
for: '0:02:00'
action:
- service: light.turn_off
entity_id: light.kitchen_lights
- id: kitchen-sink-light-off
alias: '[Kitchen] Sink light off'
mode: single
trigger:
- platform: state
entity_id: binary_sensor.kitchen_sink_motion_sensor
to: 'off'
for: '0:05:00'
condition: [ ]
action:
- service: light.turn_off
data: { }
target:
entity_id: light.kitchen_sink_lighstrip
- service: script.kitchen_lights_off

View File

@ -0,0 +1,67 @@
kitchen_lights_toggle:
alias: '[Kitchen] Lights toggle'
sequence:
- choose:
- conditions:
- condition: state
entity_id: light.kitchen_lights
state: 'on'
sequence:
- service: script.kitchen_lights_off
- conditions:
- condition: state
entity_id: light.kitchen_lights
state: 'off'
sequence:
- service: script.kitchen_lights_on
kitchen_lights_on:
alias: '[Kitchen] Lights on'
sequence:
- 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
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.turn_on
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
kitchen_lights_off:
alias: '[Kitchen] Lights off'
sequence:
- service: light.turn_off
entity_id:
- light.kitchen_lights
- light.kitchen_sink_lighstrip
- switch.kitchen_big_light_switch