def METHOD_NAME(self, data):
    """Send message to device."""
    log_binary(_LOGGER, self._log_str + ">> Send raw", Data=data)
    if self._chacha:
        data = self._chacha.encrypt(data)
        log_binary(_LOGGER, self._log_str + ">> Send raw", Encrypted=data)
    data = write_variant(len(data)) + data
    self._transport.write(data)