Unstable presence detection with room-asssistant

Hello

I want to know since how much time a user (person sensor) is at home with the secondary_info : last-changed
the person is defined in the UI with a device_trigger triggered by a mqtt-sensor.
This mqtt-sensor is triggered by room-assistant bluetooth BLE (even if I stay at home, the distance is changing)

The mqtt-sensor is triggered every 2 (to 10) seconds and therefore the last-changed time resets very frequently.

Do you know if there is a way to avoid this behavior ? In HA and/or in room-assistant ?

Or may be I should change the way I estimate the time I’m at home?
Any idea would be great !

Thanks for your help

With room-assistant you might be able to get a better last changed value by using the built-in device tracker support: https://www.room-assistant.io/integrations/home-assistant.html#device-trackers