Homey doesn’t detect that on it’s own, which is silly.
F.i. zigbee2mqtt has individual settings for both battery & mains powered devices, wich determines after how many hours of inactivity you’d like devices to be considered offline.
But, there’s a very neat script you can run, it checks for last update values of all/selected sensors and you can send notifications with the results: