Licht an, hell, aus

Servus,

ich möchte ein Licht und eine Steckdose wie folgt steuern:

BWM 1 scannt nur die Tür, quasi ob der Raum betreten oder verlassen wird.
BWM 2 scannt den kompletten Raum und auch die Tür.
Beide BMW werde nach 1 Minute zurückgesetzt. Einen kürzeren Zeitraum kann ich nicht wählen.
Das Licht soll immer um einen Wert erhellt oder verdunkelt werden.

Morgens

1.1 Montag bis Freitag ab 6:25h oder bis 30 Minuten nach Sonnenaufgang
bei Bewegung von BWM 1 einschalten und nur auf kleinster Stufe (1%) strahlen und solange Bewegung von BWM 2 erkannt wird, so bleiben

2.1 Montag bis Freitag ab 7:00 oder bis 30 Minuten nach Sonnenaufgang (spätestens dann ausschalten, auch wenn BWM 2 aktiv)
bei Bewegung von BWM 1 die Helligkeit auf 100% und solange Bewegung von BWM 2 erkannt wird, aktiv bleiben

2.2 Samstag bis Sonntag ab 8:00 oder bis 30 Minuten nach Sonnenaufgang (spätestens dann ausschalten, auch wenn BWM 2 aktiv)
bei Bewegung von BWM 2 die Helligkeit auf 50% erhöhen und solange Bewegung von BWM 2 erkannt wird, aktiv bleiben

Abends

3.1 Sonntag bis Donnerstag ab 30 Minuten vor Sonnenuntergang
bei Bewegung von BWM 2, die Helligkeit auf 100% erhöhen und solange Bewegung von BWM 2 erkannt wird, aktiv bleiben
3.2 ab 19:00 auf 50% herunterstufen, wenn BWM 2 aktiv oder auf 50% erhöhen wenn Bewegung durch BWM 2 erkannt wird
3.3 Licht soll auf 50% für 10 Minuten ohne Bewegung durch BWM 2 bleiben
3.4 ab 19:30 soll das Licht gar nicht mehr eingeschaltet werden, wenn BWM 1 oder BWM 2 aktiv
3.5 ab 19:30 soll die Steckdose, solange Bewegung von BWM 1 erkannt wird, aktiviert werden für 1 Minute

4.1 Freitag bis Samstag ab 30 Minuten vor Sonnenuntergang
bei Bewegung von BWM 2, die Helligkeit auf 100% erhöhen und solange Bewegung von BWM 2 erkannt wird, aktiv bleiben
4.2 ab 20:00 auf 50% herunterstufen, auch wenn BWM 2 aktiv oder auf 50% erhöhen wenn Bewegung durch BWM 2 erkannt wird
4.3 Licht soll auf 50% für 10 Minuten ohne Bewegung durch BWM 2 bleiben
4.4 ab 20:30 soll das Licht gar nicht mehr eingeschaltet werden, wenn BWM 1 oder BWM 2 aktiv
4.5 ab 20:30 soll die Steckdose bei Bewegung von BWM 1 für 1 Minute aktiviert werden

Ist sicherlich sehr kompliziert, ich kann später auch mal die Automation, die ich bisher gebaut habe, posten.

Schon mal Danke.

Nachtrag:

Konnte es nun erst mal mit 2 Automationen angehen:

Morgens:

alias: "\"💡RAUM morgens\""
description: ""
trigger:
  - type: motion
    platform: device
    device_id: 967d47f1a1a34d66c3a84a63c9e7cf65
    entity_id: e02c0c9b67b18204cc25c0d0b2d4c0d8
    domain: binary_sensor
    id: RAUM2 aktiv
    for:
      hours: 0
      minutes: 0
      seconds: 0
  - type: no_motion
    platform: device
    device_id: 967d47f1a1a34d66c3a84a63c9e7cf65
    entity_id: e02c0c9b67b18204cc25c0d0b2d4c0d8
    domain: binary_sensor
    id: RAUM2 inaktiv
condition:
  - condition: and
    conditions:
      - condition: sun
        before: sunrise
        before_offset: "0:30"
      - condition: or
        conditions:
          - condition: time
            after: "06:25:00"
            weekday:
              - mon
              - tue
              - wed
              - thu
              - fri
          - condition: time
            after: "08:00:00"
            weekday:
              - sat
              - sun
