This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
The Homey Community has been moved to https://community.athom.com.
This forum is now read-only for archive purposes.
More than 3 OR statements?
vaderag
Member
I have just purchased some NFC tags to use for disabling alarm system.
I have When NFC tag detected and TagID= Tag1 or TagID = Tag2 etc disable.
I'd like to have 5 tags, but seems the max homey will allow in OR statements is 3
Any workarounds?
Thanks!
I have When NFC tag detected and TagID= Tag1 or TagID = Tag2 etc disable.
I'd like to have 5 tags, but seems the max homey will allow in OR statements is 3
Any workarounds?
Thanks!
Comments
Create a homeyscript for a condition with an array of 365 different tags and use indexOf to check if it is one of the known good tags. The HomeyScript is more complex but scalable to any number.
Your Question is ( A=1 OR A=2 OR A=3)
You could write that as
Not ( A!=1 AND A!=2 AND A!=3 )
This last one has for Homey no limits as we can have more then 3 ANDs in the condition.
So, Make a Flow with 5 x AND NFCTagID is Exactly not ..... (Can be default Homey Logic)
Add Your Then to the ELSE part to have it a Global NOT
If you had a Else Part add that to the THEN Part (or Leave empty.)
Works a treat