Files
sarah/config/packages/modules/lighting/by_rooms/master_bedroom.yaml
T

72 lines
1.9 KiB
YAML

script:
scene_bedroom_neon:
icon: "mdi:weather-night"
sequence:
- service: light.turn_on
entity_id: light.master_bedroom_main
data:
rgb_color: [255, 0, 190]
brightness_pct: 40
- service: light.turn_on
entity_id: light.bedside
data:
xy_color: [0.384, 0.159]
brightness_pct: 1
- service: light.turn_on
entity_id: light.bed_led
data:
rgb_color: [0, 255, 190]
brightness_pct: 100
- service: light.turn_on
entity_id: light.bed_led
data:
rgb_color: [0, 255, 190]
- delay: 00:00:05
- service: light.turn_on
entity_id: light.bed_led
scene_bedroom_regular:
icon: "mdi:weather-sunny"
sequence:
- service: light.turn_on
entity_id:
- light.master_bedroom_main
- light.bed_led
data:
color_temp: 500
brightness_pct: 100
- service: light.turn_on
entity_id: light.bedside
data:
color_temp: 500
brightness_pct: 20
automation:
- alias: Lighting · Master bedroom · Toggle lights on bedside switch single click
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret master_bedroom_bedside_switch_ieee
command: single
action:
- service: light.toggle
data_template:
entity_id: >-
{% if is_state('input_select.house_mode', 'day') %}
light.master_bedroom_main
{% elif is_state('input_select.house_mode', 'bed') %}
light.bedside, light.bed_led
{% elif is_state('input_select.house_mode', 'night') %}
light.bed_led
{% endif %}
brightness_pct: >-
{% if is_state('input_select.house_mode', 'night') %}
40
{% else %}
100
{% endif %}