1
0
ansible-home-assistant/scripts/93.lights-table.yaml

62 lines
1.8 KiB
YAML

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