# Automatisierungen werden nicht ausgeführt obwohl Bedingungen passen

**URL:** <https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930>\
**Category:** Automatisierung\
**Created:** [22. Oktober 2026 um 08:16 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930 "2026-10-22T08:16:21Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielAlbert](https://community-smarthome.com/letter_avatar_proxy/v4/letter/d/ecae2f/32.png) [@DanielAlbert](https://community-smarthome.com/u/DanielAlbert)\
**Post date:** [22. Oktober 2026 um 08:16 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/1 "2026-10-22T08:16:21Z")

</div>

Hallo,

ich befasse mich aktuell viel mit Automatisieren und verstehe manchmal nicht warum die Aktion nicht ausgeführt wird obwohl die Bedingung beim Prüfen gegeben ist. Klicken ich unter Dann auf „Aktion ausführen“ funktioniert es. Muss ich irgendwo noch einstellen wie oft die Automatisierungen geprüft werden ?

 ![image](https://community-smarthome.com/uploads/default/original/2X/3/3ca06f53f322f266da2b7a172ff229158a47cffa.png)

---

<div class="post-metadata">

**Author:** ![maxe](https://community-smarthome.com/user_avatar/community-smarthome.com/maxe/32/658_2.png) [@maxe](https://community-smarthome.com/u/maxe)\
**Post date:** [22. Oktober 2026 um 08:34 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/2 "2026-10-22T08:34:40Z")

</div>

Was sagt denn die Trace-Timeline?

---

<div class="post-metadata">

**Author:** ![SmartHobbyt](https://community-smarthome.com/user_avatar/community-smarthome.com/smarthobbyt/32/662_2.png) [@SmartHobbyt](https://community-smarthome.com/u/SmartHobbyt)\
**Post date:** [22. Oktober 2026 um 08:36 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/3 "2026-10-22T08:36:16Z")

</div>

Dein Screenshot zeigt zwar dein Vorgehen, aber leider nicht die Automation selber. Diese Bilder sind so nicht aussagekräftig und schwer nachvollziehbar. Es ist besser, wenn du den Code der Automation in YAML postest. Klicke dazu auf die 3 Punkte ganz oben rechts, dann benutzt du die Optionen lt. Bild.

 ![yaml1](https://community-smarthome.com/uploads/default/original/2X/8/84faa9a6ce727ade38cc2e352de9a267358fda33.jpeg)

Wenn der Code in der Ansicht geladen ist, dann bitte alles markieren, in den Text klicken und dann Strg-A drücken (beim Mac Cmd-A). Jetzt hier im Forum in deinem Thema auf „Antworten“ klicken und vor dem Einfügen auf „Formatierter Text“ klicken und dann den Text einfügen.

 ![formatierterText1](https://community-smarthome.com/uploads/default/original/2X/7/755d38e53f3070d6223b75920b07f38d54837ecc.jpeg)

Dann liegt die Automation in einer Form vor, die jeder hier einsehen und bei sich bearbeiten kann, da alle Teile vorliegen.

---

<div class="post-metadata">

**Author:** ![DanielAlbert](https://community-smarthome.com/letter_avatar_proxy/v4/letter/d/ecae2f/32.png) [@DanielAlbert](https://community-smarthome.com/u/DanielAlbert)\
**Post date:** [22. Oktober 2026 um 09:19 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/4 "2026-10-22T09:19:10Z")

</div>

```auto
alias: Flur-Licht
description: ''
triggers:
  - trigger: occupancy.detected
    target:
      device_id: 84c8c85046ac5b67b0c231b83cf58db7
    options:
      behavior: each
      for: '00:00:00'
  - trigger: occupancy.cleared
    target:
      device_id: 84c8c85046ac5b67b0c231b83cf58db7
    options:
      behavior: each
      for: '00:00:00'
conditions: []
actions:
  - choose:
      - conditions:
          - condition: and
            conditions:
              - condition: occupancy.is_detected
                target:
                  device_id: 84c8c85046ac5b67b0c231b83cf58db7
                options:
                  behavior: any
                  for: '00:00:00'
              - condition: illuminance.is_value
                target:
                  device_id: 84c8c85046ac5b67b0c231b83cf58db7
                options:
                  threshold:
                    type: below
                    value:
                      active_choice: number
                      number: 30
                      entity: sensor.haozee_bewegungsmelder_licht_flur_illuminance
                  behavior: all
                  for:
                    hours: 0
                    minutes: 0
                    seconds: 0
        sequence:
          - action: switch.turn_on
            metadata: {}
            data: {}
            target:
              device_id: 1704a5adea5d0e4d1166c0e62bde2422
      - conditions:
          - condition: or
            conditions:
              - condition: occupancy.is_not_detected
                target:
                  device_id: 84c8c85046ac5b67b0c231b83cf58db7
                options:
                  behavior: any
                  for: '00:00:00'
              - condition: illuminance.is_value
                target:
                  device_id: 84c8c85046ac5b67b0c231b83cf58db7
                options:
                  threshold:
                    type: above
                    value:
                      active_choice: number
                      number: 35
                  behavior: any
                  for:
                    hours: 0
                    minutes: 1
                    seconds: 0
        sequence:
          - action: switch.turn_off
            metadata: {}
            data: {}
            target:
              device_id: 1704a5adea5d0e4d1166c0e62bde2422
mode: single

```

Was brauchst du aus der Trace Timeline?

---

<div class="post-metadata">

**Author:** ![DanielAlbert](https://community-smarthome.com/letter_avatar_proxy/v4/letter/d/ecae2f/32.png) [@DanielAlbert](https://community-smarthome.com/u/DanielAlbert)\
**Post date:** [22. Oktober 2026 um 09:20 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/5 "2026-10-22T09:20:43Z")

</div>

Durch Zustand von binary\_sensor.haozee\_prasenzmelder\_licht\_eg\_flur\_presence am 22. Oktober 2026 um 10:22:11 ausgelöst

Auswahl: Option 2 ausgeführt

Am 22. Oktober 2026 um 10:22:11 fertig (Laufzeit: 0.01 Sekunden

---

<div class="post-metadata">

**Author:** ![maxe](https://community-smarthome.com/user_avatar/community-smarthome.com/maxe/32/658_2.png) [@maxe](https://community-smarthome.com/u/maxe)\
**Post date:** [22. Oktober 2026 um 09:21 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/6 "2026-10-22T09:21:38Z")

</div>

demnach wurde die Option 2 ausgeführt.

---

<div class="post-metadata">

**Author:** ![maxe](https://community-smarthome.com/user_avatar/community-smarthome.com/maxe/32/658_2.png) [@maxe](https://community-smarthome.com/u/maxe)\
**Post date:** [22. Oktober 2026 um 09:24 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/7 "2026-10-22T09:24:52Z")

</div>

Wenn du willst, dass das Licht auch ausgeschaltet wird, sobald die Helligkeit für 1 Min über 35 steigt, musst du dafür auch einen Trigger anlegen.

Hatte ich dir hier aber auch schon gezeigt: [SONOFF SNZB-06P24 - Automatisierung mit Bewegung und Beleuchtungsstärke - #2 von maxe](https://community-smarthome.com/t/sonoff-snzb-06p24-automatisierung-mit-bewegung-und-beleuchtungsstaerke/11921/2)

---

<div class="post-metadata">

**Author:** ![tinob](https://community-smarthome.com/user_avatar/community-smarthome.com/tinob/32/2544_2.png) [@tinob](https://community-smarthome.com/u/tinob)\
**Post date:** [22. Oktober 2026 um 15:37 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/8 "2026-10-22T15:37:59Z")

</div>

Was mir aufgefallen ist das du von „device\_id“ auf „entity\_id“ wechseln solltest, ich glaube ab 2026.10 gibt es damit Probleme.

Das ist auch kein richtiger Yaml Befehl: active\_choice: number das müsste was mit state heissen und nicht Number.

```auto
alias: Flur-Licht
description: "Schaltet das Licht bei Bewegung und Dunkelheit an, und nach 1 Min ohne Bewegung (oder wenn es hell wird) wieder aus."
mode: single
trigger:
  # 1. Jemand betritt den Flur
  - platform: state
    entity_id: binary_sensor.haozee_bewegungsmelder_licht_flur_occupancy
    to: "on"
    id: "bewegung_an"
    
  # 2. Niemand mehr im Flur (für 1 Minute)
  - platform: state
    entity_id: binary_sensor.haozee_bewegungsmelder_licht_flur_occupancy
    to: "off"
    for:
      minutes: 1
    id: "bewegung_aus"
    
  # 3. Es wird draußen/im Flur hell
  - platform: numeric_state
    entity_id: sensor.haozee_bewegungsmelder_licht_flur_illuminance
    above: 35
    for:
      minutes: 1
    id: "zu_hell"

condition: []

action:
  - choose:
      # Option 1: Lichteinschaltung
      - conditions:
          - condition: trigger
            id: "bewegung_an"
          - condition: numeric_state
            entity_id: sensor.haozee_bewegungsmelder_licht_flur_illuminance
            below: 30
        sequence:
          - action: switch.turn_on
            target:
              device_id: 1704a5adea5d0e4d1166c0e62bde2422

      # Option 2: Lichtausschaltung
      - conditions:
          - condition: or
            conditions:
              - condition: trigger
                id: "bewegung_aus"
              - condition: trigger
                id: "zu_hell"
        sequence:
          - action: switch.turn_off
            target:
              device_id: 1704a5adea5d0e4d1166c0e62bde2422

```

Korrigiere bitte die entsprechenden Felder

---

<div class="post-metadata">

**Author:** ![DanielAlbert](https://community-smarthome.com/letter_avatar_proxy/v4/letter/d/ecae2f/32.png) [@DanielAlbert](https://community-smarthome.com/u/DanielAlbert)\
**Post date:** [22. Oktober 2026 um 16:41 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/9 "2026-10-22T16:41:13Z")

</div>

> [@tinob](#):
>
> Das ist auch kein richtiger Yaml Befehl: active\_choice: number das

Hallo, damit habe ich mich noch nicht befasst. Bei Sobald habe ich jetzt folgendes ausgewählt:

 ![image](https://community-smarthome.com/uploads/default/original/2X/c/c70cb129f153d21c5aa1df8be050af60444603fd.png)

was verbessert sich mit dieser neuen Struktur bei den Automatisierungen ?

---

<div class="post-metadata">

**Author:** ![Dreckfresse](https://community-smarthome.com/user_avatar/community-smarthome.com/dreckfresse/32/2467_2.png) [@Dreckfresse](https://community-smarthome.com/u/Dreckfresse)\
**Post date:** [22. Oktober 2026 um 17:17 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/11 "2026-10-22T17:17:11Z")

</div>

kleiner Tipp nebenbei:

Verwende beide, also Von und Zu im trigger

 ![grafik](https://community-smarthome.com/uploads/default/original/2X/4/488b45483dd96b85b83fc5b40bee29dbd1aeaa89.png)

Wenn du das nicht machst dann wird auch von Zustand „Nicht verfügbar“ oder „Unbekannt“ zu … getriggert

Meist z.B. beim neu starten von HA

> [@DanielAlbert](#):
>
> was verbessert sich mit dieser neuen Struktur bei den Automatisierungen ?

siehst du doch unten in dem oder Block  
Hier hast du jetzt die ODER Funktion mit dem neuen Trigger von oben

 ![grafik](https://community-smarthome.com/uploads/default/original/2X/0/05b2f36918075edfa92a36680a69f7745c080b3a.png)

---

<div class="post-metadata">

**Author:** ![DanielAlbert](https://community-smarthome.com/letter_avatar_proxy/v4/letter/d/ecae2f/32.png) [@DanielAlbert](https://community-smarthome.com/u/DanielAlbert)\
**Post date:** [22. Oktober 2026 um 17:47 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/12 "2026-10-22T17:47:53Z")

</div>

Leider geht die neue Automatisierung nicht

 ![image](https://community-smarthome.com/uploads/default/original/2X/6/6e00597e3f041b48f9467ffadf018d4fcc87e1a3.png)

```auto
alias: Flur-Licht Test
description: >-
  Schaltet das Licht bei Bewegung und Dunkelheit an, und nach 1 Min ohne
  Bewegung (oder wenn es hell wird) wieder aus.
triggers:
  - entity_id:
      - binary_sensor.sonoff_bewegungsmelder_licht_flur_alt_occupancy
    to:
      - 'on'
    id: bewegung_an
    trigger: state
    from:
      - 'off'
  - entity_id:
      - binary_sensor.haozee_prasenzmelder_licht_eg_flur_presence
    to:
      - 'off'
    for:
      minutes: 1
    id: bewegung_aus
    trigger: state
    from:
      - 'on'
  - entity_id:
      - sensor.haozee_prasenzmelder_licht_eg_flur_illuminance
    above: 35
    for:
      minutes: 1
    id: zu_hell
    trigger: numeric_state
conditions: []
actions:
  - choose:
      - conditions:
          - condition: trigger
            id: bewegung_an
          - condition: numeric_state
            entity_id: update.sonoff_bewegungsmelder_licht_flur_alt
            below: 30
        sequence:
          - action: switch.turn_on
            target:
              device_id: 1704a5adea5d0e4d1166c0e62bde2422
            data: {}
      - conditions:
          - condition: or
            conditions:
              - condition: trigger
                id: bewegung_aus
              - condition: trigger
                id: zu_hell
        sequence:
          - action: switch.turn_off
            target:
              device_id: 1704a5adea5d0e4d1166c0e62bde2422
mode: single

```

Ist wird die Bewegung nicht erkannt

---

<div class="post-metadata">

**Author:** ![tinob](https://community-smarthome.com/user_avatar/community-smarthome.com/tinob/32/2544_2.png) [@tinob](https://community-smarthome.com/u/tinob)\
**Post date:** [22. Oktober 2026 um 17:58 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/13 "2026-10-22T17:58:11Z")

</div>

Eine Update Enität mag leider kein Licht Einschalten 😅

```auto
              - condition: numeric_state
                entity_id: update.sonoff_bewegungsmelder_licht_flur_alt
                below: 30

```

Probier den mal:

```auto
alias: Flur-Licht Test
description: >-
  Schaltet das Licht bei Bewegung und Dunkelheit an, und nach 1 Min ohne
  Bewegung (oder wenn es hell wird) wieder aus.
triggers:
  - entity_id:
      - binary_sensor.sonoff_bewegungsmelder_licht_flur_alt_occupancy
    to:
      - 'on'
    id: bewegung_an
    trigger: state
    from:
      - 'off'
  - entity_id:
      - binary_sensor.haozee_prasenzmelder_licht_eg_flur_presence
    to:
      - 'off'
    for:
      minutes: 1
    id: bewegung_aus
    trigger: state
    from:
      - 'on'
  - entity_id:
      - sensor.haozee_prasenzmelder_licht_eg_flur_illuminance
    above: 35
    for:
      minutes: 1
    id: zu_hell
    trigger: numeric_state
conditions: []
actions:
  - choose:
      - conditions:
          - condition: trigger
            id: bewegung_an
          - condition: numeric_state
            # HIER KORRIGIERT: Der echte Helligkeitssensor
            entity_id: sensor.haozee_prasenzmelder_licht_eg_flur_illuminance
            below: 30
        sequence:
          - action: switch.turn_on
            target:
              device_id: 1704a5adea5d0e4d1166c0e62bde2422
            data: {}
      - conditions:
          - condition: or
            conditions:
              - condition: trigger
                id: bewegung_aus
              - condition: trigger
                id: zu_hell
        sequence:
          - action: switch.turn_off
            target:
              device_id: 1704a5adea5d0e4d1166c0e62bde2422
mode: single

```

---

<div class="post-metadata">

**Author:** ![DanielAlbert](https://community-smarthome.com/letter_avatar_proxy/v4/letter/d/ecae2f/32.png) [@DanielAlbert](https://community-smarthome.com/u/DanielAlbert)\
**Post date:** [22. Oktober 2026 um 18:35 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/14 "2026-10-22T18:35:57Z")

</div>

Danke geht habe noch einen Fehler den ich eingetragen habe gefunden. Danke werde es mal Testen

---

<div class="post-metadata">

**Author:** ![tinob](https://community-smarthome.com/user_avatar/community-smarthome.com/tinob/32/2544_2.png) [@tinob](https://community-smarthome.com/u/tinob)\
**Post date:** [22. Oktober 2026 um 18:38 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/15 "2026-10-22T18:38:48Z")

</div>

Wird denn Bewegung an HA weiterleitet.

Schau mal unter Einstellungen Werkzeuge unter Zustand suche deine Entität ob eine Bewegung erkannt wird.

---

<div class="post-metadata">

**Author:** ![DanielAlbert](https://community-smarthome.com/letter_avatar_proxy/v4/letter/d/ecae2f/32.png) [@DanielAlbert](https://community-smarthome.com/u/DanielAlbert)\
**Post date:** [22. Oktober 2026 um 18:40 UTC](https://community-smarthome.com/t/automatisierungen-werden-nicht-ausgefuehrt-obwohl-bedingungen-passen/11930/16 "2026-10-22T18:40:47Z")

</div>

Muss mich noch mehr mit den Einstellung in HA und den einzelnen Punkten befassen aber langsam wird es. Danke dir Tinob zu bist mein Engel 🙂
