Possible to log presence history using HA and unifi?

Would it be possible to use HA together with unfii wifi heads to have a log of presences?

I know we can use it to display who currently is in the building, but would there be a way to code a bit extra to actually store everything in a searchable database?

Thank you

Yes, use the recorder integration together with the history integration.