async def set_discovery_enabled(self):
        """Enable bluetooth discoverablility."""
        endpoint = '/setup/bluetooth/discovery'
        data = {"enable_discovery": True}
        url = API.format(ip=self._ipaddress, endpoint=endpoint)
        try:
            async with async_timeout.timeout(5, loop=self._loop):
                response = await self._session.post(url,
                                                    headers=HEADERS,
                                                    data=json.dumps(data))
                _LOGGER.debug(response.status)
        except (asyncio.TimeoutError,
                aiohttp.ClientError, socket.gaierror) as error:
            _LOGGER.error('Error connecting to %s - %s', self._ipaddress, error)
async def set_discovery_enabled ( self ) : endpoint = '/setup/bluetooth/discovery' data = { "enable_discovery" : True } url = API . format ( ip = self . _ipaddress , endpoint = endpoint ) try : async with async_timeout . timeout ( 5 , loop = self . _loop ) : response = await self . _session . post ( url , headers = HEADERS , data = json . dumps ( data ) ) _LOGGER . debug ( response . status ) except ( asyncio . TimeoutError , aiohttp . ClientError , socket . gaierror ) as error : _LOGGER . error ( 'Error connecting to %s - %s' , self . _ipaddress , error )
Enable bluetooth discoverablility.