automation: - alias: Lighting · Turn on ceiling lights after sunset trigger: platform: sun event: sunset offset: "-01:00:00" condition: - condition: state entity_id: binary_sensor.georgi_home state: "on" action: - service: light.turn_on entity_id: light.ceiling_lights - 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 - alias: Lighting · Master bedroom · Toggle main 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 entity_id: light.master_bedroom_main_lights - 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 - 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 - alias: Lighting · Night mode · Kitchen · Turn lights on motion trigger: platform: state entity_id: binary_sensor.motion_1_ias_zone from: "off" to: "on" condition: condition: state entity_id: input_boolean.sleep_mode state: "on" action: - service: light.turn_on entity_id: light.light_le_12 data: brightness_pct: 13 - delay: 00:00:10 # reset brightness and turn off - service: light.turn_on entity_id: light.light_le_12 data: brightness_pct: 100 - service: light.turn_off entity_id: light.light_le_12 - alias: Lighting · Night mode · Hallway · Turn lights on motion trigger: platform: state entity_id: binary_sensor.motion_2_ias_zone from: "off" to: "on" condition: condition: state entity_id: input_boolean.sleep_mode state: "on" action: - service: light.turn_on entity_id: - light.light_le_6 - light.light_le_8 data: brightness_pct: 13 - delay: 00:10:00 # reset brightness and turn off - service: light.turn_on entity_id: - light.light_le_6 - light.light_le_8 data: brightness_pct: 100 - service: light.turn_off entity_id: light.tuya_hallway_all_lights