# =========================================================================
# BÜRO
# WS-EUK03 – operation_mode: decoupled ✓
# =========================================================================
buro_licht:
  module: controllerx
  class: LightController
  controller: Büro Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.buro_decke
  mapping:
    single: toggle

buro_schreibtisch_switch:
  module: controllerx
  class: WXKG01LMLightController
  controller: Büro Schreibtischschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.buro_schreibtisch

# =========================================================================
# WC
# WS-EUK03 – operation_mode: decoupled ✓
# WXKG15LM – operation_mode: event ✓
# =========================================================================
wc_licht:
  module: controllerx
  class: LightController
  controller: WC Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.wc_decke
  mapping:
    single: toggle
    double:
      - service: light.turn_off
        entity_id: light.wc_decke
      - service: light.turn_off
        entity_id: light.technikraum_decke

wc_wireless:
  module: controllerx
  class: WXKG15LMLightController
  controller: WC Wireless Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.wc_decke
  mapping:
    single_left:
      service: light.toggle
      entity_id: light.wc_decke
    single_right:
      service: light.toggle
      entity_id: light.wc_spiegel

# =========================================================================
# BADEZIMMER
# WS-EUK03 – operation_mode: decoupled ✓
# WXKG15LM – operation_mode: event ✓
# =========================================================================
badezimmer_lichtschalter:
  module: controllerx
  class: LightController
  controller: Badezimmer Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.badezimmer_decke
  mapping:
    single: toggle

badezimmer_h1w:
  module: controllerx
  class: WXKG15LMLightController
  controller: Badezimmer Wireless Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.badezimmer_decke
  mapping:
    single_left:
      service: light.toggle
      entity_id: light.badezimmer_decke
    single_right:
      service: light.toggle
      entity_id: light.badezimmer_spiegel

# =========================================================================
# WOHNBEREICH & GANG
# WS-EUK04 – operation_mode_left/right: decoupled ✓
# =========================================================================
wohnzimmer_garderobe_h1:
  module: controllerx
  class: LightController
  controller: Gang Wohnzimmer Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.garderobe_spots
  mapping:
    single_left:
      service: light.toggle
      entity_id: light.garderobe_spots
    single_right:
      service: light.toggle
      entity_id: light.gang_spots

esszimmer_kuche_h1:
  module: controllerx
  class: LightController
  controller: Wohnzimmer Küche Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.esszimmer_decke
  mapping:
    single_left:
      service: light.toggle
      entity_id: light.esszimmer_decke
    single_right:
      service: light.toggle
      entity_id: light.kuche_spots

wohnzimmer_gang_h1:
  module: controllerx
  class: LightController
  controller: Esszimmer Gang Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.wohnzimmer_decke
  mapping:
    single_left:
      service: light.toggle
      entity_id: light.wohnzimmer_decke
    single_right:
      - service: light.toggle
        entity_id: light.gang_spots
      - service: light.toggle
        entity_id: light.wohnzimmer_spots

# WS-EUK03 – operation_mode: decoupled ✓
gang_h1:
  module: controllerx
  class: LightController
  controller: Gang Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.gang_spots
  mapping:
    single:
      - service: light.toggle
        entity_id: light.gang_spots
      - service: light.toggle
        entity_id: light.wohnzimmer_spots
    double:
      service: input_button.press
      entity_id: input_button.nachtmodus

wohnzimmer_button:
  module: controllerx
  class: WXKG01LMLightController
  controller: Wohnzimmer Button
  integration:
    name: z2m
    listen_to: mqtt
  light: light.wohnzimmer_decke
  mapping:
    single:
      service: switch.toggle
      entity_id: switch.wohnzimmer_steckdose
    double:
      service: input_button.press
      entity_id: input_button.nachtmodus

# =========================================================================
# SCHLAFRÄUME, KINDERZIMMER & SPEIS
# WS-EUK03 – decoupled ✓ (Gästezimmer & Speis noch setzen!)
# =========================================================================
kinderzimmer_bett:
  module: controllerx
  class: WXKG01LMLightController
  controller: Kinderzimmer Bettschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.kinderzimmer_spots

kinderzimmer_lichtschalter:
  module: controllerx
  class: LightController
  controller: Kinderzimmer Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.kinderzimmer_spots
  mapping:
    single: toggle

schlafzimmer_h1:
  module: controllerx
  class: LightController
  controller: Schlafzimmer Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.schlafzimmer_decke
  mapping:
    single: toggle

gastezimmer_h1:
  module: controllerx
  class: LightController
  controller: Gästezimmer Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.gastezimmer_decke
  mapping:
    single: toggle

speis_h1:
  module: controllerx
  class: LightController
  controller: Speis Lichtschalter
  integration:
    name: z2m
    listen_to: mqtt
  light: light.speis_decke
  mapping:
    single: toggle

# =========================================================================
# TERRASSE & AUSSENBEREICH
# =========================================================================

# WS-EUK03 – operation_mode: decoupled ✓
esszimmer_terrasse:
  module: controllerx
  class: LightController
  controller: Esszimmer Lichtschalter Terrasse
  integration:
    name: z2m
    listen_to: mqtt
  light: light.grillplatz_wandleuchte
  mapping:
    single: toggle

# WS-EUK03 – decoupled noch setzen!
wohnzimmer_terrasse:
  module: controllerx
  class: LightController
  controller: Wohnzimmer Lichtschalter Terrasse
  integration:
    name: z2m
    listen_to: mqtt
  light: light.terrasse_wandleuchte
  mapping:
    single: toggle

terrasse_remote:
  module: controllerx
  class: TS0044LightController
  controller: Terrasse Fernbedienung
  integration:
    name: z2m
    listen_to: mqtt
  light: light.technikraum_decke
