Versuche ein Doif mit einer Abfrage an einem Attribut am Device zu erstellen.
define JA_1_4_FT_Aut_Do DOIF ([FT_02:state] eq "B0" and [?JA_1_4:position] ne "0" and AttrVal("JA_1_4","FT_Auf","") eq "Ein") (set JA_1_4 position 0)\
DOELSEIF ([FT_02:state] eq "B1" and [?JA_1_4:position] ne "100" and AttrVal("JA_1_4","FT_Ab","") eq "Ein") (set JA_1_4 position 100)
attr JA_1_4_FT_Aut_Do do always
attr JA_1_4_FT_Aut_Do room Test_Store
# DEF ([FT_02:state] eq "B0" and [?JA_1_4:position] ne "0" and AttrVal("JA_1_4","FT_Auf","") eq "Ein") (set JA_1_4 position 0)
# DOELSEIF ([FT_02:state] eq "B1" and [?JA_1_4:position] ne "100" and AttrVal("JA_1_4","FT_Ab","") eq "Ein") (set JA_1_4 position 100)
# FUUID 5cf04ac2-f33f-2006-5ea5-0ce0522339b70511
# MODEL FHEM
# NAME JA_1_4_FT_Aut_Do
# NOTIFYDEV FT_02,global
# NR 81
# NTFY_ORDER 50-Store_Automat_Do
# STATE initialized
# TYPE DOIF
# VERSION 30659 2025-12-25 12:37:16
# eventCount 66
# READINGS:
# 2026-03-15 16:19:05 cmd 0
# 2026-03-15 16:19:05 mode enabled
# 2026-03-15 16:19:05 state initialized
# Regex:
# accu:
# bar:
# barAvg:
# collect:
# cond:
# FT_02:
# 0:
# state ^FT_02$:^state:
# 1:
# state ^FT_02$:^state:
# attr:
# cmdState:
# wait:
# waitdel:
# condition:
# 0 ::ReadingValDoIf($hash,'FT_02','state') eq "B0" and ::ReadingValDoIf($hash,'JA_1_4','position') ne "0" and AttrVal("JA_1_4","FT_Auf","") eq "Ein"
# 1 ::ReadingValDoIf($hash,'FT_02','state') eq "B1" and ::ReadingValDoIf($hash,'JA_1_4','position') ne "100" and AttrVal("JA_1_4","FT_Ab","") eq "Ein"
# do:
# 0:
# 0 set JA_1_4 position 0
# 1:
# 0 set JA_1_4 position 100
# 2:
# helper:
# NOTIFYDEV FT_02,global
# globalinit 1
# last_timer 0
# sleeptimer -1
# readings:
# all FT_02:state
# uiState:
# uiTable:
#
setstate JA_1_4_FT_Aut_Do initialized
setstate JA_1_4_FT_Aut_Do 2026-03-15 16:19:05 cmd 0
setstate JA_1_4_FT_Aut_Do 2026-03-15 16:19:05 mode enabled
setstate JA_1_4_FT_Aut_Do 2026-03-15 16:19:05 state initialized
Das klappt leider nicht.
So sollte es doch gehen?
([FT_02:state] eq "B0" and [?JA_1_4:position] ne "0" and AttrVal("JA_1_4","FT_Auf","") eq "Ein") (set JA_1_4 position 0)
ja, sollte gehen, da musst du genau schauen welcher Teil der Bedingung nicht das liefert, was du erwartest. Du kannst die Bedingung nur mit einer Angabe testen und schauen, ob diese klappt oder nicht. Damit kannst du einkreisen, wo das Problem liegt.