async def pair_with_device(loop):
my_zeroconf = Zeroconf()<EOL>details = conf.AppleTV('<STR_LIT:127.0.0.1>', '<STR_LIT>')<EOL>details.add_service(conf.DmapService('<STR_LIT>'))<EOL>atv = pyatv.connect_to_apple_tv(details, loop)<EOL>atv.pairing.pin(PIN_CODE)<EOL>await atv.pairing.start(zeroconf=my_zeroconf, name=REMOTE_NAME)<EOL>print('<STR_LIT>')<EOL>await asyncio.sleep(<NUM_LIT>, loop=loop)<EOL>await atv.pairing.stop()<EOL>if atv.pairing.has_paired:<EOL><INDENT>print('<STR_LIT>')<EOL>print('<STR_LIT>', atv.pairing.credentials)<EOL><DEDENT>else:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>my_zeroconf.close()<EOL>
Make it possible to pair with device.