(self, handle, wait_for_response=True)
Like unsubscribe() but using handle instead of uuid.

        handle -- handle as a integer of the characteristic to unsubscribe.
Like unsubscribe() but using handle instead of uuid.
Like unsubscribe () but using handle instead of uuid .
def unsubscribe_handle(self, handle, wait_for_response=True):
        """
        Like unsubscribe() but using handle instead of uuid.

        handle -- handle as a integer of the characteristic to unsubscribe.
        """
        value_handle = handle
        characteristic_config_handle = value_handle + 1

        properties = bytearray([0x0, 0x0])

        with self._lock:
            if value_handle in self._callbacks:
                del(self._callbacks[value_handle])
            if value_handle in self._subscribed_handlers:
                del(self._subscribed_handlers[value_handle])
                self.char_write_handle(
                    characteristic_config_handle,
                    properties,
                    wait_for_response=wait_for_response
                )
                log.info("Unsubscribed from handle=0x%04x", value_handle)
            else:
                log.debug(
                    "Already unsubscribed from handle=0x%04x",
                    value_handle
                )
def unsubscribe_handle ( self , handle , wait_for_response = True ) : value_handle = handle characteristic_config_handle = value_handle + 1 properties = bytearray ( [ 0x0 , 0x0 ] ) with self . _lock : if value_handle in self . _callbacks : del ( self . _callbacks [ value_handle ] ) if value_handle in self . _subscribed_handlers : del ( self . _subscribed_handlers [ value_handle ] ) self . char_write_handle ( characteristic_config_handle , properties , wait_for_response = wait_for_response ) log . info ( "Unsubscribed from handle=0x%04x" , value_handle ) else : log . debug ( "Already unsubscribed from handle=0x%04x" , value_handle )