1
0

Change living room button to table lights

This commit is contained in:
Przemek Grondek 2022-04-09 14:29:26 +02:00
parent 420cc026a8
commit 4c769240fa
2 changed files with 62 additions and 50 deletions

View File

@ -10,56 +10,7 @@
type: remote_button_alt_short_press
subtype: button_1
action:
- choose:
- conditions:
- condition: state
entity_id: light.office
state: 'on'
sequence:
- service: light.turn_off
entity_id: light.office
- conditions:
- condition: state
entity_id: light.office
state: 'off'
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.office
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.office
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.office
data:
brightness_pct: 5
kelvin: 2700
- service: script.table_lights_toggle
- id: living-room-button-2 # Upper right
alias: '[Living Room] Button 2 - Couch Light'

View File

@ -0,0 +1,61 @@
table_lights_toggle:
alias: '[Table] Lights toggle'
sequence:
- choose:
- conditions:
- condition: state
entity_id: light.table_lamp_lights
state: 'on'
sequence:
- service: script.table_lights_off
- conditions:
- condition: state
entity_id: light.table_lamp_lights
state: 'off'
sequence:
- service: script.table_lights_on
table_lights_on:
alias: '[Table] Lights on'
sequence:
- choose:
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Day
sequence:
- service: light.turn_on
entity_id: light.table_lamp_lights
data:
kelvin: 3200
- service: light.turn_on
entity_id: light.table_lamp_lights
data:
brightness: 255
- conditions:
- condition: state
entity_id: input_select.home_mode
state: Night
sequence:
- service: light.turn_on
entity_id: light.table_lamp_lights
data:
kelvin: 2000
- service: light.turn_on
entity_id: light.table_lamp_lights
data:
brightness_pct: 10
table_lights_off:
alias: '[Table] Lights off'
sequence:
- service: light.turn_off
entity_id: light.table_lamp_lights
- service: light.turn_off
entity_id: light.bathroom_mirror_lights
- service: light.turn_off
entity_id: light.shower_lights
- service: light.turn_off
entity_id: light.bathroom_color_zha_group_0x0007
- service: media_player.media_pause
entity_id: media_player.bathroom