def unbind(self, devices_to_unbind):
        """ This function allows an entity to unbound devices that are already bound.

        Args:
            devices_to_unbind (list): an array of devices that are to be unbound ( stop listening)
                                     Example unbind(["test10","testDemo105"])
        """
        if self.entity_api_key == "":
            return {'status': 'failure', 'response': 'No API key found in request'}
        url = self.base_url + "api/0.1.0/subscribe/unbind"
        headers = {"apikey": self.entity_api_key}
        data = {
            "exchange": "amq.topic",
            "keys": devices_to_unbind,
            "queue": self.entity_id
        }

        with self.no_ssl_verification():
            r = requests.delete(url, json=data, headers=headers)
            print(r)
        response = dict()
        if "No API key" in str(r.content.decode("utf-8")):
            response["status"] = "failure"
            r = json.loads(r.content.decode("utf-8"))['message']
        elif 'unbind' in str(r.content.decode("utf-8")):
            response["status"] = "success"
            r = r.content.decode("utf-8")
        else:
            response["status"] = "failure"
            r = r.content.decode("utf-8")
        response["response"] = str(r)
        return response
def unbind ( self , devices_to_unbind ) : if self . entity_api_key == "" : return { 'status' : 'failure' , 'response' : 'No API key found in request' } url = self . base_url + "api/0.1.0/subscribe/unbind" headers = { "apikey" : self . entity_api_key } data = { "exchange" : "amq.topic" , "keys" : devices_to_unbind , "queue" : self . entity_id } with self . no_ssl_verification ( ) : r = requests . delete ( url , json = data , headers = headers ) print ( r ) response = dict ( ) if "No API key" in str ( r . content . decode ( "utf-8" ) ) : response [ "status" ] = "failure" r = json . loads ( r . content . decode ( "utf-8" ) ) [ 'message' ] elif 'unbind' in str ( r . content . decode ( "utf-8" ) ) : response [ "status" ] = "success" r = r . content . decode ( "utf-8" ) else : response [ "status" ] = "failure" r = r . content . decode ( "utf-8" ) response [ "response" ] = str ( r ) return response
This function allows an entity to unbound devices that are already bound.

        Args:
            devices_to_unbind (list): an array of devices that are to be unbound ( stop listening)
                                     Example unbind(["test10","testDemo105"])