This is for PIR use with PIRs. I have a sensor at the moment but it’s next to useless because all it shows is the PIR with the most recently updated status. So for Xiaomi sensors, which timeout after a two minute break, it’s not actually telling you anything useful because it could be overriding motion from a minute ago.
You can see the sensor’s last_changed or last_updated attributes. That tells you is how long ago it triggered. If you want more than “movement occurred sometime in the last two minutes” you will need better sensors.
So you’d HOPE the “last movement” template sensor would show Floor 1. However, due to the fact two minutes after it was turned on, the Floor 3 sensor will report ‘off’, it breaks the logic of the template sensor
i.e. ones that are only active while movement is occurring. Unfortunately this kills battery life so wired sensors are the go. Or there are some pretty epic threads about reducing the Xiaomi movement sensor active time if you can live with replacing batteries more often. e.g.