Comparison always seems to return TRUE

4 views
Skip to first unread message

Daryl Sargent

unread,
Jan 31, 2026, 1:29:29 AM (yesterday) Jan 31
to TasmotaUsers
I have the following very simple rule that compares a RFCode with a string.  It uses an IF statement and always seems to return true regardless of the value:

07:22:07.312 MQT: stat/bridge/RESULT = {"Rule2":{"State":"ON","Once":"OFF","StopOnError":"OFF","Length":77,"Free":434,"Rules":"ON RfReceived#Data DO IF (%value% == E7510A) Var1 TRIGGERED ENDIF ENDON BREAK"}}
07:22:48.958 CMD: var1 ""
07:22:48.963 RSL: RESULT = {"Var1":""}
07:22:57.887 RSL: RESULT = {"Time":"2026-01-31T07:22:57","RfReceived":{"Sync":13980,"Low":460,"High":1350,"Data":"E7510E","RfKey":"None"}}
07:22:57.916 RUL: RFRECEIVED#DATA performs 'IF (E7510E == E7510A) Var1 TRIGGERED ENDIF'
07:22:57.922 RSL: RESULT = {"If":"Done"}
07:22:58.139 RSL: RESULT = {"Var1":"TRIGGERED"}

I assume I've got the syntax wrong somewhere.  Any suggestions please?

Daryl Sargent

unread,
Jan 31, 2026, 2:01:27 AM (yesterday) Jan 31
to TasmotaUsers
Ignore this "==" compares them as numbers, "=" compares them as strings.  Which is explained in the docs in the trigger comparison section, not in the bit on conditional rules.... 
Reply all
Reply to author
Forward
0 new messages