FHEM Forum

FHEM => Anfängerfragen => Thema gestartet von: fmth am 04 März 2016, 13:16:53

Titel: DOIF Problem
Beitrag von: fmth am 04 März 2016, 13:16:53
Hallo,
ich versuche mit einem DOIF bei geschlossener Tür eine Lampe einzuschalten.

(*{sunset("REAL",0,"16:00","22:40"}) and ([CUL_FHTTK_d1f683] eq "Closed")) (set Tisch on)

Leider bekomme ich die folgende Fehlermeldung:

perl error in condition: *{sunset("REAL",0,"16:00","22:40"}) and (InternalDoIf($hash,'CUL_FHTTK_d1f683','STATE','','',AttrVal($hash->{NAME},'notexist',undef)) eq "Closed"): syntax error at (eval 27267) line 1, at EOF

Ich habe leider keine Ahnung wie ich die weg bekomme.
Hat jemand eine Idee?
Gruß
Michael
Titel: Antw:DOIF Problem
Beitrag von: FranzB94 am 04 März 2016, 13:38:10
Zitat von: fmth am 04 März 2016, 13:16:53

(*{sunset("REAL",0,"16:00","22:40"}) and ([CUL_FHTTK_d1f683] eq "Closed")) (set Tisch on)

Titel: Antw:DOIF Problem
Beitrag von: stera am 04 März 2016, 13:41:11
Das Beispiel hat auch eckige Klammern, die bei Dir fehlen..


([{sunset()}])


Zitat von: fmth am 04 März 2016, 13:16:53
Hallo,
ich versuche mit einem DOIF bei geschlossener Tür eine Lampe einzuschalten.

(*{sunset("REAL",0,"16:00","22:40"}) and ([CUL_FHTTK_d1f683] eq "Closed")) (set Tisch on)

Leider bekomme ich die folgende Fehlermeldung:

perl error in condition: *{sunset("REAL",0,"16:00","22:40"}) and (InternalDoIf($hash,'CUL_FHTTK_d1f683','STATE','','',AttrVal($hash->{NAME},'notexist',undef)) eq "Closed"): syntax error at (eval 27267) line 1, at EOF

Ich habe leider keine Ahnung wie ich die weg bekomme.
Hat jemand eine Idee?
Gruß
Michael
Titel: Antw:DOIF Problem
Beitrag von: fmth am 04 März 2016, 13:43:43
({sunset("REAL",0,"16:00","22:40" and ([CUL_FHTTK_d1f683] eq "Closed")) (set Tisch on)

Bringt leider:
no right bracket: ({sunset("REAL",0,"16:00","22:40" and ([CUL_FHTTK_d1f683] eq "Closed")) (set Tisch on)

Gruß Michael
Titel: Antw:DOIF Problem
Beitrag von: Ralli am 04 März 2016, 13:58:53
Ist ja auch logisch. Was sagt die Fehlermeldung denn??!

So geht es richtig:


DOIF ([{sunrise(0,"16:00","22:40")}] and [CUL_FHTTK_d1f683] eq "Closed") (set Tisch on)