If I want to use multiple custom attribute conditions to activate a switch, what separator is needed?
comma, space, semicolon, something else?
I am using ubiquiti cameras that have smartDetect functionality. So they will detect a person, animal, vehicle, etc.
If I set my custom attribute statement to "contains" with "animal, person", the activation gets ignored.
If I change my comparator to "=", I get the same results.
But if I only have one comparator statement/condition, then the automation works like expected.
I also tested with the "=" comparator and it worked like expected.
I took a look at other operators like multiple motion sensors and they all appear to be "value, value". Is this a bug with custom attributes, or am I doing something wrong?
Any help and/or guidance is appreciated.
No, the feature you are assuming to exist just doesn't.
The "contains" option does a simple search in the attribute value for the exact text you provide -- commas, spaces, etc. are not special, just part of a string you can also look for.
I would suggest supplementing this automation with a boolean hub variable, virtual switch, or other device or variable that you can use in Room Lighting. Create a different automation, like an RM rule, to set that variable or device to the appropriate values based on whatever events you care (and don't care) about in the camera, then use that in your RL instance instead of trying to do this all there since you can only look at a single attribute value otherwise.
2 Likes
Thank you for the response. I appreciate the insight. I'll create some quick "or" logic then pass that into RL.