Help with rule

hey everyone, i'm making a rule and part of it is if a contact sensor aqara has opened or closed in the last 10 minutes, i'm looking for the way but i'm blocked at this point. How could I do?

You might get better help if you provide more context, like what you're trying to do with the information about a recent change in the sensor. But to generally answer your question, here's one way you can do this:

Trigger: Contact sensor *changed*

Actions to Run:

Cancel Delayed Actions
Set Private Boolean False (for some other rule)
Delay 0:10:00 (cancelable)
Set Private Boolean True (for some other rule)

The above assume you have some "other rule" where you could check the Private Boolean state of that rule to see if the contact sensor has changed recently. If so, it will be set to false. Private Boolean is not the only option here; if you want to use this information in multiple rules, you could use a global variable instead, or if what you want to do would also be triggered based on this sensor, you might be able to just add those actions to this rule and use its own Private Boolean (or a local variable) to track the same, if you'd even need to specifically "track" it like this. You could use a virtual device (e.g., switch) as a proxy for the this state rather than a variable, with the advantage that this device might be more usable in standard apps (or on a dashboard, though "connectors" are available for variables now too).

It's hard to give specific advice that might work without knowing more, but since there's no direct way to "check," the specific answer would likely involve a (cancelable) delay or possibly a Wait, depending on your goals. Hops this helps a bit!