Sort of: the possibility mentioned above, the built-in %device% variable, would be the key. But it's just a string variable representing the display name of the last triggering device. Any conditional you make using that will thus be a bit "fragile" (what if you change the device name?). IMHO, it's better suited for just using as part of a string, often for speech or notification purposes. That being said, it's there.
But...this seems like poor rule design. If you want to perform different actions based on different triggers, then different rules are probably the way to go. Of course, this is all generalization, and it's hard to say more without knowing what your actual goal is.
Yes that will work. I have a number of rules with multiple triggers that use If Then statements according to the specific trigger. I do that to avoid using separate rules, though I try not to make the rules too complicated.
Not sure what your trying to do but if you mean have two similar triggers, one without and one with the ‘stays that way’ checked, the ‘stays that way’ one would just be an additional trigger and I’m not sure (but haven’t checked) whether you can go on to specify the ‘stays that way’ attribute specifically within an actions If/Then statement.
It’s probably best to outline what you’re trying to do so that someone can advise whether one or multiple rules is the way to go.
This is a rough example of one giving me different actions based on the triggers.
Trigger: Outside_Motion_Sensor is changed
If (Outside_Motion_Sensor is active and Time is between Sunset and Sunrise) Then
Run Rule : Flash_Outdoor_Lights_Start [<- Seperate Rule defining what this does]
End-If
If (Outside_Motion_Sensor is inactive and Time is between Sunset and Sunrise) Then
Run Rule : Flash_Outdoor_Lights_Stop -> Delay 5 Seconds [<- Seperate Rule defining what this does]
End-If
I have played with the Rule Machine 5.1 a lot; had to recreate rules many different times to learn it. Between the If-Statements, the Wait for..., and the Repeats one can create some complicated rules. I have decided I would go with many smaller rules than larger complicated ones. However, I do have some complicated rules.
I don't see different triggers in that rule, just one. Yo can create rules with only actions (no triggers), then "call"/trigger those rules from another rule, which is all I see above. That will work without the need to test for anything. But perhaps there is more than you showed?
As written, those are not triggers, just conditions used as part of an expression with an IF THEN (conditional action). They will not cause this rule's actions to run per se; only actual triggers--of which you do have one--will (or running the rule actions from another rule or the Rule Machine API).