action:
  - alias: Licht erhöhen
    if:
      - condition: or
        conditions:
          - type: is_motion
            condition: device
            device_id: c754cf1cb6f75bba34bc46029f437e37
            entity_id: 18639e5fd7c9e2a20790b4daa3a4d59e
            domain: binary_sensor
          - type: is_motion
            condition: device
            device_id: 967d47f1a1a34d66c3a84a63c9e7cf65
            entity_id: e02c0c9b67b18204cc25c0d0b2d4c0d8
            domain: binary_sensor
    then:
      - device_id: ca208b95e19a21e96a2f0cf6d0a87b42
        domain: light
        entity_id: 07d533a695a1319e934cd4c8cb3f7d8c
        type: brightness_increase
        enabled: true
  - alias: Licht hell unter der Woche
    if:
      - condition: and
        conditions:
          - condition: time
            after: "07:00:00"
            weekday:
              - mon
              - tue
              - wed
              - thu
              - fri
          - type: is_motion
            condition: device
            device_id: 967d47f1a1a34d66c3a84a63c9e7cf65
            entity_id: e02c0c9b67b18204cc25c0d0b2d4c0d8
            domain: binary_sensor
    then:
      - repeat:
          count: 10
          sequence:
            - device_id: ca208b95e19a21e96a2f0cf6d0a87b42
              domain: light
              entity_id: 07d533a695a1319e934cd4c8cb3f7d8c
              type: brightness_increase
              enabled: true
            - device_id: 5d447b9373be1f7ab47fd9367536a32d
              domain: light
              entity_id: 5f955f6597865dd0c933ebdfc8433c9d
              type: brightness_increase
              enabled: true
  - alias: Licht hell am Wochenende
    if:
      - condition: and
        conditions:
          - condition: time
            after: "08:00:00"
            weekday:
              - sat
              - sun
          - type: is_motion
            condition: device
            device_id: 967d47f1a1a34d66c3a84a63c9e7cf65
            entity_id: e02c0c9b67b18204cc25c0d0b2d4c0d8
            domain: binary_sensor
    then:
      - repeat:
          count: 10
          sequence:
            - device_id: ca208b95e19a21e96a2f0cf6d0a87b42
              domain: light
              entity_id: 07d533a695a1319e934cd4c8cb3f7d8c
              type: brightness_increase
              enabled: true
            - device_id: 5d447b9373be1f7ab47fd9367536a32d
              domain: light
              entity_id: 5f955f6597865dd0c933ebdfc8433c9d
              type: brightness_increase
              enabled: true
  - if:
      - condition: trigger
        id:
          - RAUM2 inaktiv
    then:
      - repeat:
          count: 10
          sequence:
            - device_id: ca208b95e19a21e96a2f0cf6d0a87b42
              domain: light
              entity_id: 07d533a695a1319e934cd4c8cb3f7d8c
              type: brightness_decrease
            - device_id: 5d447b9373be1f7ab47fd9367536a32d
              domain: light
              entity_id: 5f955f6597865dd0c933ebdfc8433c9d
              type: brightness_decrease
    alias: Licht aus
mode: single


Abends:

alias: "\"💡RAUM abends\""
description: ""
trigger:
  - type: motion
    platform: device
    device_id: 967d47f1a1a34d66c3a84a63c9e7cf65
    entity_id: e02c0c9b67b18204cc25c0d0b2d4c0d8
    domain: binary_sensor
    id: RAUM2 aktiv
    for:
      hours: 0
      minutes: 0
      seconds: 0
  - type: no_motion
    platform: device
    device_id: 967d47f1a1a34d66c3a84a63c9e7cf65
    entity_id: e02c0c9b67b18204cc25c0d0b2d4c0d8
    domain: binary_sensor
    id: RAUM2 inaktiv
condition:
  - condition: and
    conditions:
      - condition: sun
        before: sunset
        before_offset: "0:30"
      - condition: or
        conditions:
          - condition: time
            before: "19:45:00"
            weekday:
              - mon
              - tue
              - wed
              - thu
              - sun
          - condition: time
            before: "19:30:00"
            weekday:
              - fri
              - sat
action:
  - alias: Licht erhöhen
    if:
      - condition: and
        conditions:
          - type: is_motion
            condition: device
            device_id: c754cf1cb6f75bba34bc46029f437e37
            entity_id: 18639e5fd7c9e2a20790b4daa3a4d59e
            domain: binary_sensor
          - type: is_motion
            condition: device
            device_id: 967d47f1a1a34d66c3a84a63c9e7cf65
            entity_id: e02c0c9b67b18204cc25c0d0b2d4c0d8
            domain: binary_sensor
    then:
      - device_id: ca208b95e19a21e96a2f0cf6d0a87b42
        domain: light
        entity_id: 07d533a695a1319e934cd4c8cb3f7d8c
        type: brightness_increase
        enabled: true
  - alias: Licht hell unter der Woche
    if:
      - condition: and
        conditions:
          - type: is_motion
            condition: device
            device_id: 967d47f1a1a34d66c3a84a63c9e7cf65
            entity_id: e02c0c9b67b18204cc25c0d0b2d4c0d8
            domain: binary_sensor
          - condition: time
            before: "19:30:00"
            weekday:
              - mon
              - tue
              - wed
              - thu
              - sun
    then:
      - repeat:
          count: 10
          sequence:
            - device_id: ca208b95e19a21e96a2f0cf6d0a87b42
              domain: light
              entity_id: 07d533a695a1319e934cd4c8cb3f7d8c
              type: brightness_increase
              enabled: true
            - device_id: 5d447b9373be1f7ab47fd9367536a32d
              domain: light
              entity_id: 5f955f6597865dd0c933ebdfc8433c9d
              type: brightness_increase
              enabled: true
  - alias: Licht hell Freitag & Samstag
    if:
      - condition: and
        conditions:
          - type: is_motion
            condition: device
            device_id: 967d47f1a1a34d66c3a84a63c9e7cf65
            entity_id: e02c0c9b67b18204cc25c0d0b2d4c0d8
            domain: binary_sensor
          - condition: time
            before: "19:30:00"
            weekday:
              - fri
              - sat
    then:
      - repeat:
          count: 10
          sequence:
            - device_id: ca208b95e19a21e96a2f0cf6d0a87b42
              domain: light
              entity_id: 07d533a695a1319e934cd4c8cb3f7d8c
              type: brightness_increase
              enabled: true
            - device_id: 5d447b9373be1f7ab47fd9367536a32d
              domain: light
              entity_id: 5f955f6597865dd0c933ebdfc8433c9d
              type: brightness_increase
              enabled: true
  - alias: Licht aus
    if:
      - condition: trigger
        id:
          - RAUM2 inaktiv
    then:
      - repeat:
          count: 10
          sequence:
            - device_id: ca208b95e19a21e96a2f0cf6d0a87b42
              domain: light
              entity_id: 07d533a695a1319e934cd4c8cb3f7d8c
              type: brightness_decrease
            - device_id: 5d447b9373be1f7ab47fd9367536a32d
              domain: light
              entity_id: 5f955f6597865dd0c933ebdfc8433c9d
              type: brightness_decrease
        enabled: true
mode: single