#:########################################################################################:#
# Package: Central Stairway Two-Way Synchronization
# File:    Lighting_2Way_Sync/central_stairway_2way_sync.yaml
# Version: v1.1.0
# Date:    2026-07-22
#
# Purpose:
#   Keeps the upper and lower controls for the main stair lights and stair footer
#   lights 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.
#   - Leaves direct device-level MQTT synchronization to the ESPHome devices.
#
# Dependency:
#   - Blueprint: zorruno/two_three_way_sync.yaml
#
# Version History:
#   - v1.1.0 (2026-07-22): Removed the superseded lounge-middle relay and retained
#     two active relays in each synchronization pair.
#   - v1.0.0 (2026-06-22): Initial central stairway synchronization package.
#:########################################################################################:#

automation:
  # Stair Lights Top
  - id: stair_lights_top_2way_sync
    alias: Stair lights Top Lights 2-Way Sync
    initial_state: true
    use_blueprint:
      path: zorruno/two_three_way_sync.yaml
      input:
        members:
          - switch.esp_centralstairs_top_relay_1_main_stair_lights
          - switch.esp_centralstairs_bottom_relay_1_main_stair_lights_lower
        sync_on_start: true
        startup_delay: 5

  # Stair Lights Bottom
  - id: stair_footer_lights_2way_sync
    alias: Stair Footer Lights 2-Way Sync
    initial_state: true
    use_blueprint:
      path: zorruno/two_three_way_sync.yaml
      input:
        members:
          - switch.esp_centralstairs_top_relay_2_stair_footer_lights
          - switch.esp_centralstairs_bottom_relay_2_stair_footer_lights
        sync_on_start: true
        startup_delay: 5
