'Remains' Condition

how does ‘remains’ work?

does the rule execute and hold at the condition for the specified time, or does it look to see if the condition was true for the past 10 minutes (assume the duration was 10 Minutes)?

i would hope the latter, not the former, but want to be sure.

{
	"name": "lights on - Periodic Check (Status)",
	"actions": [
		{
			"every": {
				"interval": {
					"value": {
						"integer": 15
					},
					"unit": "Minute"
				},
				"actions": [
					{
						"if": {
							"remains": {
								"duration": {
									"value": {
										"integer": 10
									},
									"unit": "Minute"
								},
								"equals": {
									"left": {
										"device": {
											"devices": [
												"b7216fe2-0201-4797-bf54-e71e1a76b2f7",
												"3da46d95-e3ba-4504-b0e0-83bad7908f9c",
												"5b09fd4f-e3e3-42f7-b1bd-9d9ec748c264"
											],
											"component": "main",
											"capability": "switch",
											"attribute": "switch",
											"trigger": "Never"
										}
									},
									"right": {
										"string": "on"
									},
									"aggregation": "Any"
								}
							},
							"then": [
								{
									...
								}
							]
						}
					}
				]
			}
		}
	]
}

My impression (which may be quite wrong) is that the conditions are constantly being updated in response to device events. When one of the switches turns on the equals condition becomes true. Ten minutes later the remains condition becomes true if nothing has changed and the Rule will trigger/execute.

If you executed the Rule manually the remains would already have a true or false value. So the effect would be like the latter of your two options.