Files
sarah/packages/modules/lighting.yaml
T

102 lines
2.6 KiB
YAML

# https://www.home-assistant.io/integrations/light
# https://www.home-assistant.io/integrations/light.group/
light:
- platform: group
name: Living room main lights
entities:
- light.living_room_1
- light.living_room_2
- light.living_room_3
- light.living_room_4
- platform: group
name: Living room all lights
entities:
- light.living_room_main_lights
- light.pc
- platform: group
name: All lights
entities:
- light.living_room_all_lights
- light.bedside_light
automation:
- id: lighting_turn_on_after_sunset
alias: Lighting · Turn on all lights after sunset
trigger:
platform: sun
event: sunset
offset: "+00:00:00"
condition:
- condition: state
entity_id: binary_sensor.georgi_home
state: "on"
action:
- service: light.turn_on
entity_id: light.all_lights
- id: lighting_turn_off_after_sunrise
alias: Lighting · Turn off all lights after sunrise
trigger:
platform: sun
event: sunrise
offset: "+00:00:00"
action:
- service: light.turn_off
entity_id: light.all_lights
- id: lighting_master_bedroom_bedside_light_on_bedside_switch_single_click
alias: Lighting · Master bedroom · Toggle bedside light on bedisde 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
entity_id: light.bedside_light
- id: lighting_living_room_turn_on_cube_flip_90
alias: Lighting · Living room · Turn all lights on on Magic Cube flip 90
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret magic_cube_ieee
command: flip
args:
flip_degrees: 90
action:
- service: light.turn_on
entity_id: light.living_room_all_lights
- id: lighting_living_room_turn_off_cube_flip_180
alias: Lighting · Living room · Turn all lights off on Magic Cube flip 180
trigger:
platform: event
event_type: zha_event
event_data:
device_ieee: !secret magic_cube_ieee
command: flip
args:
flip_degrees: 180
action:
- service: light.turn_off
entity_id: light.living_room_all_lights
homeassistant:
customize:
light.living_room_1:
friendly_name: Living room 1
light.living_room_2:
friendly_name: Living room 2
light.living_room_3:
friendly_name: Living room 3
light.living_room_4:
friendly_name: Living room 4