Does this kind of meditation have grounding or an equivalent in Buddhism? I've done a kind of meditation recently (or thought exercise), inspired by Buddhist teachings, and was wondering if the meditation has a specific name in Buddhism?

The meditation goes as follows:


Start with a couple minutes of breathing meditation.
Then try and notice any attachments or aversions that I feel in the moment.
For an aversion:


Allow the aversion to be there.
Allow the thing/situation/feeling that I'm avoiding to also be there, even if just for the duration of the meditation.
Try and build a sense of kindness towards the thing/situation/feeling that I'm avoiding.

For an attachment:


Allow the attachment to be there.
Allow the thing/situation/feeling that I'm attached to to be there.
Allow the opposite of the thing/situation/feeling that I'm attached to to also be there.

Repeat above until there is nothing left that I feel attachment or aversion towards.


And that's it. I've found that this gives an incredible sense of ease and calmness and presence.

Does this have any grounding in Buddhist teachings?
OP: Then try and notice any attachments or aversions that I feel in the moment.

This seems right:

the latent tendency to lust reinforced by being attached to pleasant feelings;
the latent tendency to aversion reinforced by rejecting painful feelings;
the latent tendency to ignorance reinforced by ignoring neutral feelings;

Pahāna Sutta

OP: ... Allow the aversion to be there ...
OP: ... Allow the attachment to be there ...

I believe you have to remove attachment and aversion:

If he feels a pleasant feeling,

he understands that it is impermanent;
he understands that it is not to be clung to;
he understands that there is no delight in it.

If he feels a painful feeling,

he understands that it is impermanent;
he understands that it is not to be clung to;
he understands that there is no delight in it.

If he feels a neutral feeling,

he understands that it is impermanent;
he understands that it is not to be clung to;
he understands that there is no delight in it.

If he feels a pleasant feeling, he feels it in a detached manner.
If he feels a painful feeling, he feels it in a detached manner.
If he feels a neutral feeling, he feels it in a detached manner.

Dhātu Vibhaṅga Sutta