There are a class of differential equations whose solution oscillates around some equilibrium indefinitely after settling down. Below is an implementation of such an equation
t0 = 10^-6; tf = 50;
y0 = 2; dy0 = 0;
sol = NDSolve[{y''[t] == -(0.1 + 1/t) y'[t] - 1 + 6*y[t]^2 - 4 y[t]^3,
y[t0] == y0, y'[t0] == dy0}, {y}, {t, t0, tf}];
which produces an oscillating solution around y = 1.3.
I'd like to do two things. First, I'd like to stop the integration once a steady-state equilibrium is achieved. Second, I would like the find the midpoint of the oscillations, i.e., the height (for this, I could simply average over the late-time solutions so it's less of a problem).
In more complicated problems, the frequency might be increasing indefinitely, but the equilibrium height remains the same. I would hope to be able to accommodate this in the final solution.
Is there a way to easily achieve this using WhenEvent or something similar?

