#:########################################################################################:#
# Package: Garage Lighting Two-Way Synchronization
# File:    Lighting_2Way_Sync/garage_lights_2way_sync.yaml
# Version: v1.0.0
# Date:    2026-06-22
#
# Purpose:
#   Keeps the paired controls for the garage-entry corridor/outside lighting and
#   the internal garage lighting synchronized through Home Assistant.
#
# Behaviour:
#   - Synchronizes each two-member relay pair in both directions.
#   - Synchronizes state after Home Assistant starts, following a five-second delay.
#
# Dependency:
#   - Blueprint: zorruno/two_three_way_sync.yaml
#
# Version History:
#   - v1.0.0 (2026-06-22): Initial garage lighting synchronization package.
#:########################################################################################:#

automation:
  # Two lights and two switches for these corridor lights
  - id: garage_entry_outside_2way_sync
    alias: Garage Entry & Outside Light 2-Way Sync
    initial_state: true
    use_blueprint:
      path: zorruno/two_three_way_sync.yaml
      input:
        members:
          - switch.esp_garageentrylights_relay_1_corridor_lights
          - switch.esp_loungesouthleftswitch_relay_2_outside_light_1
        sync_on_start: true
        startup_delay: 5

  # Internal Garage Lights (Light controller is sonoff basic in cupboard)
  - id: garage_lights_2way_sync
    alias: Garage Lights 2-Way Sync
    initial_state: true
    use_blueprint:
      path: zorruno/two_three_way_sync.yaml
      input:
        members:
          - switch.esp_garageentrylights_relay_3_garage_lights
          - switch.esp_garagelights_garage_lights
        sync_on_start: true
        startup_delay: 5
