Hallo, ich habe eine Automation erstellt, die jetzt schon fast ein Jahr läuft. Über einen Präsenzmelder bekomme ich die Meldung, dass jemand im Raum ist und schalte eine LED Leiste an. Wenn alle Fenster und die Garage zu sind, leuchtet sie blau. Bei geöffnetem Fenster grün und wenn die Garage offen ist, rot. Auf einmal wird die Leiste nur bei geöffneter Garage angesteuert. Wenn alles zu ist oder ein Fenster offen, bleibt die LED aus. Für die Abfrage der Fenster Status benutze ich einen Helfer. ICh stelle hier mal den Code rein und auch einen Trace. Vielleicht kann mir dabei jemand helfen. Für mich ist das total unlogisch
alias: Flur LED
description: ""
triggers:
- trigger: state
entity_id:
- binary_sensor.prasenzmelder_flur_presence_sensor_1
from: "off"
to: "on"
- trigger: state
entity_id:
- binary_sensor.prasenzmelder_flur_presence_sensor_1
from: "on"
to: "off"
for:
hours: 0
minutes: 0
seconds: 30
conditions: []
actions:
- choose:
- conditions:
- condition: state
entity_id: binary_sensor.prasenzmelder_flur_presence_sensor_1
state: "on"
- condition: state
entity_id: binary_sensor.garagentor_external_input
state: "off"
- condition: state
entity_id: binary_sensor.fenster_status
state: "on"
sequence:
- action: light.turn_on
metadata: {}
data:
rgb_color:
- 240
- 252
- 27
brightness_pct: 26
target:
device_id: 827c00d8381c440714e47ae4ac9500ce
alias: Präsenz und Garage zu und Fenster auf
- conditions:
- condition: state
entity_id: binary_sensor.prasenzmelder_flur_presence_sensor_1
state: "on"
- condition: state
entity_id: binary_sensor.garagentor_external_input
state: "on"
sequence:
- action: light.turn_on
metadata: {}
data:
rgb_color:
- 216
- 1
- 22
brightness_pct: 26
target:
device_id: 827c00d8381c440714e47ae4ac9500ce
alias: Präsenz und Garage auf
- conditions:
- condition: state
entity_id: binary_sensor.prasenzmelder_flur_presence_sensor_1
state: "on"
- condition: state
entity_id: binary_sensor.garagentor_external_input
state: "off"
- condition: state
entity_id: binary_sensor.fenster_status
state: "off"
sequence:
- action: light.turn_on
metadata: {}
data:
rgb_color:
- 17
- 64
- 253
brightness_pct: 27
target:
device_id: 827c00d8381c440714e47ae4ac9500ce
alias: Präsenz und Garage zu und Fenster zu
- conditions:
- type: is_not_occupied
condition: device
device_id: 6587b0943916e4e31505d0123cf58976
entity_id: 176c19a00bc19f75c80cc8cd5b32d727
domain: binary_sensor
sequence:
- action: light.turn_off
metadata: {}
data: {}
target:
device_id: 827c00d8381c440714e47ae4ac9500ce
mode: single
Trace:
choose:
- conditions:
- condition: state
entity_id: binary_sensor.prasenzmelder_flur_presence_sensor_1
state: 'on'
- condition: state
entity_id: binary_sensor.garagentor_external_input
state: 'off'
- condition: state
entity_id: binary_sensor.fenster_status
state: 'on'
sequence:
- action: light.turn_on
metadata: {}
data:
rgb_color:
- 240
- 252
- 27
brightness_pct: 26
target:
device_id: 827c00d8381c440714e47ae4ac9500ce
alias: Präsenz und Garage zu und Fenster auf
- conditions:
- condition: state
entity_id: binary_sensor.prasenzmelder_flur_presence_sensor_1
state: 'on'
- condition: state
entity_id: binary_sensor.garagentor_external_input
state: 'on'
sequence:
- action: light.turn_on
metadata: {}
data:
rgb_color:
- 216
- 1
- 22
brightness_pct: 26
target:
device_id: 827c00d8381c440714e47ae4ac9500ce
alias: Präsenz und Garage auf
- conditions:
- condition: state
entity_id: binary_sensor.prasenzmelder_flur_presence_sensor_1
state: 'on'
- condition: state
entity_id: binary_sensor.garagentor_external_input
state: 'off'
- condition: state
entity_id: binary_sensor.fenster_status
state: 'off'
sequence:
- action: light.turn_on
metadata: {}
data:
rgb_color:
- 17
- 64
- 253
brightness_pct: 27
target:
device_id: 827c00d8381c440714e47ae4ac9500ce
alias: Präsenz und Garage zu und Fenster zu
- conditions:
- type: is_not_occupied
condition: device
device_id: 6587b0943916e4e31505d0123cf58976
entity_id: 176c19a00bc19f75c80cc8cd5b32d727
domain: binary_sensor
sequence:
- action: light.turn_off
metadata: {}
data: {}
target:
device_id: 827c00d8381c440714e47ae4ac9500ce