@orangebucket is correct.
Remains
checks if the value we set in the condition stays like that for the specified amount of time. For example, if a light lasts ON for 5 minutes, if we turn it off after 4 minutes, the condition would be evaluated as “false”.
Was
checks the past states but it’s not a trigger by itself as we cannot check every minute if the amount of time passed matches the one specified. For example:
In this Rule, the flow is the following:
- IF Switch 1 is turned on
- AND have passed at least 40 seconds since the last “active” event from the motion sensor.
Note: the current value could be “inactive” depending on how much time you set for the “clear time” parameter, I’ve seen 20 or 30 seconds are very common. Receiving a new “active” event restarts this timer
- THEN turn off Switch 2
{
"name":"was test",
"actions":[
{
"if":{
"and":[
{
"was":{
"equals":{
"left":{
"device":{
"devices":[
"motionSensor-ID"
],
"component":"main",
"capability":"motionSensor",
"attribute":"motion"
}
},
"right":{
"string":"active"
}
},
"duration":{
"value":{
"integer":40
},
"unit":"Second"
}
}
},
{
"equals":{
"left":{
"device":{
"devices":[
"Switch1-ID"
],
"component":"main",
"capability":"switch",
"attribute":"switch",
"trigger":"Always"
}
},
"right":{
"string":"on"
}
}
}
],
"then":[
{
"command":{
"devices":[
"Switch2-ID"
],
"commands":[
{
"component":"main",
"capability":"switch",
"command":"on",
"arguments":[
]
}
]
}
}
]
}
}
]
}
The team is constantly working on improving the documentation, please, if you find more things confusing let us know.
We already reported some of the points you mentioned like “aggregation”, “sequence”, “changes”, “trigger” and the terminology difference. The last three have been addressed, please check the release notes and let us know if you find something strange in those changes.
We’ll make sure to get clarification on “remains”, “was” and “latching” in the documentation. For some points that are complex, a complete description is being added in the main doc of Rules