Sensors can detect entities in a 15 blocks range. Opaque blocks in that range will block the beam, but ice, glass and other non solid blocks won’t.
Wooden sensors detect all entities.
Stone sensors detects only living entities.
Iron sensors only the player.
Netherack sensors will only react to hostile mobs.