It only works properly if a land unit comes by your land unit on sentry, or if a naval unit comes by your naval unit on sentry.
If you have a unit that can hit a naval unit from land like a piece of artillary, if you put that piece of artillary on sentry, only a land unit coming by will wake the artillary. If this artillary is on the coast on sentry and a ship comes by it will not wake the artillary.
This is something I was hoping they would have fixed, other than that, it works great.